linux/Documentation/usb
Andrey Konovalov a59105f5c9 BACKPORT: usb: gadget: add raw-gadget interface
Conflict: documentation/usb/index.rst is missing.

(Upstream commit f2c2e717642c66f7fe7e5dd69b2e8ff5849f4d10.)

USB Raw Gadget is a kernel module that provides a userspace interface for
the USB Gadget subsystem. Essentially it allows to emulate USB devices
from userspace. Enabled with CONFIG_USB_RAW_GADGET. Raw Gadget is
currently a strictly debugging feature and shouldn't be used in
production.

Raw Gadget is similar to GadgetFS, but provides a more low-level and
direct access to the USB Gadget layer for the userspace. The key
differences are:

1. Every USB request is passed to the userspace to get a response, while
   GadgetFS responds to some USB requests internally based on the provided
   descriptors. However note, that the UDC driver might respond to some
   requests on its own and never forward them to the Gadget layer.

2. GadgetFS performs some sanity checks on the provided USB descriptors,
   while Raw Gadget allows you to provide arbitrary data as responses to
   USB requests.

3. Raw Gadget provides a way to select a UDC device/driver to bind to,
   while GadgetFS currently binds to the first available UDC.

4. Raw Gadget uses predictable endpoint names (handles) across different
   UDCs (as long as UDCs have enough endpoints of each required transfer
   type).

5. Raw Gadget has ioctl-based interface instead of a filesystem-based one.

Reviewed-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Andrey Konovalov <andreyknvl@google.com>
Signed-off-by: Felipe Balbi <balbi@kernel.org>
Bug: 147413187
Signed-off-by: Andrey Konovalov <andreyknvl@google.com>
Change-Id: Ib48759bda0651e685160c532bed55b7335a39034
2020-03-31 17:40:01 +02:00
..
acm.txt docs-rst: usb: update old usbfs-related documentation 2017-04-20 15:30:33 -06:00
authorization.txt usb: interface authorization: Documentation part 2015-09-22 12:08:40 -07:00
chipidea.txt doc: usb: chipidea: Fix typo in 'enumerate' 2017-12-08 17:43:53 +01:00
CREDITS
dwc3.txt doc: fix a few typos 2012-04-05 17:02:52 -07:00
ehci.txt USB: EHCI: Allow users to override 80% max periodic bandwidth 2011-07-08 14:51:33 -07:00
functionfs.txt FunctionFS: enable multiple functions 2012-05-14 09:25:44 -07:00
gadget_configfs.txt doc: usb: Fix typo in gadget_configfs documentation 2018-06-18 12:41:00 +03:00
gadget_hid.txt usb: gadget: hid: add configfs support 2014-11-06 16:18:19 -06:00
gadget_multi.txt Documentation: tiny typo fix in usb/gadget_multi.txt 2016-06-23 08:09:10 -06:00
gadget_printer.txt
gadget_serial.txt docs-rst: usb: update old usbfs-related documentation 2017-04-20 15:30:33 -06:00
gadget-testing.txt Documentation: usb: fix typo in UVC gadgetfs config command 2018-01-11 18:39:52 +01:00
iuu_phoenix.txt
linux-cdc-acm.inf USB: linux-cdc-acm.inf: add support for the acm_ms gadget 2011-11-29 09:59:29 +09:00
linux.inf USB: gadget: g_multi: fixed vendor and product ID in inf files 2011-04-29 16:45:22 -07:00
mass-storage.txt doc: spelling error changes 2014-05-05 15:32:05 +02:00
misc_usbsevseg.txt USB: Added driver for a Delcom USB 7-segment LED Display 2008-10-17 14:40:51 -07:00
mtouchusb.txt Documentation: Fix Broken URL "freshmeat" 2012-02-21 11:43:45 +01:00
ohci.txt
raw-gadget.rst BACKPORT: usb: gadget: add raw-gadget interface 2020-03-31 17:40:01 +02:00
usb-help.txt
usb-serial.txt USB: serial: clean up kl5kusb105 documentation 2018-07-11 10:14:06 +02:00
usbdevfs-drop-permissions.c usb: devio: Add ioctl to disallow detaching kernel USB drivers. 2016-03-05 12:05:01 -08:00
usbip_protocol.txt USB: remove the URB_NO_FSBR flag 2017-12-12 13:16:07 +01:00
usbmon.txt doc: usbmon: fix spelling s/unpriviledged/unprivileged/ 2015-01-09 12:25:54 -08:00
wusb-cbaf doc: fix a few typos 2012-04-05 17:02:52 -07:00
WUSB-Design-overview.txt usb: hub: rename khubd to hub_wq in documentation and comments 2014-09-23 22:33:19 -07:00