Merge tag 'f2fs-for-4.21' of git://git.kernel.org/pub/scm/linux/kernel/git/jaegeuk...
[sfrench/cifs-2.6.git] / arch / arm / mach-pxa / mxm8x10.c
index 616b22397d7351a74e814f9e00f2d9853bc5839d..e4248a3a8dfc193e36a849c501d299e9bbce85f6 100644 (file)
@@ -21,7 +21,7 @@
 
 #include <linux/serial_8250.h>
 #include <linux/dm9000.h>
-#include <linux/gpio.h>
+#include <linux/gpio/machine.h>
 #include <linux/platform_data/i2c-pxa.h>
 
 #include <linux/platform_data/mtd-nand-pxa3xx.h>
@@ -326,13 +326,24 @@ static mfp_cfg_t mfp_cfg[] __initdata = {
 static struct pxamci_platform_data mxm_8x10_mci_platform_data = {
        .ocr_mask = MMC_VDD_32_33 | MMC_VDD_33_34,
        .detect_delay_ms = 10,
-       .gpio_card_detect = MXM_8X10_SD_nCD,
-       .gpio_card_ro = MXM_8X10_SD_WP,
-       .gpio_power = -1
+};
+
+static struct gpiod_lookup_table mxm_8x10_mci_gpio_table = {
+       .dev_id = "pxa2xx-mci.0",
+       .table = {
+               /* Card detect on GPIO 72 */
+               GPIO_LOOKUP("gpio-pxa", MXM_8X10_SD_nCD,
+                           "cd", GPIO_ACTIVE_LOW),
+               /* Write protect on GPIO 84 */
+               GPIO_LOOKUP("gpio-pxa", MXM_8X10_SD_WP,
+                           "wp", GPIO_ACTIVE_LOW),
+               { },
+       },
 };
 
 void __init mxm_8x10_mmc_init(void)
 {
+       gpiod_add_lookup_table(&mxm_8x10_mci_gpio_table);
        pxa_set_mci_info(&mxm_8x10_mci_platform_data);
 }
 #endif