Download DevKit8500D/A User Manual
Transcript
3.6.2 Driver for the gpio_leds
1)
Device Definition
linux-2.6.32-devkit8500/arch/arm/mach-omap2/board-devkit8500.c
The driver main() will introduce how to create the driver on the kernel and enable the LED2, LED3,
LED4, LED5, the kernel configuration respectively are: user_ledb (GPIO186), sys_led (twl4030
LEDB), user_led1 (twl4030 GPIO2), user_led2 (twl4030 GPIO15), low level is enable:
static struct gpio_led gpio_leds[] = {
{
.name
= "sys_led",
.default_trigger
= "heartbeat",
.gpio
= 186,
.active_low
= true,
.name
= "user_ledb",
.gpio
= -EINVAL,
.active_low
= true,
.name
= "user_led1",
.gpio
= -EINVAL,
.active_low
= true,
.name
= "user_led2",
.gpio
= -EINVAL,
.active_low
= true,
},
{
},
{
},
{
},
};
51