.. | .. |
---|
| 1 | +// SPDX-License-Identifier: GPL-2.0-only |
---|
1 | 2 | /* |
---|
2 | 3 | * arch/arm/mach-pxa/colibri-pxa320.c |
---|
3 | 4 | * |
---|
.. | .. |
---|
5 | 6 | * |
---|
6 | 7 | * Daniel Mack <daniel@caiaq.de> |
---|
7 | 8 | * 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. |
---|
12 | 9 | */ |
---|
13 | 10 | |
---|
14 | 11 | #include <linux/init.h> |
---|
15 | 12 | #include <linux/kernel.h> |
---|
16 | 13 | #include <linux/platform_device.h> |
---|
| 14 | +#include <linux/gpio/machine.h> |
---|
17 | 15 | #include <linux/gpio.h> |
---|
18 | 16 | #include <linux/interrupt.h> |
---|
19 | | -#include <linux/usb/gpio_vbus.h> |
---|
20 | 17 | |
---|
21 | 18 | #include <asm/mach-types.h> |
---|
22 | | -#include <asm/sizes.h> |
---|
| 19 | +#include <linux/sizes.h> |
---|
23 | 20 | #include <asm/mach/arch.h> |
---|
24 | 21 | #include <asm/mach/irq.h> |
---|
25 | 22 | |
---|
.. | .. |
---|
147 | 144 | #endif /* CONFIG_AX88796 */ |
---|
148 | 145 | |
---|
149 | 146 | #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 | + }, |
---|
153 | 154 | }; |
---|
154 | 155 | |
---|
155 | 156 | static struct platform_device colibri_pxa320_gpio_vbus = { |
---|
156 | 157 | .name = "gpio-vbus", |
---|
157 | 158 | .id = -1, |
---|
158 | | - .dev = { |
---|
159 | | - .platform_data = &colibri_pxa320_gpio_vbus_info, |
---|
160 | | - }, |
---|
161 | 159 | }; |
---|
162 | 160 | |
---|
163 | 161 | static void colibri_pxa320_udc_command(int cmd) |
---|
.. | .. |
---|
176 | 174 | static void __init colibri_pxa320_init_udc(void) |
---|
177 | 175 | { |
---|
178 | 176 | pxa_set_udc_info(&colibri_pxa320_udc_info); |
---|
| 177 | + gpiod_add_lookup_table(&gpio_vbus_gpiod_table); |
---|
179 | 178 | platform_device_register(&colibri_pxa320_gpio_vbus); |
---|
180 | 179 | } |
---|
181 | 180 | #else |
---|