9
0
Fork 0

PCM051: Add muxing for user led and btn

Signed-off-by: Teresa Gámez <t.gamez@phytec.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
This commit is contained in:
Teresa Gámez 2013-07-09 11:23:14 +02:00 committed by Sascha Hauer
parent 2cd0baba4b
commit 4974bdcc56
3 changed files with 27 additions and 0 deletions

View File

@ -171,6 +171,9 @@ static int pcm051_devices_init(void)
pcm051_i2c_init();
pcm051_nand_init();
pcm051_enable_user_led_pin_mux();
pcm051_enable_user_btn_pin_mux();
switch (bootsource_get()) {
case BOOTSOURCE_SPI:
devfs_add_partition("nor0", 0x00000, SZ_128K,

View File

@ -14,7 +14,29 @@ static const struct module_pin_mux mmc0_pin_mux[] = {
{-1},
};
static const struct module_pin_mux user_led_pin_mux[] = {
{OFFSET(gpmc_csn1), MODE(7) | PULLUDEN}, /* USER LED1 */
{OFFSET(gpmc_csn2), MODE(7) | PULLUDEN}, /* USER LED2 */
{-1},
};
static const struct module_pin_mux user_btn_pin_mux[] = {
{OFFSET(emu0), MODE(7) | RXACTIVE | PULLUP_EN},
{OFFSET(emu1), MODE(7) | RXACTIVE | PULLUP_EN},
{-1},
};
void pcm051_enable_mmc0_pin_mux(void)
{
configure_module_pin_mux(mmc0_pin_mux);
}
void pcm051_enable_user_led_pin_mux(void)
{
configure_module_pin_mux(user_led_pin_mux);
}
void pcm051_enable_user_btn_pin_mux(void)
{
configure_module_pin_mux(user_btn_pin_mux);
}

View File

@ -1 +1,3 @@
extern void pcm051_enable_mmc0_pin_mux(void);
extern void pcm051_enable_user_led_pin_mux(void);
extern void pcm051_enable_user_btn_pin_mux(void);