simple LED blinking driver using FDT on kernel v3.4

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 

simple LED blinking driver using FDT on kernel v3.4

694 次查看
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 回复数