Kconfig 16 KB

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