basic approach for LED interface with GPIO pins.

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 

basic approach for LED interface with GPIO pins.

1,878件の閲覧回数
anamikalal
Contributor I

Hi all,

I am a newbie in device driver stuffs. I want to connect LEDs to the gpio pins of imx6qdl and use it for debugging purpose.

For that purpose I have modified the device tree as follows:

leds {

            pinctrl-names ="default";

             pinctrl-0 =<&pinctrl_leds>;

compatible = "gpio-leds";

debug-led-1 {

                                label ="Debug-led1";

                                gpios = <&gpio1 1>;         

                                linux,default-trigger ="heartbeat";

                                linux,default-state ="on";

                };

                debug-led-2 {

                                label ="Debug-led2";

                                gpios= <&gpio1 2>;         

                                linux,default-trigger ="heartbeat";

                                linux,default-state ="on";

                };

     };

the pinctrl settings are:-

pinctrl_leds: ledsgrp {

                                fsl,pins = <

                                                MX6QDL_PAD_GPIO_1__GPIO1_IO01      0x0b0b0                                /*Debug-led-1*/

                                                MX6QDL_PAD_GPIO_2__GPIO1_IO02       0x0b0b0                                /*Debug-led-2 */

                                                >

                                             }

Now I want to know what else I need to do for configuring the gpio pins?

Do I need to modify the board setup code?

Do I need to add/modify something in device driver (leds-gpio.c)code? (eg: platform_device or platform_data structure or the device tree will take care of it?)

Please help !!!

Thanks,

Anamika

ラベル(3)
タグ(1)
0 件の賞賛
返信
1 返信

832件の閲覧回数
CarlosCasillas
NXP Employee
NXP Employee

Hi Anamika,

The following threads may be useful for you:

imx6sl evk debug led

Re: Re: GPIO interrupt on i.MX6

Re: Proper GPIO interrupt handling in iMX6

Hope this will be useful for you.

Best regards!

/Carlos

0 件の賞賛
返信