Kconfig 16 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483
  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. bool "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. select USB_F_MIDI
  251. help
  252. The MIDI Gadget acts as a USB Audio device, with one MIDI
  253. input and one MIDI output. These MIDI jacks appear as
  254. a sound "card" in the ALSA sound system. Other MIDI
  255. connections can then be made on the gadget system, using
  256. ALSA's aconnect utility etc.
  257. Say "y" to link the driver statically, or "m" to build a
  258. dynamically linked module called "g_midi".
  259. config USB_G_PRINTER
  260. tristate "Printer Gadget"
  261. select USB_LIBCOMPOSITE
  262. select USB_F_PRINTER
  263. help
  264. The Printer Gadget channels data between the USB host and a
  265. userspace program driving the print engine. The user space
  266. program reads and writes the device file /dev/g_printer to
  267. receive or send printer data. It can use ioctl calls to
  268. the device file to get or set printer status.
  269. Say "y" to link the driver statically, or "m" to build a
  270. dynamically linked module called "g_printer".
  271. For more information, see Documentation/usb/gadget_printer.txt
  272. which includes sample code for accessing the device file.
  273. if TTY
  274. config USB_CDC_COMPOSITE
  275. tristate "CDC Composite Device (Ethernet and ACM)"
  276. depends on NET
  277. select USB_LIBCOMPOSITE
  278. select USB_U_SERIAL
  279. select USB_U_ETHER
  280. select USB_F_ACM
  281. select USB_F_ECM
  282. help
  283. This driver provides two functions in one configuration:
  284. a CDC Ethernet (ECM) link, and a CDC ACM (serial port) link.
  285. This driver requires four bulk and two interrupt endpoints,
  286. plus the ability to handle altsettings. Not all peripheral
  287. controllers are that capable.
  288. Say "y" to link the driver statically, or "m" to build a
  289. dynamically linked module.
  290. config USB_G_NOKIA
  291. tristate "Nokia composite gadget"
  292. depends on PHONET
  293. depends on BLOCK
  294. select USB_LIBCOMPOSITE
  295. select USB_U_SERIAL
  296. select USB_U_ETHER
  297. select USB_F_ACM
  298. select USB_F_OBEX
  299. select USB_F_PHONET
  300. select USB_F_ECM
  301. select USB_F_MASS_STORAGE
  302. help
  303. The Nokia composite gadget provides support for acm, obex
  304. and phonet in only one composite gadget driver.
  305. It's only really useful for N900 hardware. If you're building
  306. a kernel for N900, say Y or M here. If unsure, say N.
  307. config USB_G_ACM_MS
  308. tristate "CDC Composite Device (ACM and mass storage)"
  309. depends on BLOCK
  310. select USB_LIBCOMPOSITE
  311. select USB_U_SERIAL
  312. select USB_F_ACM
  313. select USB_F_MASS_STORAGE
  314. help
  315. This driver provides two functions in one configuration:
  316. a mass storage, and a CDC ACM (serial port) link.
  317. Say "y" to link the driver statically, or "m" to build a
  318. dynamically linked module called "g_acm_ms".
  319. config USB_G_MULTI
  320. tristate "Multifunction Composite Gadget"
  321. depends on BLOCK && NET
  322. select USB_G_MULTI_CDC if !USB_G_MULTI_RNDIS
  323. select USB_LIBCOMPOSITE
  324. select USB_U_SERIAL
  325. select USB_U_ETHER
  326. select USB_F_ACM
  327. select USB_F_MASS_STORAGE
  328. help
  329. The Multifunction Composite Gadget provides Ethernet (RNDIS
  330. and/or CDC Ethernet), mass storage and ACM serial link
  331. interfaces.
  332. You will be asked to choose which of the two configurations is
  333. to be available in the gadget. At least one configuration must
  334. be chosen to make the gadget usable. Selecting more than one
  335. configuration will prevent Windows from automatically detecting
  336. the gadget as a composite gadget, so an INF file will be needed to
  337. use the gadget.
  338. Say "y" to link the driver statically, or "m" to build a
  339. dynamically linked module called "g_multi".
  340. config USB_G_MULTI_RNDIS
  341. bool "RNDIS + CDC Serial + Storage configuration"
  342. depends on USB_G_MULTI
  343. select USB_F_RNDIS
  344. default y
  345. help
  346. This option enables a configuration with RNDIS, CDC Serial and
  347. Mass Storage functions available in the Multifunction Composite
  348. Gadget. This is the configuration dedicated for Windows since RNDIS
  349. is Microsoft's protocol.
  350. If unsure, say "y".
  351. config USB_G_MULTI_CDC
  352. bool "CDC Ethernet + CDC Serial + Storage configuration"
  353. depends on USB_G_MULTI
  354. default n
  355. select USB_F_ECM
  356. help
  357. This option enables a configuration with CDC Ethernet (ECM), CDC
  358. Serial and Mass Storage functions available in the Multifunction
  359. Composite Gadget.
  360. If unsure, say "y".
  361. endif # TTY
  362. config USB_G_HID
  363. tristate "HID Gadget"
  364. select USB_LIBCOMPOSITE
  365. select USB_F_HID
  366. help
  367. The HID gadget driver provides generic emulation of USB
  368. Human Interface Devices (HID).
  369. For more information, see Documentation/usb/gadget_hid.txt which
  370. includes sample code for accessing the device files.
  371. Say "y" to link the driver statically, or "m" to build a
  372. dynamically linked module called "g_hid".
  373. # Standalone / single function gadgets
  374. config USB_G_DBGP
  375. tristate "EHCI Debug Device Gadget"
  376. depends on TTY
  377. select USB_LIBCOMPOSITE
  378. help
  379. This gadget emulates an EHCI Debug device. This is useful when you want
  380. to interact with an EHCI Debug Port.
  381. Say "y" to link the driver statically, or "m" to build a
  382. dynamically linked module called "g_dbgp".
  383. if USB_G_DBGP
  384. choice
  385. prompt "EHCI Debug Device mode"
  386. default USB_G_DBGP_SERIAL
  387. config USB_G_DBGP_PRINTK
  388. depends on USB_G_DBGP
  389. bool "printk"
  390. help
  391. Directly printk() received data. No interaction.
  392. config USB_G_DBGP_SERIAL
  393. depends on USB_G_DBGP
  394. select USB_U_SERIAL
  395. bool "serial"
  396. help
  397. Userland can interact using /dev/ttyGSxxx.
  398. endchoice
  399. endif
  400. # put drivers that need isochronous transfer support (for audio
  401. # or video class gadget drivers), or specific hardware, here.
  402. config USB_G_WEBCAM
  403. tristate "USB Webcam Gadget"
  404. depends on VIDEO_DEV
  405. select USB_LIBCOMPOSITE
  406. select VIDEOBUF2_VMALLOC
  407. select USB_F_UVC
  408. help
  409. The Webcam Gadget acts as a composite USB Audio and Video Class
  410. device. It provides a userspace API to process UVC control requests
  411. and stream video data to the host.
  412. Say "y" to link the driver statically, or "m" to build a
  413. dynamically linked module called "g_webcam".