hc
2024-12-19 9370bb92b2d16684ee45cf24e879c93c509162da
kernel/arch/arm/mach-pxa/mxm8x10.c
....@@ -1,3 +1,4 @@
1
+// SPDX-License-Identifier: GPL-2.0-only
12 /*
23 * linux/arch/arm/mach-pxa/mxm8x10.c
34 *
....@@ -13,15 +14,11 @@
1314 * 2010-01-09: Edwin Peer <epeer@tmtservices.co.za>
1415 * Hennie van der Merwe <hvdmerwe@tmtservices.co.za>
1516 * rework for upstream merge
16
- *
17
- * This program is free software; you can redistribute it and/or modify
18
- * it under the terms of the GNU General Public License version 2 as
19
- * published by the Free Software Foundation.
2017 */
2118
2219 #include <linux/serial_8250.h>
2320 #include <linux/dm9000.h>
24
-#include <linux/gpio.h>
21
+#include <linux/gpio/machine.h>
2522 #include <linux/platform_data/i2c-pxa.h>
2623
2724 #include <linux/platform_data/mtd-nand-pxa3xx.h>
....@@ -326,13 +323,24 @@
326323 static struct pxamci_platform_data mxm_8x10_mci_platform_data = {
327324 .ocr_mask = MMC_VDD_32_33 | MMC_VDD_33_34,
328325 .detect_delay_ms = 10,
329
- .gpio_card_detect = MXM_8X10_SD_nCD,
330
- .gpio_card_ro = MXM_8X10_SD_WP,
331
- .gpio_power = -1
326
+};
327
+
328
+static struct gpiod_lookup_table mxm_8x10_mci_gpio_table = {
329
+ .dev_id = "pxa2xx-mci.0",
330
+ .table = {
331
+ /* Card detect on GPIO 72 */
332
+ GPIO_LOOKUP("gpio-pxa", MXM_8X10_SD_nCD,
333
+ "cd", GPIO_ACTIVE_LOW),
334
+ /* Write protect on GPIO 84 */
335
+ GPIO_LOOKUP("gpio-pxa", MXM_8X10_SD_WP,
336
+ "wp", GPIO_ACTIVE_LOW),
337
+ { },
338
+ },
332339 };
333340
334341 void __init mxm_8x10_mmc_init(void)
335342 {
343
+ gpiod_add_lookup_table(&mxm_8x10_mci_gpio_table);
336344 pxa_set_mci_info(&mxm_8x10_mci_platform_data);
337345 }
338346 #endif