summaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-pxa/palmt5.c
diff options
context:
space:
mode:
authorLinus Walleij2018-12-02 09:43:23 +0100
committerUlf Hansson2018-12-17 08:26:24 +0100
commit58e2d877e37018b3804ab2601d9c9ad3fbcc74e7 (patch)
tree1321d91db50cb70c0d3ccd14768e74d6f84f07df /arch/arm/mach-pxa/palmt5.c
parentARM: pxa: Add gpio descriptor lookup tables for MMC CD/WP (diff)
downloadkernel-qcow2-linux-58e2d877e37018b3804ab2601d9c9ad3fbcc74e7.tar.gz
kernel-qcow2-linux-58e2d877e37018b3804ab2601d9c9ad3fbcc74e7.tar.xz
kernel-qcow2-linux-58e2d877e37018b3804ab2601d9c9ad3fbcc74e7.zip
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/palmt5.c')
-rw-r--r--arch/arm/mach-pxa/palmt5.c17
1 files changed, 15 insertions, 2 deletions
diff --git a/arch/arm/mach-pxa/palmt5.c b/arch/arm/mach-pxa/palmt5.c
index 876144aa3564..86634a48aec7 100644
--- a/arch/arm/mach-pxa/palmt5.c
+++ b/arch/arm/mach-pxa/palmt5.c
@@ -182,6 +182,17 @@ static void __init palmt5_reserve(void)
memblock_reserve(0xa0200000, 0x1000);
}
+static struct gpiod_lookup_table palmt5_mci_gpio_table = {
+ .dev_id = "pxa2xx-mci.0",
+ .table = {
+ GPIO_LOOKUP("gpio-pxa", GPIO_NR_PALMT5_SD_DETECT_N,
+ "cd", GPIO_ACTIVE_LOW),
+ GPIO_LOOKUP("gpio-pxa", GPIO_NR_PALMT5_SD_READONLY,
+ "wp", GPIO_ACTIVE_LOW),
+ { },
+ },
+};
+
static void __init palmt5_init(void)
{
pxa2xx_mfp_config(ARRAY_AND_SIZE(palmt5_pin_config));
@@ -189,8 +200,10 @@ static void __init palmt5_init(void)
pxa_set_btuart_info(NULL);
pxa_set_stuart_info(NULL);
- palm27x_mmc_init(GPIO_NR_PALMT5_SD_DETECT_N, GPIO_NR_PALMT5_SD_READONLY,
- GPIO_NR_PALMT5_SD_POWER, 0);
+ palm27x_mmc_init(&palmt5_mci_gpio_table,
+ GPIO_NR_PALMT5_SD_DETECT_N,
+ GPIO_NR_PALMT5_SD_READONLY,
+ GPIO_NR_PALMT5_SD_POWER, 0);
palm27x_pm_init(PALMT5_STR_BASE);
palm27x_lcd_init(-1, &palm_320x480_lcd_mode);
palm27x_udc_init(GPIO_NR_PALMT5_USB_DETECT_N,