Merge branch 'for-4.21' of git://git.kernel.org/pub/scm/linux/kernel/git/dennis/percpu
[sfrench/cifs-2.6.git] / arch / arm / mach-pxa / z2.c
index 6fffcfc4621e1ac7c78f42640ca735ae7a9d196d..e2353e75bb283291bc7cad821e6b62f479820921 100644 (file)
@@ -27,6 +27,7 @@
 #include <linux/power_supply.h>
 #include <linux/mtd/physmap.h>
 #include <linux/gpio.h>
+#include <linux/gpio/machine.h>
 #include <linux/gpio_keys.h>
 #include <linux/delay.h>
 #include <linux/regulator/machine.h>
@@ -290,14 +291,21 @@ static inline void z2_lcd_init(void) {}
 #if defined(CONFIG_MMC_PXA) || defined(CONFIG_MMC_PXA_MODULE)
 static struct pxamci_platform_data z2_mci_platform_data = {
        .ocr_mask               = MMC_VDD_32_33 | MMC_VDD_33_34,
-       .gpio_card_detect       = GPIO96_ZIPITZ2_SD_DETECT,
-       .gpio_power             = -1,
-       .gpio_card_ro           = -1,
        .detect_delay_ms        = 200,
 };
 
+static struct gpiod_lookup_table z2_mci_gpio_table = {
+       .dev_id = "pxa2xx-mci.0",
+       .table = {
+               GPIO_LOOKUP("gpio-pxa", GPIO96_ZIPITZ2_SD_DETECT,
+                           "cd", GPIO_ACTIVE_LOW),
+               { },
+       },
+};
+
 static void __init z2_mmc_init(void)
 {
+       gpiod_add_lookup_table(&z2_mci_gpio_table);
        pxa_set_mci_info(&z2_mci_platform_data);
 }
 #else