hc
2024-05-14 bedbef8ad3e75a304af6361af235302bcc61d06b
kernel/arch/arm/mach-pxa/poodle.c
....@@ -1,3 +1,4 @@
1
+// SPDX-License-Identifier: GPL-2.0-only
12 /*
23 * linux/arch/arm/mach-pxa/poodle.c
34 *
....@@ -5,10 +6,6 @@
56 *
67 * Based on:
78 * linux/arch/arm/mach-pxa/lubbock.c Author: Nicolas Pitre
8
- *
9
- * This program is free software; you can redistribute it and/or modify
10
- * it under the terms of the GNU General Public License version 2 as
11
- * published by the Free Software Foundation.
129 *
1310 * Change Log
1411 * 12-Dec-2002 Sharp Corporation for Poodle
....@@ -23,6 +20,7 @@
2320 #include <linux/delay.h>
2421 #include <linux/mtd/physmap.h>
2522 #include <linux/gpio.h>
23
+#include <linux/gpio/machine.h>
2624 #include <linux/i2c.h>
2725 #include <linux/platform_data/i2c-pxa.h>
2826 #include <linux/regulator/machine.h>
....@@ -195,7 +193,7 @@
195193 EXPORT_SYMBOL(poodle_locomo_device);
196194
197195 #if defined(CONFIG_SPI_PXA2XX) || defined(CONFIG_SPI_PXA2XX_MODULE)
198
-static struct pxa2xx_spi_master poodle_spi_info = {
196
+static struct pxa2xx_spi_controller poodle_spi_info = {
199197 .num_chipselect = 1,
200198 };
201199
....@@ -288,11 +286,18 @@
288286 .init = poodle_mci_init,
289287 .setpower = poodle_mci_setpower,
290288 .exit = poodle_mci_exit,
291
- .gpio_card_detect = POODLE_GPIO_nSD_DETECT,
292
- .gpio_card_ro = POODLE_GPIO_nSD_WP,
293
- .gpio_power = -1,
294289 };
295290
291
+static struct gpiod_lookup_table poodle_mci_gpio_table = {
292
+ .dev_id = "pxa2xx-mci.0",
293
+ .table = {
294
+ GPIO_LOOKUP("gpio-pxa", POODLE_GPIO_nSD_DETECT,
295
+ "cd", GPIO_ACTIVE_LOW),
296
+ GPIO_LOOKUP("gpio-pxa", POODLE_GPIO_nSD_WP,
297
+ "wp", GPIO_ACTIVE_LOW),
298
+ { },
299
+ },
300
+};
296301
297302 /*
298303 * Irda
....@@ -439,6 +444,7 @@
439444
440445 pxa_set_fb_info(&poodle_locomo_device.dev, &poodle_fb_info);
441446 pxa_set_udc_info(&udc_info);
447
+ gpiod_add_lookup_table(&poodle_mci_gpio_table);
442448 pxa_set_mci_info(&poodle_mci_platform_data);
443449 pxa_set_ficp_info(&poodle_ficp_platform_data);
444450 pxa_set_i2c_info(NULL);