summaryrefslogtreecommitdiff
path: root/arch/arm/mach-pxa/palmtx.c
diff options
context:
space:
mode:
authorLinus Walleij <linus.walleij@linaro.org>2018-12-02 09:43:23 +0100
committerUlf Hansson <ulf.hansson@linaro.org>2018-12-17 08:26:24 +0100
commit58e2d877e37018b3804ab2601d9c9ad3fbcc74e7 (patch)
tree1321d91db50cb70c0d3ccd14768e74d6f84f07df /arch/arm/mach-pxa/palmtx.c
parent32d1544880aa87aebe4d20babb48615c65874b02 (diff)
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>
Diffstat (limited to 'arch/arm/mach-pxa/palmtx.c')
-rw-r--r--arch/arm/mach-pxa/palmtx.c17
1 files changed, 15 insertions, 2 deletions
diff --git a/arch/arm/mach-pxa/palmtx.c b/arch/arm/mach-pxa/palmtx.c
index 1d06a8e91d8f..5bb4ffeb4ba5 100644
--- a/arch/arm/mach-pxa/palmtx.c
+++ b/arch/arm/mach-pxa/palmtx.c
@@ -337,6 +337,17 @@ static void __init palmtx_map_io(void)
iotable_init(palmtx_io_desc, ARRAY_SIZE(palmtx_io_desc));
}
+static struct gpiod_lookup_table palmtx_mci_gpio_table = {
+ .dev_id = "pxa2xx-mci.0",
+ .table = {
+ GPIO_LOOKUP("gpio-pxa", GPIO_NR_PALMTX_SD_DETECT_N,
+ "cd", GPIO_ACTIVE_LOW),
+ GPIO_LOOKUP("gpio-pxa", GPIO_NR_PALMTX_SD_READONLY,
+ "wp", GPIO_ACTIVE_LOW),
+ { },
+ },
+};
+
static void __init palmtx_init(void)
{
pxa2xx_mfp_config(ARRAY_AND_SIZE(palmtx_pin_config));
@@ -344,8 +355,10 @@ static void __init palmtx_init(void)
pxa_set_btuart_info(NULL);
pxa_set_stuart_info(NULL);
- palm27x_mmc_init(GPIO_NR_PALMTX_SD_DETECT_N, GPIO_NR_PALMTX_SD_READONLY,
- GPIO_NR_PALMTX_SD_POWER, 0);
+ palm27x_mmc_init(&palmtx_mci_gpio_table,
+ GPIO_NR_PALMTX_SD_DETECT_N,
+ GPIO_NR_PALMTX_SD_READONLY,
+ GPIO_NR_PALMTX_SD_POWER, 0);
palm27x_pm_init(PALMTX_STR_BASE);
palm27x_lcd_init(-1, &palm_320x480_lcd_mode);
palm27x_udc_init(GPIO_NR_PALMTX_USB_DETECT_N,