^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1) # SPDX-License-Identifier: GPL-2.0
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 2) #
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 3) # USB Gadget support on a system involves
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 4) # (a) a peripheral controller, and
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 5) # (b) the gadget driver using it.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 6) #
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 7) # NOTE: Gadget support ** DOES NOT ** depend on host-side CONFIG_USB !!
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 8) #
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 9) # - Host systems (like PCs) need CONFIG_USB (with "A" jacks).
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 10) # - Peripherals (like PDAs) need CONFIG_USB_GADGET (with "B" jacks).
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 11) # - Some systems have both kinds of controllers.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 12) #
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 13) # With help from a special transceiver and a "Mini-AB" jack, systems with
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 14) # both kinds of controller can also support "USB On-the-Go" (CONFIG_USB_OTG).
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 15) #
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 16) # A Linux "Gadget Driver" talks to the USB Peripheral Controller
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 17) # driver through the abstract "gadget" API. Some other operating
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 18) # systems call these "client" drivers, of which "class drivers"
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 19) # are a subset (implementing a USB device class specification).
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 20) # A gadget driver implements one or more USB functions using
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 21) # the peripheral hardware.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 22) #
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 23) # Gadget drivers are hardware-neutral, or "platform independent",
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 24) # except that they sometimes must understand quirks or limitations
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 25) # of the particular controllers they work with. For example, when
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 26) # a controller doesn't support alternate configurations or provide
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 27) # enough of the right types of endpoints, the gadget driver might
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 28) # not be able work with that controller, or might need to implement
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 29) # a less common variant of a device class protocol.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 30) #
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 31) # The available choices each represent a single precomposed USB
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 32) # gadget configuration. In the device model, each option contains
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 33) # both the device instantiation as a child for a USB gadget
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 34) # controller, and the relevant drivers for each function declared
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 35) # by the device.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 36)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 37) menu "USB Gadget precomposed configurations"
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 38)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 39) config USB_ZERO
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 40) tristate "Gadget Zero (DEVELOPMENT)"
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 41) select USB_LIBCOMPOSITE
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 42) select USB_F_SS_LB
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 43) help
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 44) Gadget Zero is a two-configuration device. It either sinks and
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 45) sources bulk data; or it loops back a configurable number of
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 46) transfers. It also implements control requests, for "chapter 9"
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 47) conformance. The driver needs only two bulk-capable endpoints, so
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 48) it can work on top of most device-side usb controllers. It's
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 49) useful for testing, and is also a working example showing how
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 50) USB "gadget drivers" can be written.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 51)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 52) Make this be the first driver you try using on top of any new
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 53) USB peripheral controller driver. Then you can use host-side
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 54) test software, like the "usbtest" driver, to put your hardware
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 55) and its driver through a basic set of functional tests.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 56)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 57) Gadget Zero also works with the host-side "usb-skeleton" driver,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 58) and with many kinds of host-side test software. You may need
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 59) to tweak product and vendor IDs before host software knows about
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 60) this device, and arrange to select an appropriate configuration.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 61)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 62) Say "y" to link the driver statically, or "m" to build a
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 63) dynamically linked module called "g_zero".
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 64)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 65) config USB_ZERO_HNPTEST
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 66) bool "HNP Test Device"
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 67) depends on USB_ZERO && USB_OTG
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 68) help
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 69) You can configure this device to enumerate using the device
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 70) identifiers of the USB-OTG test device. That means that when
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 71) this gadget connects to another OTG device, with this one using
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 72) the "B-Peripheral" role, that device will use HNP to let this
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 73) one serve as the USB host instead (in the "B-Host" role).
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 74)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 75) config USB_AUDIO
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 76) tristate "Audio Gadget"
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 77) depends on SND
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 78) select USB_LIBCOMPOSITE
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 79) select SND_PCM
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 80) select USB_F_UAC1 if (GADGET_UAC1 && !GADGET_UAC1_LEGACY)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 81) select USB_F_UAC1_LEGACY if (GADGET_UAC1 && GADGET_UAC1_LEGACY)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 82) select USB_F_UAC2 if !GADGET_UAC1
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 83) select USB_U_AUDIO if (USB_F_UAC2 || USB_F_UAC1)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 84) help
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 85) This Gadget Audio driver is compatible with USB Audio Class
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 86) specification 2.0. It implements 1 AudioControl interface,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 87) 1 AudioStreaming Interface each for USB-OUT and USB-IN.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 88) Number of channels, sample rate and sample size can be
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 89) specified as module parameters.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 90) This driver doesn't expect any real Audio codec to be present
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 91) on the device - the audio streams are simply sinked to and
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 92) sourced from a virtual ALSA sound card created. The user-space
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 93) application may choose to do whatever it wants with the data
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 94) received from the USB Host and choose to provide whatever it
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 95) wants as audio data to the USB Host.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 96)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 97) Say "y" to link the driver statically, or "m" to build a
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 98) dynamically linked module called "g_audio".
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 99)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 100) config GADGET_UAC1
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 101) bool "UAC 1.0"
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 102) depends on USB_AUDIO
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 103) help
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 104) If you instead want older USB Audio Class specification 1.0 support
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 105) with similar driver capabilities.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 106)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 107) config GADGET_UAC1_LEGACY
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 108) bool "UAC 1.0 (Legacy)"
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 109) depends on GADGET_UAC1
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 110) help
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 111) If you instead want legacy UAC Spec-1.0 driver that also has audio
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 112) paths hardwired to the Audio codec chip on-board and doesn't work
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 113) without one.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 114)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 115) config USB_ETH
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 116) tristate "Ethernet Gadget (with CDC Ethernet support)"
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 117) depends on NET
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 118) select USB_LIBCOMPOSITE
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 119) select USB_U_ETHER
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 120) select USB_F_ECM
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 121) select USB_F_SUBSET
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 122) select CRC32
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 123) help
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 124) This driver implements Ethernet style communication, in one of
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 125) several ways:
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 126)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 127) - The "Communication Device Class" (CDC) Ethernet Control Model.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 128) That protocol is often avoided with pure Ethernet adapters, in
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 129) favor of simpler vendor-specific hardware, but is widely
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 130) supported by firmware for smart network devices.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 131)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 132) - On hardware can't implement that protocol, a simple CDC subset
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 133) is used, placing fewer demands on USB.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 134)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 135) - CDC Ethernet Emulation Model (EEM) is a newer standard that has
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 136) a simpler interface that can be used by more USB hardware.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 137)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 138) RNDIS support is an additional option, more demanding than subset.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 139)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 140) Within the USB device, this gadget driver exposes a network device
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 141) "usbX", where X depends on what other networking devices you have.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 142) Treat it like a two-node Ethernet link: host, and gadget.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 143)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 144) The Linux-USB host-side "usbnet" driver interoperates with this
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 145) driver, so that deep I/O queues can be supported. On 2.4 kernels,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 146) use "CDCEther" instead, if you're using the CDC option. That CDC
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 147) mode should also interoperate with standard CDC Ethernet class
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 148) drivers on other host operating systems.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 149)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 150) Say "y" to link the driver statically, or "m" to build a
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 151) dynamically linked module called "g_ether".
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 152)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 153) config USB_ETH_RNDIS
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 154) bool "RNDIS support"
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 155) depends on USB_ETH
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 156) select USB_LIBCOMPOSITE
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 157) select USB_F_RNDIS
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 158) default y
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 159) help
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 160) Microsoft Windows XP bundles the "Remote NDIS" (RNDIS) protocol,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 161) and Microsoft provides redistributable binary RNDIS drivers for
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 162) older versions of Windows.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 163)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 164) If you say "y" here, the Ethernet gadget driver will try to provide
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 165) a second device configuration, supporting RNDIS to talk to such
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 166) Microsoft USB hosts.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 167)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 168) To make MS-Windows work with this, use Documentation/usb/linux.inf
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 169) as the "driver info file". For versions of MS-Windows older than
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 170) XP, you'll need to download drivers from Microsoft's website; a URL
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 171) is given in comments found in that info file.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 172)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 173) config USB_ETH_EEM
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 174) bool "Ethernet Emulation Model (EEM) support"
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 175) depends on USB_ETH
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 176) select USB_LIBCOMPOSITE
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 177) select USB_F_EEM
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 178) help
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 179) CDC EEM is a newer USB standard that is somewhat simpler than CDC ECM
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 180) and therefore can be supported by more hardware. Technically ECM and
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 181) EEM are designed for different applications. The ECM model extends
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 182) the network interface to the target (e.g. a USB cable modem), and the
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 183) EEM model is for mobile devices to communicate with hosts using
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 184) ethernet over USB. For Linux gadgets, however, the interface with
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 185) the host is the same (a usbX device), so the differences are minimal.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 186)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 187) If you say "y" here, the Ethernet gadget driver will use the EEM
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 188) protocol rather than ECM. If unsure, say "n".
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 189)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 190) config USB_G_NCM
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 191) tristate "Network Control Model (NCM) support"
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 192) depends on NET
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 193) select USB_LIBCOMPOSITE
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 194) select USB_U_ETHER
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 195) select USB_F_NCM
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 196) select CRC32
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 197) help
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 198) This driver implements USB CDC NCM subclass standard. NCM is
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 199) an advanced protocol for Ethernet encapsulation, allows grouping
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 200) of several ethernet frames into one USB transfer and different
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 201) alignment possibilities.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 202)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 203) Say "y" to link the driver statically, or "m" to build a
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 204) dynamically linked module called "g_ncm".
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 205)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 206) config USB_GADGETFS
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 207) tristate "Gadget Filesystem"
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 208) help
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 209) This driver provides a filesystem based API that lets user mode
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 210) programs implement a single-configuration USB device, including
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 211) endpoint I/O and control requests that don't relate to enumeration.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 212) All endpoints, transfer speeds, and transfer types supported by
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 213) the hardware are available, through read() and write() calls.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 214)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 215) Say "y" to link the driver statically, or "m" to build a
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 216) dynamically linked module called "gadgetfs".
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 217)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 218) config USB_FUNCTIONFS
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 219) tristate "Function Filesystem"
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 220) select USB_LIBCOMPOSITE
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 221) select USB_F_FS
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 222) select USB_FUNCTIONFS_GENERIC if !(USB_FUNCTIONFS_ETH || USB_FUNCTIONFS_RNDIS)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 223) help
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 224) The Function Filesystem (FunctionFS) lets one create USB
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 225) composite functions in user space in the same way GadgetFS
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 226) lets one create USB gadgets in user space. This allows creation
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 227) of composite gadgets such that some of the functions are
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 228) implemented in kernel space (for instance Ethernet, serial or
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 229) mass storage) and other are implemented in user space.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 230)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 231) If you say "y" or "m" here you will be able what kind of
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 232) configurations the gadget will provide.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 233)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 234) Say "y" to link the driver statically, or "m" to build
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 235) a dynamically linked module called "g_ffs".
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 236)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 237) config USB_FUNCTIONFS_ETH
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 238) bool "Include configuration with CDC ECM (Ethernet)"
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 239) depends on USB_FUNCTIONFS && NET
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 240) select USB_U_ETHER
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 241) select USB_F_ECM
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 242) select USB_F_SUBSET
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 243) help
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 244) Include a configuration with CDC ECM function (Ethernet) and the
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 245) Function Filesystem.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 246)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 247) config USB_FUNCTIONFS_RNDIS
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 248) bool "Include configuration with RNDIS (Ethernet)"
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 249) depends on USB_FUNCTIONFS && NET
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 250) select USB_U_ETHER
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 251) select USB_F_RNDIS
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 252) help
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 253) Include a configuration with RNDIS function (Ethernet) and the Filesystem.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 254)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 255) config USB_FUNCTIONFS_GENERIC
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 256) bool "Include 'pure' configuration"
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 257) depends on USB_FUNCTIONFS
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 258) help
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 259) Include a configuration with the Function Filesystem alone with
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 260) no Ethernet interface.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 261)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 262) config USB_MASS_STORAGE
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 263) tristate "Mass Storage Gadget"
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 264) depends on BLOCK
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 265) select USB_LIBCOMPOSITE
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 266) select USB_F_MASS_STORAGE
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 267) help
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 268) The Mass Storage Gadget acts as a USB Mass Storage disk drive.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 269) As its storage repository it can use a regular file or a block
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 270) device (in much the same way as the "loop" device driver),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 271) specified as a module parameter or sysfs option.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 272)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 273) This driver is a replacement for now removed File-backed
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 274) Storage Gadget (g_file_storage).
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 275)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 276) Say "y" to link the driver statically, or "m" to build
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 277) a dynamically linked module called "g_mass_storage".
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 278)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 279) config USB_GADGET_TARGET
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 280) tristate "USB Gadget Target Fabric Module"
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 281) depends on TARGET_CORE
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 282) select USB_LIBCOMPOSITE
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 283) select USB_F_TCM
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 284) help
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 285) This fabric is an USB gadget. Two USB protocols are supported that is
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 286) BBB or BOT (Bulk Only Transport) and UAS (USB Attached SCSI). BOT is
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 287) advertised on alternative interface 0 (primary) and UAS is on
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 288) alternative interface 1. Both protocols can work on USB2.0 and USB3.0.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 289) UAS utilizes the USB 3.0 feature called streams support.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 290)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 291) config USB_G_SERIAL
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 292) tristate "Serial Gadget (with CDC ACM and CDC OBEX support)"
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 293) depends on TTY
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 294) select USB_U_SERIAL
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 295) select USB_F_ACM
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 296) select USB_F_SERIAL
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 297) select USB_F_OBEX
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 298) select USB_LIBCOMPOSITE
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 299) help
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 300) The Serial Gadget talks to the Linux-USB generic serial driver.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 301) This driver supports a CDC-ACM module option, which can be used
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 302) to interoperate with MS-Windows hosts or with the Linux-USB
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 303) "cdc-acm" driver.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 304)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 305) This driver also supports a CDC-OBEX option. You will need a
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 306) user space OBEX server talking to /dev/ttyGS*, since the kernel
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 307) itself doesn't implement the OBEX protocol.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 308)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 309) Say "y" to link the driver statically, or "m" to build a
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 310) dynamically linked module called "g_serial".
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 311)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 312) For more information, see Documentation/usb/gadget_serial.rst
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 313) which includes instructions and a "driver info file" needed to
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 314) make MS-Windows work with CDC ACM.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 315)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 316) config USB_MIDI_GADGET
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 317) tristate "MIDI Gadget"
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 318) depends on SND
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 319) select USB_LIBCOMPOSITE
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 320) select SND_RAWMIDI
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 321) select USB_F_MIDI
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 322) help
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 323) The MIDI Gadget acts as a USB Audio device, with one MIDI
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 324) input and one MIDI output. These MIDI jacks appear as
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 325) a sound "card" in the ALSA sound system. Other MIDI
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 326) connections can then be made on the gadget system, using
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 327) ALSA's aconnect utility etc.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 328)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 329) Say "y" to link the driver statically, or "m" to build a
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 330) dynamically linked module called "g_midi".
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 331)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 332) config USB_G_PRINTER
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 333) tristate "Printer Gadget"
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 334) select USB_LIBCOMPOSITE
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 335) select USB_F_PRINTER
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 336) help
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 337) The Printer Gadget channels data between the USB host and a
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 338) userspace program driving the print engine. The user space
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 339) program reads and writes the device file /dev/g_printer to
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 340) receive or send printer data. It can use ioctl calls to
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 341) the device file to get or set printer status.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 342)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 343) Say "y" to link the driver statically, or "m" to build a
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 344) dynamically linked module called "g_printer".
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 345)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 346) For more information, see Documentation/usb/gadget_printer.rst
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 347) which includes sample code for accessing the device file.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 348)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 349) if TTY
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 350)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 351) config USB_CDC_COMPOSITE
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 352) tristate "CDC Composite Device (Ethernet and ACM)"
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 353) depends on NET
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 354) select USB_LIBCOMPOSITE
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 355) select USB_U_SERIAL
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 356) select USB_U_ETHER
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 357) select USB_F_ACM
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 358) select USB_F_ECM
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 359) help
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 360) This driver provides two functions in one configuration:
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 361) a CDC Ethernet (ECM) link, and a CDC ACM (serial port) link.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 362)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 363) This driver requires four bulk and two interrupt endpoints,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 364) plus the ability to handle altsettings. Not all peripheral
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 365) controllers are that capable.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 366)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 367) Say "y" to link the driver statically, or "m" to build a
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 368) dynamically linked module.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 369)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 370) config USB_G_NOKIA
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 371) tristate "Nokia composite gadget"
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 372) depends on PHONET
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 373) depends on BLOCK
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 374) select USB_LIBCOMPOSITE
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 375) select USB_U_SERIAL
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 376) select USB_U_ETHER
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 377) select USB_F_ACM
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 378) select USB_F_OBEX
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 379) select USB_F_PHONET
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 380) select USB_F_ECM
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 381) select USB_F_MASS_STORAGE
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 382) help
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 383) The Nokia composite gadget provides support for acm, obex
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 384) and phonet in only one composite gadget driver.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 385)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 386) It's only really useful for N900 hardware. If you're building
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 387) a kernel for N900, say Y or M here. If unsure, say N.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 388)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 389) config USB_G_ACM_MS
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 390) tristate "CDC Composite Device (ACM and mass storage)"
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 391) depends on BLOCK
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 392) select USB_LIBCOMPOSITE
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 393) select USB_U_SERIAL
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 394) select USB_F_ACM
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 395) select USB_F_MASS_STORAGE
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 396) help
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 397) This driver provides two functions in one configuration:
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 398) a mass storage, and a CDC ACM (serial port) link.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 399)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 400) Say "y" to link the driver statically, or "m" to build a
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 401) dynamically linked module called "g_acm_ms".
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 402)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 403) config USB_G_MULTI
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 404) tristate "Multifunction Composite Gadget"
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 405) depends on BLOCK && NET
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 406) select USB_G_MULTI_CDC if !USB_G_MULTI_RNDIS
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 407) select USB_LIBCOMPOSITE
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 408) select USB_U_SERIAL
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 409) select USB_U_ETHER
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 410) select USB_F_ACM
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 411) select USB_F_MASS_STORAGE
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 412) help
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 413) The Multifunction Composite Gadget provides Ethernet (RNDIS
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 414) and/or CDC Ethernet), mass storage and ACM serial link
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 415) interfaces.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 416)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 417) You will be asked to choose which of the two configurations is
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 418) to be available in the gadget. At least one configuration must
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 419) be chosen to make the gadget usable. Selecting more than one
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 420) configuration will prevent Windows from automatically detecting
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 421) the gadget as a composite gadget, so an INF file will be needed to
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 422) use the gadget.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 423)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 424) Say "y" to link the driver statically, or "m" to build a
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 425) dynamically linked module called "g_multi".
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 426)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 427) config USB_G_MULTI_RNDIS
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 428) bool "RNDIS + CDC Serial + Storage configuration"
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 429) depends on USB_G_MULTI
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 430) select USB_F_RNDIS
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 431) default y
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 432) help
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 433) This option enables a configuration with RNDIS, CDC Serial and
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 434) Mass Storage functions available in the Multifunction Composite
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 435) Gadget. This is the configuration dedicated for Windows since RNDIS
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 436) is Microsoft's protocol.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 437)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 438) If unsure, say "y".
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 439)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 440) config USB_G_MULTI_CDC
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 441) bool "CDC Ethernet + CDC Serial + Storage configuration"
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 442) depends on USB_G_MULTI
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 443) select USB_F_ECM
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 444) help
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 445) This option enables a configuration with CDC Ethernet (ECM), CDC
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 446) Serial and Mass Storage functions available in the Multifunction
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 447) Composite Gadget.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 448)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 449) If unsure, say "y".
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 450)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 451) endif # TTY
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 452)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 453) config USB_G_HID
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 454) tristate "HID Gadget"
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 455) select USB_LIBCOMPOSITE
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 456) select USB_F_HID
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 457) help
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 458) The HID gadget driver provides generic emulation of USB
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 459) Human Interface Devices (HID).
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 460)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 461) For more information, see Documentation/usb/gadget_hid.rst which
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 462) includes sample code for accessing the device files.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 463)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 464) Say "y" to link the driver statically, or "m" to build a
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 465) dynamically linked module called "g_hid".
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 466)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 467) # Standalone / single function gadgets
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 468) config USB_G_DBGP
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 469) tristate "EHCI Debug Device Gadget"
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 470) depends on TTY
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 471) select USB_LIBCOMPOSITE
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 472) help
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 473) This gadget emulates an EHCI Debug device. This is useful when you want
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 474) to interact with an EHCI Debug Port.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 475)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 476) Say "y" to link the driver statically, or "m" to build a
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 477) dynamically linked module called "g_dbgp".
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 478)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 479) if USB_G_DBGP
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 480) choice
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 481) prompt "EHCI Debug Device mode"
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 482) default USB_G_DBGP_SERIAL
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 483)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 484) config USB_G_DBGP_PRINTK
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 485) depends on USB_G_DBGP
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 486) bool "printk"
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 487) help
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 488) Directly printk() received data. No interaction.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 489)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 490) config USB_G_DBGP_SERIAL
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 491) depends on USB_G_DBGP
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 492) select USB_U_SERIAL
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 493) bool "serial"
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 494) help
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 495) Userland can interact using /dev/ttyGSxxx.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 496) endchoice
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 497) endif
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 498)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 499) # put drivers that need isochronous transfer support (for audio
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 500) # or video class gadget drivers), or specific hardware, here.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 501) config USB_G_WEBCAM
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 502) tristate "USB Webcam Gadget"
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 503) depends on VIDEO_V4L2
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 504) select USB_LIBCOMPOSITE
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 505) select VIDEOBUF2_VMALLOC
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 506) select USB_F_UVC
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 507) help
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 508) The Webcam Gadget acts as a composite USB Audio and Video Class
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 509) device. It provides a userspace API to process UVC control requests
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 510) and stream video data to the host.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 511)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 512) Say "y" to link the driver statically, or "m" to build a
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 513) dynamically linked module called "g_webcam".
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 514)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 515) config USB_RAW_GADGET
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 516) tristate "USB Raw Gadget"
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 517) help
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 518) USB Raw Gadget is a kernel module that provides a userspace interface
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 519) for the USB Gadget subsystem. Essentially it allows to emulate USB
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 520) devices from userspace. See Documentation/usb/raw-gadget.rst for
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 521) details.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 522)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 523) Say "y" to link the driver statically, or "m" to build a
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 524) dynamically linked module called "raw_gadget".
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 525)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 526) endmenu