.. | .. |
---|
| 1 | +// SPDX-License-Identifier: GPL-2.0-only |
---|
1 | 2 | /* |
---|
2 | 3 | * linux/arch/arm/mach-pxa/gumstix.c |
---|
3 | 4 | * |
---|
.. | .. |
---|
6 | 7 | * Original Author: Craig Hughes |
---|
7 | 8 | * Created: Feb 14, 2008 |
---|
8 | 9 | * 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. |
---|
13 | 10 | * |
---|
14 | 11 | * Implemented based on lubbock.c by Nicolas Pitre and code from Craig |
---|
15 | 12 | * Hughes |
---|
.. | .. |
---|
23 | 20 | #include <linux/delay.h> |
---|
24 | 21 | #include <linux/mtd/mtd.h> |
---|
25 | 22 | #include <linux/mtd/partitions.h> |
---|
| 23 | +#include <linux/gpio/machine.h> |
---|
26 | 24 | #include <linux/gpio.h> |
---|
27 | 25 | #include <linux/err.h> |
---|
28 | 26 | #include <linux/clk.h> |
---|
29 | | -#include <linux/usb/gpio_vbus.h> |
---|
30 | 27 | |
---|
31 | 28 | #include <asm/setup.h> |
---|
32 | 29 | #include <asm/memory.h> |
---|
33 | 30 | #include <asm/mach-types.h> |
---|
34 | 31 | #include <mach/hardware.h> |
---|
35 | 32 | #include <asm/irq.h> |
---|
36 | | -#include <asm/sizes.h> |
---|
| 33 | +#include <linux/sizes.h> |
---|
37 | 34 | |
---|
38 | 35 | #include <asm/mach/arch.h> |
---|
39 | 36 | #include <asm/mach/map.h> |
---|
.. | .. |
---|
90 | 87 | #ifdef CONFIG_MMC_PXA |
---|
91 | 88 | static struct pxamci_platform_data gumstix_mci_platform_data = { |
---|
92 | 89 | .ocr_mask = MMC_VDD_32_33|MMC_VDD_33_34, |
---|
93 | | - .gpio_card_detect = -1, |
---|
94 | | - .gpio_card_ro = -1, |
---|
95 | | - .gpio_power = -1, |
---|
96 | 90 | }; |
---|
97 | 91 | |
---|
98 | 92 | static void __init gumstix_mmc_init(void) |
---|
.. | .. |
---|
107 | 101 | #endif |
---|
108 | 102 | |
---|
109 | 103 | #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 | + }, |
---|
113 | 113 | }; |
---|
114 | 114 | |
---|
115 | 115 | static struct platform_device gumstix_gpio_vbus = { |
---|
116 | 116 | .name = "gpio-vbus", |
---|
117 | 117 | .id = -1, |
---|
118 | | - .dev = { |
---|
119 | | - .platform_data = &gumstix_udc_info, |
---|
120 | | - }, |
---|
121 | 118 | }; |
---|
122 | 119 | |
---|
123 | 120 | static void __init gumstix_udc_init(void) |
---|
124 | 121 | { |
---|
| 122 | + gpiod_add_lookup_table(&gumstix_gpio_vbus_gpiod_table); |
---|
125 | 123 | platform_device_register(&gumstix_gpio_vbus); |
---|
126 | 124 | } |
---|
127 | 125 | #else |
---|