LED device driver using platform device driver and dts in Raspberry pi 3b+.

Status
Not open for further replies.

anilrockstar

Newbie level 3
Joined
May 19, 2017
Messages
3
Helped
0
Reputation
0
Reaction score
0
Trophy points
1
Activity points
22
Hi everyone.

I want to learn custom device driver in Arm Borad device . i have using Rasberry pi 3b+. and import kernel from kernel.and modifiy kernel by documation givern instruction by link.

https://www.raspberrypi.org/documentation/linux/kernel/building.md

and i have modify dts file bcm2710_rpi_3b_plus.dts file and compile.
Code:
&gpio {
	 sdhost_pins: sdhost_pins {
		
brcm,pins = <48 49 50 51 52 53>;
		
brcm,function = <4>; /* alt0 */
	 };
	 [...]
	
	 led_pins: led_pins {
		
brcm,pins = <27 22 26>;
		
brcm,function = <1>;	 /* Output */
		
brcm,pull = <1 1 1>;	 /* Pull down */
	 };
		
};
&soc {
	 virtgpio: virtgpio {
		
compatible = "brcm,bcm2835-virtgpio";
		
gpio-controller;
		
#gpio-cells = <2>;
firmware = <&firmware>;
status = "okay";
	 expgpio: expgpio {
		
compatible = "brcm,bcm2835-expgpio";
		
gpio-controller;
		
#gpio-cells = <2>;
		
firmware = <&firmware>;
		
status = "okay";
	 };

ledred
		
		
		
	 };
{
compatible = "arrow,RGBleds";
label = "ledred";
pinctrl-0 = <&led_pins>;
	 ledgreen {
		
compatible = "arrow,RGBleds";
		
label = "ledgreen";
	 };
	 ledblue {
		
compatible = "arrow,RGBleds";
		
label = "ledblue";
	 };
	
	 [...]
};

and i have written demo code for driver and insert by insmod command , but led not blinking.
 

Status
Not open for further replies.
Cookies are required to use this site. You must accept them to continue using the site. Learn more…