hc
2023-12-11 d2ccde1c8e90d38cee87a1b0309ad2827f3fd30d
kernel/arch/arm/mach-pxa/colibri-pxa320.c
....@@ -1,3 +1,4 @@
1
+// SPDX-License-Identifier: GPL-2.0-only
12 /*
23 * arch/arm/mach-pxa/colibri-pxa320.c
34 *
....@@ -5,21 +6,17 @@
56 *
67 * Daniel Mack <daniel@caiaq.de>
78 * Matthias Meier <matthias.j.meier@gmx.net>
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
1411 #include <linux/init.h>
1512 #include <linux/kernel.h>
1613 #include <linux/platform_device.h>
14
+#include <linux/gpio/machine.h>
1715 #include <linux/gpio.h>
1816 #include <linux/interrupt.h>
19
-#include <linux/usb/gpio_vbus.h>
2017
2118 #include <asm/mach-types.h>
22
-#include <asm/sizes.h>
19
+#include <linux/sizes.h>
2320 #include <asm/mach/arch.h>
2421 #include <asm/mach/irq.h>
2522
....@@ -147,17 +144,18 @@
147144 #endif /* CONFIG_AX88796 */
148145
149146 #if defined(CONFIG_USB_PXA27X)||defined(CONFIG_USB_PXA27X_MODULE)
150
-static struct gpio_vbus_mach_info colibri_pxa320_gpio_vbus_info = {
151
- .gpio_vbus = mfp_to_gpio(MFP_PIN_GPIO96),
152
- .gpio_pullup = -1,
147
+static struct gpiod_lookup_table gpio_vbus_gpiod_table = {
148
+ .dev_id = "gpio-vbus",
149
+ .table = {
150
+ GPIO_LOOKUP("gpio-pxa", MFP_PIN_GPIO96,
151
+ "vbus", GPIO_ACTIVE_HIGH),
152
+ { },
153
+ },
153154 };
154155
155156 static struct platform_device colibri_pxa320_gpio_vbus = {
156157 .name = "gpio-vbus",
157158 .id = -1,
158
- .dev = {
159
- .platform_data = &colibri_pxa320_gpio_vbus_info,
160
- },
161159 };
162160
163161 static void colibri_pxa320_udc_command(int cmd)
....@@ -176,6 +174,7 @@
176174 static void __init colibri_pxa320_init_udc(void)
177175 {
178176 pxa_set_udc_info(&colibri_pxa320_udc_info);
177
+ gpiod_add_lookup_table(&gpio_vbus_gpiod_table);
179178 platform_device_register(&colibri_pxa320_gpio_vbus);
180179 }
181180 #else