Merge tag 'dmaengine-4.21-rc1' of git://git.infradead.org/users/vkoul/slave-dma
[linux-2.6-microblaze.git] / arch / arm / mach-pxa / palmtc.c
index 1894659..7ce4fc2 100644 (file)
@@ -20,7 +20,7 @@
 #include <linux/input.h>
 #include <linux/pwm.h>
 #include <linux/pwm_backlight.h>
-#include <linux/gpio.h>
+#include <linux/gpio/machine.h>
 #include <linux/input/matrix_keypad.h>
 #include <linux/ucb1400.h>
 #include <linux/power_supply.h>
@@ -120,14 +120,25 @@ static unsigned long palmtc_pin_config[] __initdata = {
 #if defined(CONFIG_MMC_PXA) || defined(CONFIG_MMC_PXA_MODULE)
 static struct pxamci_platform_data palmtc_mci_platform_data = {
        .ocr_mask               = MMC_VDD_32_33 | MMC_VDD_33_34,
-       .gpio_power             = GPIO_NR_PALMTC_SD_POWER,
-       .gpio_card_ro           = GPIO_NR_PALMTC_SD_READONLY,
-       .gpio_card_detect       = GPIO_NR_PALMTC_SD_DETECT_N,
        .detect_delay_ms        = 200,
 };
 
+static struct gpiod_lookup_table palmtc_mci_gpio_table = {
+       .dev_id = "pxa2xx-mci.0",
+       .table = {
+               GPIO_LOOKUP("gpio-pxa", GPIO_NR_PALMTC_SD_DETECT_N,
+                           "cd", GPIO_ACTIVE_LOW),
+               GPIO_LOOKUP("gpio-pxa", GPIO_NR_PALMTC_SD_READONLY,
+                           "wp", GPIO_ACTIVE_LOW),
+               GPIO_LOOKUP("gpio-pxa", GPIO_NR_PALMTC_SD_POWER,
+                           "power", GPIO_ACTIVE_HIGH),
+               { },
+       },
+};
+
 static void __init palmtc_mmc_init(void)
 {
+       gpiod_add_lookup_table(&palmtc_mci_gpio_table);
        pxa_set_mci_info(&palmtc_mci_platform_data);
 }
 #else