linux_dsm_epyc7002/drivers/usb/gadget
David Brownell 19e2068015 usb gadget: new "CDC Composite" gadget driver
This is a simple example of a composite gadget, combining two
Communications Class Device (CDC) functions:  ECM and ACM.

This provides a clear example of how the composite gadget framework
is intended to work.  It's surprising that MS-Windows (or at least,
XP and previous) won't "just work" with something this simple...

One /proc/bus/usb/devices listing looks like:

  T:  Bus=03 Lev=01 Prnt=01 Port=00 Cnt=01 Dev#= 46 Spd=480 MxCh= 0
  D:  Ver= 2.00 Cls=02(comm.) Sub=00 Prot=00 MxPS=64 #Cfgs=  1
  P:  Vendor=0525 ProdID=a4aa Rev= 3.01
  S:  Manufacturer=Linux 2.6.26-rc6-pnut with net2280
  S:  Product=CDC Composite Gadget
  C:* #Ifs= 4 Cfg#= 1 Atr=c0 MxPwr=  2mA
  I:* If#= 0 Alt= 0 #EPs= 1 Cls=02(comm.) Sub=06 Prot=00 Driver=cdc_ether
  E:  Ad=83(I) Atr=03(Int.) MxPS=  16 Ivl=32ms
  I:  If#= 1 Alt= 0 #EPs= 0 Cls=0a(data ) Sub=00 Prot=00 Driver=cdc_ether
  I:* If#= 1 Alt= 1 #EPs= 2 Cls=0a(data ) Sub=00 Prot=00 Driver=cdc_ether
  E:  Ad=81(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms
  E:  Ad=02(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms
  I:* If#= 2 Alt= 0 #EPs= 1 Cls=02(comm.) Sub=02 Prot=01 Driver=cdc_acm
  E:  Ad=86(I) Atr=03(Int.) MxPS=   8 Ivl=32ms
  I:* If#= 3 Alt= 0 #EPs= 2 Cls=0a(data ) Sub=00 Prot=00 Driver=cdc_acm
  E:  Ad=84(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms
  E:  Ad=05(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms

Not all USB peripheral controller hardware can support this driver.
All the highspeed-capable peripheral controllers with drivers now in
the mainline kernel seem to support this, as does omap_udc.  But
many full speed controllers don't have enough endpoints, or (as with
the PXA controllers) don't support altsettings.

Lightly tested.

Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2008-07-21 15:16:16 -07:00
..
amd5536udc.c USB: usb dev_set_name() instead of dev->bus_id 2008-07-21 15:15:47 -07:00
amd5536udc.h USB: amd5536 UDC driver (in GEODE southbridge) 2007-07-19 17:46:05 -07:00
at91_udc.c USB: at91_udc: updated fifo sizes 2008-07-21 15:15:58 -07:00
at91_udc.h USB: at91_udc uses generic GPIO calls; minor cleanup 2008-02-01 14:35:01 -08:00
atmel_usba_udc.c USB: atmel_usba_udc fixes, mostly disconnect() 2008-05-14 10:00:30 -07:00
atmel_usba_udc.h atmel_usba_udc: Add support for AT91CAP9 UDPHS 2008-04-06 17:25:06 -04:00
cdc2.c usb gadget: new "CDC Composite" gadget driver 2008-07-21 15:16:16 -07:00
composite.c usb gadget: composite gadget core 2008-07-21 15:16:01 -07:00
config.c usb gadget: descriptor copying support 2008-07-21 15:16:00 -07:00
dummy_hcd.c USB: usb dev_set_name() instead of dev->bus_id 2008-07-21 15:15:47 -07:00
epautoconf.c usb gadget: descriptor copying support 2008-07-21 15:16:00 -07:00
ether.c usb gadget: RNDIS cleanups 2008-07-21 15:16:10 -07:00
f_acm.c usb gadget serial: split out CDC ACM function 2008-07-21 15:16:06 -07:00
f_ecm.c usb ethernet gadget: split CDC Ethernet function 2008-07-21 15:16:13 -07:00
f_loopback.c usb gadget zero: split out loopback config 2008-07-21 15:16:03 -07:00
f_rndis.c usb ethernet gadget: split RNDIS function 2008-07-21 15:16:15 -07:00
f_serial.c usb gadget serial: split out generic serial function 2008-07-21 15:16:07 -07:00
f_sourcesink.c usb gadget zero: split out source/sink config 2008-07-21 15:16:02 -07:00
f_subset.c usb ethernet gadget: split CDC Subset function 2008-07-21 15:16:13 -07:00
file_storage.c USB: usb dev_set_name() instead of dev->bus_id 2008-07-21 15:15:47 -07:00
fsl_usb2_udc.c USB: usb dev_set_name() instead of dev->bus_id 2008-07-21 15:15:47 -07:00
fsl_usb2_udc.h USB: replace remaining __FUNCTION__ occurrences 2008-04-24 21:16:55 -07:00
g_zero.h usb gadget zero: split out loopback config 2008-07-21 15:16:03 -07:00
gadget_chips.h usb ethernet gadget: split CDC Ethernet function 2008-07-21 15:16:13 -07:00
gmidi.c drivers/usb annotations and fixes 2008-04-28 10:03:31 -07:00
goku_udc.c USB: usb dev_set_name() instead of dev->bus_id 2008-07-21 15:15:47 -07:00
goku_udc.h USB: goku_udc trivial cleanups 2007-07-12 16:34:43 -07:00
inode.c [ARM] 5120/1: pxa: correct platform driver names for PXA25x and PXA27x UDC drivers 2008-07-09 21:30:13 +01:00
Kconfig usb gadget: new "CDC Composite" gadget driver 2008-07-21 15:16:16 -07:00
lh7a40x_udc.c USB: usb dev_name() instead of dev->bus_id 2008-07-21 15:15:46 -07:00
lh7a40x_udc.h USB: move <linux/usb_gadget.h> to <linux/usb/gadget.h> 2007-10-12 14:55:31 -07:00
m66592-udc.c USB: usb dev_set_name() instead of dev->bus_id 2008-07-21 15:15:47 -07:00
m66592-udc.h drivers/usb annotations and fixes 2008-04-28 10:03:31 -07:00
Makefile usb gadget: new "CDC Composite" gadget driver 2008-07-21 15:16:16 -07:00
ndis.h usb gadget: RNDIS cleanups 2008-07-21 15:16:10 -07:00
net2280.c USB: usb dev_set_name() instead of dev->bus_id 2008-07-21 15:15:47 -07:00
net2280.h USB: replace remaining __FUNCTION__ occurrences 2008-04-24 21:16:55 -07:00
omap_udc.c USB: usb dev_set_name() instead of dev->bus_id 2008-07-21 15:15:47 -07:00
omap_udc.h ARM: OMAP: USB: Change omap USB code to use omap_read/write instead of __REG 2008-07-03 12:24:43 +03:00
printer.c printer gadget: BKL pushdown 2008-06-20 14:05:52 -06:00
pxa25x_udc.c USB: usb dev_name() instead of dev->bus_id 2008-07-21 15:15:46 -07:00
pxa25x_udc.h [ARM] 5120/1: pxa: correct platform driver names for PXA25x and PXA27x UDC drivers 2008-07-09 21:30:13 +01:00
pxa27x_udc.c [ARM] Merge most of the PXA work for initial merge 2008-07-14 23:34:46 +01:00
pxa27x_udc.h [ARM] 5080/1: touch PSSR_OTGPH only on pxa27x in ohci-pxa27x and pxa27x_udc 2008-06-15 19:54:23 +01:00
rndis.c usb gadget: RNDIS cleanups 2008-07-21 15:16:10 -07:00
rndis.h usb gadget: RNDIS cleanups 2008-07-21 15:16:10 -07:00
s3c2410_udc.c usb gadget: fix platform driver hotplug/coldplug 2008-04-11 08:06:43 -07:00
s3c2410_udc.h USB Gadget driver for Samsung s3c2410 ARM SoC 2007-07-12 16:34:30 -07:00
serial.c usb gadget serial: use composite gadget framework 2008-07-21 15:16:09 -07:00
u_ether.c usb ethernet gadget: split out network core 2008-07-21 15:16:12 -07:00
u_ether.h usb ethernet gadget: split RNDIS function 2008-07-21 15:16:15 -07:00
u_serial.c usb gadget: split out serial core 2008-07-21 15:15:59 -07:00
u_serial.h usb gadget serial: use composite gadget framework 2008-07-21 15:16:09 -07:00
usbstring.c usb: use get/put_unaligned_* helpers 2008-04-29 08:06:28 -07:00
zero.c usb gadget zero: use composite gadget framework 2008-07-21 15:16:04 -07:00