29.04.2015 Views

DevKit8500D/A User Manual - DMCS Pages for Students

DevKit8500D/A User Manual - DMCS Pages for Students

DevKit8500D/A User Manual - DMCS Pages for Students

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

static struct gpio_led_plat<strong>for</strong>m_data gpio_led_info = {<br />

.leds<br />

.num_leds<br />

= gpio_leds,<br />

= ARRAY_SIZE(gpio_leds),<br />

};<br />

static struct plat<strong>for</strong>m_device leds_gpio = {<br />

.name<br />

= "leds-gpio",<br />

.id = -1,<br />

.dev = {<br />

.plat<strong>for</strong>m_data = &gpio_led_info,<br />

},<br />

};<br />

static int devkit8500_twl_gpio_setup(struct device *dev,<br />

unsigned gpio, unsigned ngpio)<br />

{<br />

…<br />

/* TWL4030_GPIO_MAX + 1 == ledB, PMU_STAT (out, active low LED) */<br />

gpio_leds[1].gpio = gpio + TWL4030_GPIO_MAX + 1;<br />

gpio_leds[2].gpio = gpio + 2;<br />

gpio_leds[3].gpio = gpio + 15;<br />

…<br />

}<br />

2) GPIO pinmux Setup:<br />

u-boot-03.00.02.07/board/devkit8500.h<br />

Configure GPIO 186 as M4(MODE 4 = GPIO), IDIS(Input not allowed)<br />

/*<br />

* IEN - Input Enable<br />

* IDIS - Input Disable<br />

* PTD - Pull type Down<br />

52

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!