simple LED blinking driver using FDT on kernel v3.4

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

simple LED blinking driver using FDT on kernel v3.4

556件の閲覧回数
Rooney
Contributor III

I want to use kernel v3.4 on my i.MX53 QSB. Since version 3.1 the flat device tree is supported by the kernel.

Can anyone explain how to write a simple driver that is toggling a GPIO? IMX_GPIO_NR() is not working anymore and I'm really frustrated that is obviouly difficult to toggle a pin.

If the GPIO is defined in my device tree specification how can the driver access this gpio?

In kernel v3.0 I just had to do the following:

#define USER_LED_EN             IMX_GPIO_NR(4, 3)
#define USER_LED_EN_PAD         MX53_PAD_GPIO_13__GPIO4_3

...

mxc_iomux_v3_setup_pad(USER_LED_EN_PAD);
gpio_request(USER_LED_EN, "user led");
gpio_direction_output(USER_LED_EN, 1);
gpio_set_value(USER_LED_EN, ledState);

タグ(1)
0 件の賞賛
0 返答(返信)