ARM: pxa: Add GPIO descriptors for Palm27x
The Palm27x devices set up the MMC card detect and write protect lines with a special helper function. Augment this helper function to also accept an optional GPIO descriptor table and pass and register this for all the Palm27x devices in that family. Cc: Daniel Mack <daniel@zonque.org> Cc: Robert Jarzmik <robert.jarzmik@free.fr> Cc: Bartosz Golaszewski <brgl@bgdev.pl> Cc: Andrea Adami <andrea.adami@gmail.com> Acked-by: Robert Jarzmik <robert.jarzmik@free.fr> Signed-off-by: Linus Walleij <linus.walleij@linaro.org> Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
This commit is contained in:

committed by
Ulf Hansson

parent
32d1544880
commit
58e2d877e3
@@ -320,6 +320,17 @@ static void __init palmld_map_io(void)
|
||||
iotable_init(palmld_io_desc, ARRAY_SIZE(palmld_io_desc));
|
||||
}
|
||||
|
||||
static struct gpiod_lookup_table palmld_mci_gpio_table = {
|
||||
.dev_id = "pxa2xx-mci.0",
|
||||
.table = {
|
||||
GPIO_LOOKUP("gpio-pxa", GPIO_NR_PALMLD_SD_DETECT_N,
|
||||
"cd", GPIO_ACTIVE_LOW),
|
||||
GPIO_LOOKUP("gpio-pxa", GPIO_NR_PALMLD_SD_READONLY,
|
||||
"wp", GPIO_ACTIVE_LOW),
|
||||
{ },
|
||||
},
|
||||
};
|
||||
|
||||
static void __init palmld_init(void)
|
||||
{
|
||||
pxa2xx_mfp_config(ARRAY_AND_SIZE(palmld_pin_config));
|
||||
@@ -327,8 +338,10 @@ static void __init palmld_init(void)
|
||||
pxa_set_btuart_info(NULL);
|
||||
pxa_set_stuart_info(NULL);
|
||||
|
||||
palm27x_mmc_init(GPIO_NR_PALMLD_SD_DETECT_N, GPIO_NR_PALMLD_SD_READONLY,
|
||||
GPIO_NR_PALMLD_SD_POWER, 0);
|
||||
palm27x_mmc_init(&palmld_mci_gpio_table,
|
||||
GPIO_NR_PALMLD_SD_DETECT_N,
|
||||
GPIO_NR_PALMLD_SD_READONLY,
|
||||
GPIO_NR_PALMLD_SD_POWER, 0);
|
||||
palm27x_pm_init(PALMLD_STR_BASE);
|
||||
palm27x_lcd_init(-1, &palm_320x480_lcd_mode);
|
||||
palm27x_irda_init(GPIO_NR_PALMLD_IR_DISABLE);
|
||||
|
Reference in New Issue
Block a user