aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/usb/gadget
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/usb/gadget')
-rw-r--r--drivers/usb/gadget/Kconfig43
-rw-r--r--drivers/usb/gadget/amd5536udc.c1
-rw-r--r--drivers/usb/gadget/audio.c6
-rw-r--r--drivers/usb/gadget/ether.c11
-rw-r--r--drivers/usb/gadget/langwell_udc.c1
-rw-r--r--drivers/usb/gadget/pxa25x_udc.c24
-rw-r--r--drivers/usb/gadget/rndis.c2
-rw-r--r--drivers/usb/gadget/s3c2410_udc.c1
8 files changed, 46 insertions, 43 deletions
diff --git a/drivers/usb/gadget/Kconfig b/drivers/usb/gadget/Kconfig
index 5d1ddf485d1..7f8e83a954a 100644
--- a/drivers/usb/gadget/Kconfig
+++ b/drivers/usb/gadget/Kconfig
@@ -286,6 +286,27 @@ config USB_S3C_HSOTG
286 default USB_GADGET 286 default USB_GADGET
287 select USB_GADGET_SELECTED 287 select USB_GADGET_SELECTED
288 288
289config USB_GADGET_IMX
290 boolean "Freescale IMX USB Peripheral Controller"
291 depends on ARCH_MX1
292 help
293 Freescale's IMX series include an integrated full speed
294 USB 1.1 device controller. The controller in the IMX series
295 is register-compatible.
296
297 It has Six fixed-function endpoints, as well as endpoint
298 zero (for control transfers).
299
300 Say "y" to link the driver statically, or "m" to build a
301 dynamically linked module called "imx_udc" and force all
302 gadget drivers to also be dynamically linked.
303
304config USB_IMX
305 tristate
306 depends on USB_GADGET_IMX
307 default USB_GADGET
308 select USB_GADGET_SELECTED
309
289config USB_GADGET_S3C2410 310config USB_GADGET_S3C2410
290 boolean "S3C2410 USB Device Controller" 311 boolean "S3C2410 USB Device Controller"
291 depends on ARCH_S3C2410 312 depends on ARCH_S3C2410
@@ -321,27 +342,6 @@ config USB_GADGET_MUSB_HDRC
321 This OTG-capable silicon IP is used in dual designs including 342 This OTG-capable silicon IP is used in dual designs including
322 the TI DaVinci, OMAP 243x, OMAP 343x, TUSB 6010, and ADI Blackfin 343 the TI DaVinci, OMAP 243x, OMAP 343x, TUSB 6010, and ADI Blackfin
323 344
324config USB_GADGET_IMX
325 boolean "Freescale IMX USB Peripheral Controller"
326 depends on ARCH_MX1
327 help
328 Freescale's IMX series include an integrated full speed
329 USB 1.1 device controller. The controller in the IMX series
330 is register-compatible.
331
332 It has Six fixed-function endpoints, as well as endpoint
333 zero (for control transfers).
334
335 Say "y" to link the driver statically, or "m" to build a
336 dynamically linked module called "imx_udc" and force all
337 gadget drivers to also be dynamically linked.
338
339config USB_IMX
340 tristate
341 depends on USB_GADGET_IMX
342 default USB_GADGET
343 select USB_GADGET_SELECTED
344
345config USB_GADGET_M66592 345config USB_GADGET_M66592
346 boolean "Renesas M66592 USB Peripheral Controller" 346 boolean "Renesas M66592 USB Peripheral Controller"
347 select USB_GADGET_DUALSPEED 347 select USB_GADGET_DUALSPEED
@@ -604,6 +604,7 @@ config USB_ZERO_HNPTEST
604config USB_AUDIO 604config USB_AUDIO
605 tristate "Audio Gadget (EXPERIMENTAL)" 605 tristate "Audio Gadget (EXPERIMENTAL)"
606 depends on SND 606 depends on SND
607 select SND_PCM
607 help 608 help
608 Gadget Audio is compatible with USB Audio Class specification 1.0. 609 Gadget Audio is compatible with USB Audio Class specification 1.0.
609 It will include at least one AudioControl interface, zero or more 610 It will include at least one AudioControl interface, zero or more
diff --git a/drivers/usb/gadget/amd5536udc.c b/drivers/usb/gadget/amd5536udc.c
index 826f3adde5d..77352ccc245 100644
--- a/drivers/usb/gadget/amd5536udc.c
+++ b/drivers/usb/gadget/amd5536udc.c
@@ -48,7 +48,6 @@
48#include <linux/ioport.h> 48#include <linux/ioport.h>
49#include <linux/sched.h> 49#include <linux/sched.h>
50#include <linux/slab.h> 50#include <linux/slab.h>
51#include <linux/smp_lock.h>
52#include <linux/errno.h> 51#include <linux/errno.h>
53#include <linux/init.h> 52#include <linux/init.h>
54#include <linux/timer.h> 53#include <linux/timer.h>
diff --git a/drivers/usb/gadget/audio.c b/drivers/usb/gadget/audio.c
index 94de7e86461..9f80f4e970b 100644
--- a/drivers/usb/gadget/audio.c
+++ b/drivers/usb/gadget/audio.c
@@ -42,9 +42,9 @@
42 * Instead: allocate your own, using normal USB-IF procedures. 42 * Instead: allocate your own, using normal USB-IF procedures.
43 */ 43 */
44 44
45/* Thanks to NetChip Technologies for donating this product ID. */ 45/* Thanks to Linux Foundation for donating this product ID. */
46#define AUDIO_VENDOR_NUM 0x0525 /* NetChip */ 46#define AUDIO_VENDOR_NUM 0x1d6b /* Linux Foundation */
47#define AUDIO_PRODUCT_NUM 0xa4a1 /* Linux-USB Audio Gadget */ 47#define AUDIO_PRODUCT_NUM 0x0101 /* Linux-USB Audio Gadget */
48 48
49/*-------------------------------------------------------------------------*/ 49/*-------------------------------------------------------------------------*/
50 50
diff --git a/drivers/usb/gadget/ether.c b/drivers/usb/gadget/ether.c
index d006dc652e0..bd102f5052b 100644
--- a/drivers/usb/gadget/ether.c
+++ b/drivers/usb/gadget/ether.c
@@ -293,15 +293,16 @@ static int __init eth_bind(struct usb_composite_dev *cdev)
293 /* CDC Subset */ 293 /* CDC Subset */
294 eth_config_driver.label = "CDC Subset/SAFE"; 294 eth_config_driver.label = "CDC Subset/SAFE";
295 295
296 device_desc.idVendor = cpu_to_le16(SIMPLE_VENDOR_NUM), 296 device_desc.idVendor = cpu_to_le16(SIMPLE_VENDOR_NUM);
297 device_desc.idProduct = cpu_to_le16(SIMPLE_PRODUCT_NUM), 297 device_desc.idProduct = cpu_to_le16(SIMPLE_PRODUCT_NUM);
298 device_desc.bDeviceClass = USB_CLASS_VENDOR_SPEC; 298 if (!has_rndis())
299 device_desc.bDeviceClass = USB_CLASS_VENDOR_SPEC;
299 } 300 }
300 301
301 if (has_rndis()) { 302 if (has_rndis()) {
302 /* RNDIS plus ECM-or-Subset */ 303 /* RNDIS plus ECM-or-Subset */
303 device_desc.idVendor = cpu_to_le16(RNDIS_VENDOR_NUM), 304 device_desc.idVendor = cpu_to_le16(RNDIS_VENDOR_NUM);
304 device_desc.idProduct = cpu_to_le16(RNDIS_PRODUCT_NUM), 305 device_desc.idProduct = cpu_to_le16(RNDIS_PRODUCT_NUM);
305 device_desc.bNumConfigurations = 2; 306 device_desc.bNumConfigurations = 2;
306 } 307 }
307 308
diff --git a/drivers/usb/gadget/langwell_udc.c b/drivers/usb/gadget/langwell_udc.c
index 6829d596135..a3913519fd5 100644
--- a/drivers/usb/gadget/langwell_udc.c
+++ b/drivers/usb/gadget/langwell_udc.c
@@ -34,7 +34,6 @@
34#include <linux/ioport.h> 34#include <linux/ioport.h>
35#include <linux/sched.h> 35#include <linux/sched.h>
36#include <linux/slab.h> 36#include <linux/slab.h>
37#include <linux/smp_lock.h>
38#include <linux/errno.h> 37#include <linux/errno.h>
39#include <linux/init.h> 38#include <linux/init.h>
40#include <linux/timer.h> 39#include <linux/timer.h>
diff --git a/drivers/usb/gadget/pxa25x_udc.c b/drivers/usb/gadget/pxa25x_udc.c
index 0ce4e281984..ed21e263f83 100644
--- a/drivers/usb/gadget/pxa25x_udc.c
+++ b/drivers/usb/gadget/pxa25x_udc.c
@@ -139,7 +139,7 @@ static int is_vbus_present(void)
139{ 139{
140 struct pxa2xx_udc_mach_info *mach = the_controller->mach; 140 struct pxa2xx_udc_mach_info *mach = the_controller->mach;
141 141
142 if (mach->gpio_vbus) { 142 if (gpio_is_valid(mach->gpio_vbus)) {
143 int value = gpio_get_value(mach->gpio_vbus); 143 int value = gpio_get_value(mach->gpio_vbus);
144 144
145 if (mach->gpio_vbus_inverted) 145 if (mach->gpio_vbus_inverted)
@@ -158,7 +158,7 @@ static void pullup_off(void)
158 struct pxa2xx_udc_mach_info *mach = the_controller->mach; 158 struct pxa2xx_udc_mach_info *mach = the_controller->mach;
159 int off_level = mach->gpio_pullup_inverted; 159 int off_level = mach->gpio_pullup_inverted;
160 160
161 if (mach->gpio_pullup) 161 if (gpio_is_valid(mach->gpio_pullup))
162 gpio_set_value(mach->gpio_pullup, off_level); 162 gpio_set_value(mach->gpio_pullup, off_level);
163 else if (mach->udc_command) 163 else if (mach->udc_command)
164 mach->udc_command(PXA2XX_UDC_CMD_DISCONNECT); 164 mach->udc_command(PXA2XX_UDC_CMD_DISCONNECT);
@@ -169,7 +169,7 @@ static void pullup_on(void)
169 struct pxa2xx_udc_mach_info *mach = the_controller->mach; 169 struct pxa2xx_udc_mach_info *mach = the_controller->mach;
170 int on_level = !mach->gpio_pullup_inverted; 170 int on_level = !mach->gpio_pullup_inverted;
171 171
172 if (mach->gpio_pullup) 172 if (gpio_is_valid(mach->gpio_pullup))
173 gpio_set_value(mach->gpio_pullup, on_level); 173 gpio_set_value(mach->gpio_pullup, on_level);
174 else if (mach->udc_command) 174 else if (mach->udc_command)
175 mach->udc_command(PXA2XX_UDC_CMD_CONNECT); 175 mach->udc_command(PXA2XX_UDC_CMD_CONNECT);
@@ -1000,7 +1000,7 @@ static int pxa25x_udc_pullup(struct usb_gadget *_gadget, int is_active)
1000 udc = container_of(_gadget, struct pxa25x_udc, gadget); 1000 udc = container_of(_gadget, struct pxa25x_udc, gadget);
1001 1001
1002 /* not all boards support pullup control */ 1002 /* not all boards support pullup control */
1003 if (!udc->mach->gpio_pullup && !udc->mach->udc_command) 1003 if (!gpio_is_valid(udc->mach->gpio_pullup) && !udc->mach->udc_command)
1004 return -EOPNOTSUPP; 1004 return -EOPNOTSUPP;
1005 1005
1006 udc->pullup = (is_active != 0); 1006 udc->pullup = (is_active != 0);
@@ -1802,11 +1802,13 @@ pxa25x_udc_irq(int irq, void *_dev)
1802 USIR0 |= tmp; 1802 USIR0 |= tmp;
1803 handled = 1; 1803 handled = 1;
1804 } 1804 }
1805#ifndef CONFIG_USB_PXA25X_SMALL
1805 if (usir1 & tmp) { 1806 if (usir1 & tmp) {
1806 handle_ep(&dev->ep[i+8]); 1807 handle_ep(&dev->ep[i+8]);
1807 USIR1 |= tmp; 1808 USIR1 |= tmp;
1808 handled = 1; 1809 handled = 1;
1809 } 1810 }
1811#endif
1810 } 1812 }
1811 } 1813 }
1812 1814
@@ -2160,7 +2162,7 @@ static int __init pxa25x_udc_probe(struct platform_device *pdev)
2160 dev->dev = &pdev->dev; 2162 dev->dev = &pdev->dev;
2161 dev->mach = pdev->dev.platform_data; 2163 dev->mach = pdev->dev.platform_data;
2162 2164
2163 if (dev->mach->gpio_vbus) { 2165 if (gpio_is_valid(dev->mach->gpio_vbus)) {
2164 if ((retval = gpio_request(dev->mach->gpio_vbus, 2166 if ((retval = gpio_request(dev->mach->gpio_vbus,
2165 "pxa25x_udc GPIO VBUS"))) { 2167 "pxa25x_udc GPIO VBUS"))) {
2166 dev_dbg(&pdev->dev, 2168 dev_dbg(&pdev->dev,
@@ -2173,7 +2175,7 @@ static int __init pxa25x_udc_probe(struct platform_device *pdev)
2173 } else 2175 } else
2174 vbus_irq = 0; 2176 vbus_irq = 0;
2175 2177
2176 if (dev->mach->gpio_pullup) { 2178 if (gpio_is_valid(dev->mach->gpio_pullup)) {
2177 if ((retval = gpio_request(dev->mach->gpio_pullup, 2179 if ((retval = gpio_request(dev->mach->gpio_pullup,
2178 "pca25x_udc GPIO PULLUP"))) { 2180 "pca25x_udc GPIO PULLUP"))) {
2179 dev_dbg(&pdev->dev, 2181 dev_dbg(&pdev->dev,
@@ -2256,10 +2258,10 @@ lubbock_fail0:
2256#endif 2258#endif
2257 free_irq(irq, dev); 2259 free_irq(irq, dev);
2258 err_irq1: 2260 err_irq1:
2259 if (dev->mach->gpio_pullup) 2261 if (gpio_is_valid(dev->mach->gpio_pullup))
2260 gpio_free(dev->mach->gpio_pullup); 2262 gpio_free(dev->mach->gpio_pullup);
2261 err_gpio_pullup: 2263 err_gpio_pullup:
2262 if (dev->mach->gpio_vbus) 2264 if (gpio_is_valid(dev->mach->gpio_vbus))
2263 gpio_free(dev->mach->gpio_vbus); 2265 gpio_free(dev->mach->gpio_vbus);
2264 err_gpio_vbus: 2266 err_gpio_vbus:
2265 clk_put(dev->clk); 2267 clk_put(dev->clk);
@@ -2294,11 +2296,11 @@ static int __exit pxa25x_udc_remove(struct platform_device *pdev)
2294 free_irq(LUBBOCK_USB_IRQ, dev); 2296 free_irq(LUBBOCK_USB_IRQ, dev);
2295 } 2297 }
2296#endif 2298#endif
2297 if (dev->mach->gpio_vbus) { 2299 if (gpio_is_valid(dev->mach->gpio_vbus)) {
2298 free_irq(gpio_to_irq(dev->mach->gpio_vbus), dev); 2300 free_irq(gpio_to_irq(dev->mach->gpio_vbus), dev);
2299 gpio_free(dev->mach->gpio_vbus); 2301 gpio_free(dev->mach->gpio_vbus);
2300 } 2302 }
2301 if (dev->mach->gpio_pullup) 2303 if (gpio_is_valid(dev->mach->gpio_pullup))
2302 gpio_free(dev->mach->gpio_pullup); 2304 gpio_free(dev->mach->gpio_pullup);
2303 2305
2304 clk_put(dev->clk); 2306 clk_put(dev->clk);
@@ -2329,7 +2331,7 @@ static int pxa25x_udc_suspend(struct platform_device *dev, pm_message_t state)
2329 struct pxa25x_udc *udc = platform_get_drvdata(dev); 2331 struct pxa25x_udc *udc = platform_get_drvdata(dev);
2330 unsigned long flags; 2332 unsigned long flags;
2331 2333
2332 if (!udc->mach->gpio_pullup && !udc->mach->udc_command) 2334 if (!gpio_is_valid(udc->mach->gpio_pullup) && !udc->mach->udc_command)
2333 WARNING("USB host won't detect disconnect!\n"); 2335 WARNING("USB host won't detect disconnect!\n");
2334 udc->suspended = 1; 2336 udc->suspended = 1;
2335 2337
diff --git a/drivers/usb/gadget/rndis.c b/drivers/usb/gadget/rndis.c
index 2b4660e08c4..ca41b0b5afb 100644
--- a/drivers/usb/gadget/rndis.c
+++ b/drivers/usb/gadget/rndis.c
@@ -442,6 +442,8 @@ gen_ndis_query_resp (int configNr, u32 OID, u8 *buf, unsigned buf_len,
442 442
443 case OID_802_3_MAC_OPTIONS: 443 case OID_802_3_MAC_OPTIONS:
444 pr_debug("%s: OID_802_3_MAC_OPTIONS\n", __func__); 444 pr_debug("%s: OID_802_3_MAC_OPTIONS\n", __func__);
445 *outbuf = cpu_to_le32(0);
446 retval = 0;
445 break; 447 break;
446 448
447 /* ieee802.3 statistics OIDs (table 4-4) */ 449 /* ieee802.3 statistics OIDs (table 4-4) */
diff --git a/drivers/usb/gadget/s3c2410_udc.c b/drivers/usb/gadget/s3c2410_udc.c
index 9a2b8920532..a9b452fe622 100644
--- a/drivers/usb/gadget/s3c2410_udc.c
+++ b/drivers/usb/gadget/s3c2410_udc.c
@@ -28,7 +28,6 @@
28#include <linux/ioport.h> 28#include <linux/ioport.h>
29#include <linux/sched.h> 29#include <linux/sched.h>
30#include <linux/slab.h> 30#include <linux/slab.h>
31#include <linux/smp_lock.h>
32#include <linux/errno.h> 31#include <linux/errno.h>
33#include <linux/init.h> 32#include <linux/init.h>
34#include <linux/timer.h> 33#include <linux/timer.h>