summaryrefslogtreecommitdiff
path: root/Documentation/usb/index.rst
diff options
context:
space:
mode:
authorAndrey Konovalov <andreyknvl@google.com>2020-02-24 19:13:03 +0300
committerFelipe Balbi <balbi@kernel.org>2020-03-15 12:34:48 +0300
commitf2c2e717642c66f7fe7e5dd69b2e8ff5849f4d10 (patch)
tree341ca6ae56ee0c879e15f19f814b8acf03f4c165 /Documentation/usb/index.rst
parent1a0808cb9e417170ed6ab97254cf319dc3e3c310 (diff)
downloadlinux-f2c2e717642c66f7fe7e5dd69b2e8ff5849f4d10.tar.xz
usb: gadget: add raw-gadget interface
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>
Diffstat (limited to 'Documentation/usb/index.rst')
-rw-r--r--Documentation/usb/index.rst1
1 files changed, 1 insertions, 0 deletions
diff --git a/Documentation/usb/index.rst b/Documentation/usb/index.rst
index 36b6ebd9a9d9..b656c9be23ed 100644
--- a/Documentation/usb/index.rst
+++ b/Documentation/usb/index.rst
@@ -22,6 +22,7 @@ USB support
misc_usbsevseg
mtouchusb
ohci
+ raw-gadget
usbip_protocol
usbmon
usb-serial