hc
2024-05-14 bedbef8ad3e75a304af6361af235302bcc61d06b
kernel/arch/arm/mach-pxa/palmt5.c
....@@ -1,3 +1,4 @@
1
+// SPDX-License-Identifier: GPL-2.0-only
12 /*
23 * Hardware definitions for Palm Tungsten|T5
34 *
....@@ -8,12 +9,7 @@
89 * Justin Kendrick <twilightsentry@gmail.com>
910 * RichardT5 <richard_t5@users.sourceforge.net>
1011 *
11
- * This program is free software; you can redistribute it and/or modify
12
- * it under the terms of the GNU General Public License version 2 as
13
- * published by the Free Software Foundation.
14
- *
1512 * (find more info at www.hackndev.com)
16
- *
1713 */
1814
1915 #include <linux/platform_device.h>
....@@ -27,7 +23,6 @@
2723 #include <linux/gpio.h>
2824 #include <linux/wm97xx.h>
2925 #include <linux/power_supply.h>
30
-#include <linux/usb/gpio_vbus.h>
3126
3227 #include <asm/mach-types.h>
3328 #include <asm/mach/arch.h>
....@@ -182,6 +177,19 @@
182177 memblock_reserve(0xa0200000, 0x1000);
183178 }
184179
180
+static struct gpiod_lookup_table palmt5_mci_gpio_table = {
181
+ .dev_id = "pxa2xx-mci.0",
182
+ .table = {
183
+ GPIO_LOOKUP("gpio-pxa", GPIO_NR_PALMT5_SD_DETECT_N,
184
+ "cd", GPIO_ACTIVE_LOW),
185
+ GPIO_LOOKUP("gpio-pxa", GPIO_NR_PALMT5_SD_READONLY,
186
+ "wp", GPIO_ACTIVE_LOW),
187
+ GPIO_LOOKUP("gpio-pxa", GPIO_NR_PALMT5_SD_POWER,
188
+ "power", GPIO_ACTIVE_HIGH),
189
+ { },
190
+ },
191
+};
192
+
185193 static void __init palmt5_init(void)
186194 {
187195 pxa2xx_mfp_config(ARRAY_AND_SIZE(palmt5_pin_config));
....@@ -189,8 +197,7 @@
189197 pxa_set_btuart_info(NULL);
190198 pxa_set_stuart_info(NULL);
191199
192
- palm27x_mmc_init(GPIO_NR_PALMT5_SD_DETECT_N, GPIO_NR_PALMT5_SD_READONLY,
193
- GPIO_NR_PALMT5_SD_POWER, 0);
200
+ palm27x_mmc_init(&palmt5_mci_gpio_table);
194201 palm27x_pm_init(PALMT5_STR_BASE);
195202 palm27x_lcd_init(-1, &palm_320x480_lcd_mode);
196203 palm27x_udc_init(GPIO_NR_PALMT5_USB_DETECT_N,