2 # USB Gadget support on a system involves
3 # (a) a peripheral controller, and
4 # (b) the gadget driver using it.
6 # NOTE: Gadget support ** DOES NOT ** depend on host-side CONFIG_USB !!
8 # - Host systems (like PCs) need CONFIG_USB (with "A" jacks).
9 # - Peripherals (like PDAs) need CONFIG_USB_GADGET (with "B" jacks).
10 # - Some systems have both kinds of controllers.
12 # With help from a special transceiver and a "Mini-AB" jack, systems with
13 # both kinds of controller can also support "USB On-the-Go" (CONFIG_USB_OTG).
17 tristate "Gadget Zero (DEVELOPMENT)"
18 select USB_LIBCOMPOSITE
21 Gadget Zero is a two-configuration device. It either sinks and
22 sources bulk data; or it loops back a configurable number of
23 transfers. It also implements control requests, for "chapter 9"
24 conformance. The driver needs only two bulk-capable endpoints, so
25 it can work on top of most device-side usb controllers. It's
26 useful for testing, and is also a working example showing how
27 USB "gadget drivers" can be written.
29 Make this be the first driver you try using on top of any new
30 USB peripheral controller driver. Then you can use host-side
31 test software, like the "usbtest" driver, to put your hardware
32 and its driver through a basic set of functional tests.
34 Gadget Zero also works with the host-side "usb-skeleton" driver,
35 and with many kinds of host-side test software. You may need
36 to tweak product and vendor IDs before host software knows about
37 this device, and arrange to select an appropriate configuration.
39 Say "y" to link the driver statically, or "m" to build a
40 dynamically linked module called "g_zero".
42 config USB_ZERO_HNPTEST
43 boolean "HNP Test Device"
44 depends on USB_ZERO && USB_OTG
46 You can configure this device to enumerate using the device
47 identifiers of the USB-OTG test device. That means that when
48 this gadget connects to another OTG device, with this one using
49 the "B-Peripheral" role, that device will use HNP to let this
50 one serve as the USB host instead (in the "B-Host" role).
53 tristate "Audio Gadget"
55 select USB_LIBCOMPOSITE
58 This Gadget Audio driver is compatible with USB Audio Class
59 specification 2.0. It implements 1 AudioControl interface,
60 1 AudioStreaming Interface each for USB-OUT and USB-IN.
61 Number of channels, sample rate and sample size can be
62 specified as module parameters.
63 This driver doesn't expect any real Audio codec to be present
64 on the device - the audio streams are simply sinked to and
65 sourced from a virtual ALSA sound card created. The user-space
66 application may choose to do whatever it wants with the data
67 received from the USB Host and choose to provide whatever it
68 wants as audio data to the USB Host.
70 Say "y" to link the driver statically, or "m" to build a
71 dynamically linked module called "g_audio".
74 bool "UAC 1.0 (Legacy)"
77 If you instead want older UAC Spec-1.0 driver that also has audio
78 paths hardwired to the Audio codec chip on-board and doesn't work
82 tristate "Ethernet Gadget (with CDC Ethernet support)"
84 select USB_LIBCOMPOSITE
90 This driver implements Ethernet style communication, in one of
93 - The "Communication Device Class" (CDC) Ethernet Control Model.
94 That protocol is often avoided with pure Ethernet adapters, in
95 favor of simpler vendor-specific hardware, but is widely
96 supported by firmware for smart network devices.
98 - On hardware can't implement that protocol, a simple CDC subset
99 is used, placing fewer demands on USB.
101 - CDC Ethernet Emulation Model (EEM) is a newer standard that has
102 a simpler interface that can be used by more USB hardware.
104 RNDIS support is an additional option, more demanding than than
107 Within the USB device, this gadget driver exposes a network device
108 "usbX", where X depends on what other networking devices you have.
109 Treat it like a two-node Ethernet link: host, and gadget.
111 The Linux-USB host-side "usbnet" driver interoperates with this
112 driver, so that deep I/O queues can be supported. On 2.4 kernels,
113 use "CDCEther" instead, if you're using the CDC option. That CDC
114 mode should also interoperate with standard CDC Ethernet class
115 drivers on other host operating systems.
117 Say "y" to link the driver statically, or "m" to build a
118 dynamically linked module called "g_ether".
123 select USB_LIBCOMPOSITE
127 Microsoft Windows XP bundles the "Remote NDIS" (RNDIS) protocol,
128 and Microsoft provides redistributable binary RNDIS drivers for
129 older versions of Windows.
131 If you say "y" here, the Ethernet gadget driver will try to provide
132 a second device configuration, supporting RNDIS to talk to such
135 To make MS-Windows work with this, use Documentation/usb/linux.inf
136 as the "driver info file". For versions of MS-Windows older than
137 XP, you'll need to download drivers from Microsoft's website; a URL
138 is given in comments found in that info file.
141 bool "Ethernet Emulation Model (EEM) support"
143 select USB_LIBCOMPOSITE
147 CDC EEM is a newer USB standard that is somewhat simpler than CDC ECM
148 and therefore can be supported by more hardware. Technically ECM and
149 EEM are designed for different applications. The ECM model extends
150 the network interface to the target (e.g. a USB cable modem), and the
151 EEM model is for mobile devices to communicate with hosts using
152 ethernet over USB. For Linux gadgets, however, the interface with
153 the host is the same (a usbX device), so the differences are minimal.
155 If you say "y" here, the Ethernet gadget driver will use the EEM
156 protocol rather than ECM. If unsure, say "n".
159 tristate "Network Control Model (NCM) support"
161 select USB_LIBCOMPOSITE
166 This driver implements USB CDC NCM subclass standard. NCM is
167 an advanced protocol for Ethernet encapsulation, allows grouping
168 of several ethernet frames into one USB transfer and different
169 alignment possibilities.
171 Say "y" to link the driver statically, or "m" to build a
172 dynamically linked module called "g_ncm".
175 tristate "Gadget Filesystem"
177 This driver provides a filesystem based API that lets user mode
178 programs implement a single-configuration USB device, including
179 endpoint I/O and control requests that don't relate to enumeration.
180 All endpoints, transfer speeds, and transfer types supported by
181 the hardware are available, through read() and write() calls.
183 Say "y" to link the driver statically, or "m" to build a
184 dynamically linked module called "gadgetfs".
186 config USB_FUNCTIONFS
187 tristate "Function Filesystem"
188 select USB_LIBCOMPOSITE
190 select USB_FUNCTIONFS_GENERIC if !(USB_FUNCTIONFS_ETH || USB_FUNCTIONFS_RNDIS)
192 The Function Filesystem (FunctionFS) lets one create USB
193 composite functions in user space in the same way GadgetFS
194 lets one create USB gadgets in user space. This allows creation
195 of composite gadgets such that some of the functions are
196 implemented in kernel space (for instance Ethernet, serial or
197 mass storage) and other are implemented in user space.
199 If you say "y" or "m" here you will be able what kind of
200 configurations the gadget will provide.
202 Say "y" to link the driver statically, or "m" to build
203 a dynamically linked module called "g_ffs".
205 config USB_FUNCTIONFS_ETH
206 bool "Include configuration with CDC ECM (Ethernet)"
207 depends on USB_FUNCTIONFS && NET
212 Include a configuration with CDC ECM function (Ethernet) and the
215 config USB_FUNCTIONFS_RNDIS
216 bool "Include configuration with RNDIS (Ethernet)"
217 depends on USB_FUNCTIONFS && NET
221 Include a configuration with RNDIS function (Ethernet) and the Filesystem.
223 config USB_FUNCTIONFS_GENERIC
224 bool "Include 'pure' configuration"
225 depends on USB_FUNCTIONFS
227 Include a configuration with the Function Filesystem alone with
228 no Ethernet interface.
230 config USB_MASS_STORAGE
231 tristate "Mass Storage Gadget"
233 select USB_LIBCOMPOSITE
234 select USB_F_MASS_STORAGE
236 The Mass Storage Gadget acts as a USB Mass Storage disk drive.
237 As its storage repository it can use a regular file or a block
238 device (in much the same way as the "loop" device driver),
239 specified as a module parameter or sysfs option.
241 This driver is a replacement for now removed File-backed
242 Storage Gadget (g_file_storage).
244 Say "y" to link the driver statically, or "m" to build
245 a dynamically linked module called "g_mass_storage".
247 config USB_GADGET_TARGET
248 tristate "USB Gadget Target Fabric Module"
249 depends on TARGET_CORE
250 select USB_LIBCOMPOSITE
252 This fabric is an USB gadget. Two USB protocols are supported that is
253 BBB or BOT (Bulk Only Transport) and UAS (USB Attached SCSI). BOT is
254 advertised on alternative interface 0 (primary) and UAS is on
255 alternative interface 1. Both protocols can work on USB2.0 and USB3.0.
256 UAS utilizes the USB 3.0 feature called streams support.
259 tristate "Serial Gadget (with CDC ACM and CDC OBEX support)"
265 select USB_LIBCOMPOSITE
267 The Serial Gadget talks to the Linux-USB generic serial driver.
268 This driver supports a CDC-ACM module option, which can be used
269 to interoperate with MS-Windows hosts or with the Linux-USB
272 This driver also supports a CDC-OBEX option. You will need a
273 user space OBEX server talking to /dev/ttyGS*, since the kernel
274 itself doesn't implement the OBEX protocol.
276 Say "y" to link the driver statically, or "m" to build a
277 dynamically linked module called "g_serial".
279 For more information, see Documentation/usb/gadget_serial.txt
280 which includes instructions and a "driver info file" needed to
281 make MS-Windows work with CDC ACM.
283 config USB_MIDI_GADGET
284 tristate "MIDI Gadget"
286 select USB_LIBCOMPOSITE
289 The MIDI Gadget acts as a USB Audio device, with one MIDI
290 input and one MIDI output. These MIDI jacks appear as
291 a sound "card" in the ALSA sound system. Other MIDI
292 connections can then be made on the gadget system, using
293 ALSA's aconnect utility etc.
295 Say "y" to link the driver statically, or "m" to build a
296 dynamically linked module called "g_midi".
299 tristate "Printer Gadget"
300 select USB_LIBCOMPOSITE
302 The Printer Gadget channels data between the USB host and a
303 userspace program driving the print engine. The user space
304 program reads and writes the device file /dev/g_printer to
305 receive or send printer data. It can use ioctl calls to
306 the device file to get or set printer status.
308 Say "y" to link the driver statically, or "m" to build a
309 dynamically linked module called "g_printer".
311 For more information, see Documentation/usb/gadget_printer.txt
312 which includes sample code for accessing the device file.
316 config USB_CDC_COMPOSITE
317 tristate "CDC Composite Device (Ethernet and ACM)"
319 select USB_LIBCOMPOSITE
325 This driver provides two functions in one configuration:
326 a CDC Ethernet (ECM) link, and a CDC ACM (serial port) link.
328 This driver requires four bulk and two interrupt endpoints,
329 plus the ability to handle altsettings. Not all peripheral
330 controllers are that capable.
332 Say "y" to link the driver statically, or "m" to build a
333 dynamically linked module.
336 tristate "Nokia composite gadget"
338 select USB_LIBCOMPOSITE
346 The Nokia composite gadget provides support for acm, obex
347 and phonet in only one composite gadget driver.
349 It's only really useful for N900 hardware. If you're building
350 a kernel for N900, say Y or M here. If unsure, say N.
353 tristate "CDC Composite Device (ACM and mass storage)"
355 select USB_LIBCOMPOSITE
358 select USB_F_MASS_STORAGE
360 This driver provides two functions in one configuration:
361 a mass storage, and a CDC ACM (serial port) link.
363 Say "y" to link the driver statically, or "m" to build a
364 dynamically linked module called "g_acm_ms".
367 tristate "Multifunction Composite Gadget"
368 depends on BLOCK && NET
369 select USB_G_MULTI_CDC if !USB_G_MULTI_RNDIS
370 select USB_LIBCOMPOSITE
374 select USB_F_MASS_STORAGE
376 The Multifunction Composite Gadget provides Ethernet (RNDIS
377 and/or CDC Ethernet), mass storage and ACM serial link
380 You will be asked to choose which of the two configurations is
381 to be available in the gadget. At least one configuration must
382 be chosen to make the gadget usable. Selecting more than one
383 configuration will prevent Windows from automatically detecting
384 the gadget as a composite gadget, so an INF file will be needed to
387 Say "y" to link the driver statically, or "m" to build a
388 dynamically linked module called "g_multi".
390 config USB_G_MULTI_RNDIS
391 bool "RNDIS + CDC Serial + Storage configuration"
392 depends on USB_G_MULTI
396 This option enables a configuration with RNDIS, CDC Serial and
397 Mass Storage functions available in the Multifunction Composite
398 Gadget. This is the configuration dedicated for Windows since RNDIS
399 is Microsoft's protocol.
403 config USB_G_MULTI_CDC
404 bool "CDC Ethernet + CDC Serial + Storage configuration"
405 depends on USB_G_MULTI
409 This option enables a configuration with CDC Ethernet (ECM), CDC
410 Serial and Mass Storage functions available in the Multifunction
418 tristate "HID Gadget"
419 select USB_LIBCOMPOSITE
421 The HID gadget driver provides generic emulation of USB
422 Human Interface Devices (HID).
424 For more information, see Documentation/usb/gadget_hid.txt which
425 includes sample code for accessing the device files.
427 Say "y" to link the driver statically, or "m" to build a
428 dynamically linked module called "g_hid".
430 # Standalone / single function gadgets
432 tristate "EHCI Debug Device Gadget"
434 select USB_LIBCOMPOSITE
436 This gadget emulates an EHCI Debug device. This is useful when you want
437 to interact with an EHCI Debug Port.
439 Say "y" to link the driver statically, or "m" to build a
440 dynamically linked module called "g_dbgp".
444 prompt "EHCI Debug Device mode"
445 default USB_G_DBGP_SERIAL
447 config USB_G_DBGP_PRINTK
448 depends on USB_G_DBGP
451 Directly printk() received data. No interaction.
453 config USB_G_DBGP_SERIAL
454 depends on USB_G_DBGP
458 Userland can interact using /dev/ttyGSxxx.
462 # put drivers that need isochronous transfer support (for audio
463 # or video class gadget drivers), or specific hardware, here.
465 tristate "USB Webcam Gadget"
467 select USB_LIBCOMPOSITE
468 select VIDEOBUF2_VMALLOC
470 The Webcam Gadget acts as a composite USB Audio and Video Class
471 device. It provides a userspace API to process UVC control requests
472 and stream video data to the host.
474 Say "y" to link the driver statically, or "m" to build a
475 dynamically linked module called "g_webcam".