mirror-linux/include/linux/usb
David Brownell 40982be52d usb gadget: composite gadget core
Add <linux/usb/composite.h> interfaces for composite gadget drivers, and
basic implementation support behind it:

  - struct usb_function ... groups one or more interfaces into a function
    managed as one unit within a configuration, to which it's added by
    usb_add_function().

  - struct usb_configuration ... groups one or more such functions into
    a configuration managed as one unit by a driver, to which it's added
    by usb_add_config().  These operate at either high or full/low speeds
    and at a given bMaxPower.

  - struct usb_composite_driver ... groups one or more such configurations
    into a gadget driver, which may be registered or unregistered.

  - struct usb_composite_dev ... a usb_composite_driver manages this; it
    wraps the usb_gadget exposed by the controller driver.

This also includes some basic kerneldoc.

How to use it (the short version):  provide a usb_composite_driver with a
bind() that calls usb_add_config() for each of the needed configurations.
The configurations in turn have bind() calls, which will usb_add_function()
for each function required.  Each function's bind() allocates resources
needed to perform its tasks, like endpoints; sometimes configurations will
allocate resources too.

Separate patches will convert most gadget drivers to this infrastructure.

Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2008-07-21 15:16:01 -07:00
..
Kbuild USB: g_printer.h does not need to be "unifdef"ed. 2008-03-10 16:42:26 -07:00
association.h USB: add association.h 2008-05-14 10:00:26 -07:00
atmel_usba_udc.h atmel_usba_udc: move endpoint declarations into platform data. 2008-04-06 17:15:08 -04:00
audio.h USB: Standardize inclusion protection and add where missing. 2008-04-24 21:16:42 -07:00
c67x00.h USB: add Cypress c67x00 OTG controller core driver 2008-05-02 10:25:56 -07:00
cdc.h USB: CDC WDM driver 2008-05-20 14:14:15 -07:00
ch9.h USB: Add the USB 2.0 extension descriptor. 2008-05-02 10:25:54 -07:00
composite.h usb gadget: composite gadget core 2008-07-21 15:16:01 -07:00
g_printer.h USB: Standardize inclusion protection and add where missing. 2008-04-24 21:16:42 -07:00
gadget.h usb gadget: descriptor copying support 2008-07-21 15:16:00 -07:00
gadgetfs.h USB: Standardize inclusion protection and add where missing. 2008-04-24 21:16:42 -07:00
input.h USB: Standardize inclusion protection and add where missing. 2008-04-24 21:16:42 -07:00
iowarrior.h USB: Standardize inclusion protection and add where missing. 2008-04-24 21:16:42 -07:00
isp116x.h USB: Standardize inclusion protection and add where missing. 2008-04-24 21:16:42 -07:00
midi.h USB: Standardize inclusion protection and add where missing. 2008-04-24 21:16:42 -07:00
net2280.h USB: Standardize inclusion protection and add where missing. 2008-04-24 21:16:42 -07:00
otg.h USB: Standardize inclusion protection and add where missing. 2008-04-24 21:16:42 -07:00
quirks.h USB: Standardize inclusion protection and add where missing. 2008-04-24 21:16:42 -07:00
rndis_host.h rndis_host: pass buffer length to rndis_command 2008-06-28 10:23:34 -04:00
serial.h USB: serial: remove endpoints setting checks from core and header 2008-04-24 21:16:52 -07:00
sl811.h USB: Standardize inclusion protection and add where missing. 2008-04-24 21:16:42 -07:00
usbnet.h USB: Standardize inclusion protection and add where missing. 2008-04-24 21:16:42 -07:00