hc
2023-12-11 d2ccde1c8e90d38cee87a1b0309ad2827f3fd30d
kernel/arch/arm/mach-pxa/gumstix.c
....@@ -1,3 +1,4 @@
1
+// SPDX-License-Identifier: GPL-2.0-only
12 /*
23 * linux/arch/arm/mach-pxa/gumstix.c
34 *
....@@ -6,10 +7,6 @@
67 * Original Author: Craig Hughes
78 * Created: Feb 14, 2008
89 * Copyright: Craig Hughes
9
- *
10
- * This program is free software; you can redistribute it and/or modify
11
- * it under the terms of the GNU General Public License version 2 as
12
- * published by the Free Software Foundation.
1310 *
1411 * Implemented based on lubbock.c by Nicolas Pitre and code from Craig
1512 * Hughes
....@@ -23,17 +20,17 @@
2320 #include <linux/delay.h>
2421 #include <linux/mtd/mtd.h>
2522 #include <linux/mtd/partitions.h>
23
+#include <linux/gpio/machine.h>
2624 #include <linux/gpio.h>
2725 #include <linux/err.h>
2826 #include <linux/clk.h>
29
-#include <linux/usb/gpio_vbus.h>
3027
3128 #include <asm/setup.h>
3229 #include <asm/memory.h>
3330 #include <asm/mach-types.h>
3431 #include <mach/hardware.h>
3532 #include <asm/irq.h>
36
-#include <asm/sizes.h>
33
+#include <linux/sizes.h>
3734
3835 #include <asm/mach/arch.h>
3936 #include <asm/mach/map.h>
....@@ -90,9 +87,6 @@
9087 #ifdef CONFIG_MMC_PXA
9188 static struct pxamci_platform_data gumstix_mci_platform_data = {
9289 .ocr_mask = MMC_VDD_32_33|MMC_VDD_33_34,
93
- .gpio_card_detect = -1,
94
- .gpio_card_ro = -1,
95
- .gpio_power = -1,
9690 };
9791
9892 static void __init gumstix_mmc_init(void)
....@@ -107,21 +101,25 @@
107101 #endif
108102
109103 #ifdef CONFIG_USB_PXA25X
110
-static struct gpio_vbus_mach_info gumstix_udc_info = {
111
- .gpio_vbus = GPIO_GUMSTIX_USB_GPIOn,
112
- .gpio_pullup = GPIO_GUMSTIX_USB_GPIOx,
104
+static struct gpiod_lookup_table gumstix_gpio_vbus_gpiod_table = {
105
+ .dev_id = "gpio-vbus",
106
+ .table = {
107
+ GPIO_LOOKUP("gpio-pxa", GPIO_GUMSTIX_USB_GPIOn,
108
+ "vbus", GPIO_ACTIVE_HIGH),
109
+ GPIO_LOOKUP("gpio-pxa", GPIO_GUMSTIX_USB_GPIOx,
110
+ "pullup", GPIO_ACTIVE_HIGH),
111
+ { },
112
+ },
113113 };
114114
115115 static struct platform_device gumstix_gpio_vbus = {
116116 .name = "gpio-vbus",
117117 .id = -1,
118
- .dev = {
119
- .platform_data = &gumstix_udc_info,
120
- },
121118 };
122119
123120 static void __init gumstix_udc_init(void)
124121 {
122
+ gpiod_add_lookup_table(&gumstix_gpio_vbus_gpiod_table);
125123 platform_device_register(&gumstix_gpio_vbus);
126124 }
127125 #else