mirror of
https://mirrors.bfsu.edu.cn/git/linux.git
synced 2024-11-19 10:14:23 +08:00
f2c2e71764
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> |
||
---|---|---|
.. | ||
acm.rst | ||
authorization.rst | ||
chipidea.rst | ||
CREDITS | ||
dwc3.rst | ||
ehci.rst | ||
functionfs.rst | ||
gadget_configfs.rst | ||
gadget_hid.rst | ||
gadget_multi.rst | ||
gadget_printer.rst | ||
gadget_serial.rst | ||
gadget-testing.rst | ||
index.rst | ||
iuu_phoenix.rst | ||
linux-cdc-acm.inf | ||
linux.inf | ||
mass-storage.rst | ||
misc_usbsevseg.rst | ||
mtouchusb.rst | ||
ohci.rst | ||
raw-gadget.rst | ||
text_files.rst | ||
usb-help.rst | ||
usb-serial.rst | ||
usbdevfs-drop-permissions.c | ||
usbip_protocol.rst | ||
usbmon.rst |