DevKit8500D/A User Manual - DMCS Pages for Students
DevKit8500D/A User Manual - DMCS Pages for Students
DevKit8500D/A User Manual - DMCS Pages for Students
Create successful ePaper yourself
Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.
3.6.2 Driver <strong>for</strong> the gpio_leds<br />
1) Device Definition<br />
linux-2.6.32-devkit8500/arch/arm/mach-omap2/board-devkit8500.c<br />
The driver main() will introduce how to create the driver on the kernel and enable the LED2, LED3,<br />
LED4, LED5, the kernel configuration respectively are: user_ledb (GPIO186), sys_led (twl4030<br />
LEDB), user_led1 (twl4030 GPIO2), user_led2 (twl4030 GPIO15), low level is enable:<br />
static struct gpio_led gpio_leds[] = {<br />
{<br />
.name<br />
.default_trigger<br />
= "sys_led",<br />
= "heartbeat",<br />
.gpio = 186,<br />
.active_low<br />
= true,<br />
},<br />
{<br />
.name<br />
.gpio<br />
.active_low<br />
= "user_ledb",<br />
= -EINVAL,<br />
= true,<br />
},<br />
{<br />
.name<br />
.gpio<br />
.active_low<br />
= "user_led1",<br />
= -EINVAL,<br />
= true,<br />
},<br />
{<br />
.name<br />
.gpio<br />
.active_low<br />
= "user_led2",<br />
= -EINVAL,<br />
= true,<br />
},<br />
};<br />
51