DevKit8500D/A User Manual - DMCS Pages for Students
DevKit8500D/A User Manual - DMCS Pages for Students
DevKit8500D/A User Manual - DMCS Pages for Students
You also want an ePaper? Increase the reach of your titles
YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.
* PTU - Pull type Up<br />
* DIS - Pull type selection is inactive<br />
* EN - Pull type selection is active<br />
* M0 - Mode 0<br />
* The commented string gives the final mux configuration <strong>for</strong> that pin<br />
*/<br />
MUX_VAL(CP(SYS_CLKOUT2),<br />
(IDIS | PTU | EN | M4)) /*GPIO_186*/\<br />
3) Driver design:<br />
linux-2.6.32-devkit8500/drivers/leds/leds-gpio.c<br />
a) Structure <strong>for</strong> plat<strong>for</strong>m_driver_register to register gpio_leds.<br />
static struct plat<strong>for</strong>m_driver gpio_led_driver = {<br />
.probe<br />
.remove<br />
= gpio_led_probe,<br />
= __devexit_p(gpio_led_remove),<br />
.driver = {<br />
.name<br />
= "leds-gpio",<br />
.owner = THIS_MODULE,<br />
},<br />
};<br />
static int __init gpio_led_init(void)<br />
{<br />
int ret;<br />
#ifdef CONFIG_LEDS_GPIO_PLATFORM<br />
ret = plat<strong>for</strong>m_driver_register(&gpio_led_driver);<br />
if (ret)<br />
return ret;<br />
#endif<br />
#ifdef CONFIG_LEDS_GPIO_OF<br />
ret = of_register_plat<strong>for</strong>m_driver(&of_gpio_leds_driver);<br />
#endif<br />
53