upload tizen1.0 source
[kernel/linux-2.6.36.git] / drivers / usb / gadget / Kconfig
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
16 menuconfig USB_GADGET
17         tristate "USB Gadget Support"
18         help
19            USB is a master/slave protocol, organized with one master
20            host (such as a PC) controlling up to 127 peripheral devices.
21            The USB hardware is asymmetric, which makes it easier to set up:
22            you can't connect a "to-the-host" connector to a peripheral.
23
24            Linux can run in the host, or in the peripheral.  In both cases
25            you need a low level bus controller driver, and some software
26            talking to it.  Peripheral controllers are often discrete silicon,
27            or are integrated with the CPU in a microcontroller.  The more
28            familiar host side controllers have names like "EHCI", "OHCI",
29            or "UHCI", and are usually integrated into southbridges on PC
30            motherboards.
31
32            Enable this configuration option if you want to run Linux inside
33            a USB peripheral device.  Configure one hardware driver for your
34            peripheral/device side bus controller, and a "gadget driver" for
35            your peripheral protocol.  (If you use modular gadget drivers,
36            you may configure more than one.)
37
38            If in doubt, say "N" and don't enable these drivers; most people
39            don't have this kind of hardware (except maybe inside Linux PDAs).
40
41            For more information, see <http://www.linux-usb.org/gadget> and
42            the kernel DocBook documentation for this API.
43
44 if USB_GADGET
45
46 config USB_GADGET_DEBUG
47         boolean "Debugging messages (DEVELOPMENT)"
48         depends on DEBUG_KERNEL
49         help
50            Many controller and gadget drivers will print some debugging
51            messages if you use this option to ask for those messages.
52
53            Avoid enabling these messages, even if you're actively
54            debugging such a driver.  Many drivers will emit so many
55            messages that the driver timings are affected, which will
56            either create new failure modes or remove the one you're
57            trying to track down.  Never enable these messages for a
58            production build.
59
60 config USB_GADGET_DEBUG_FILES
61         boolean "Debugging information files (DEVELOPMENT)"
62         depends on PROC_FS
63         help
64            Some of the drivers in the "gadget" framework can expose
65            debugging information in files such as /proc/driver/udc
66            (for a peripheral controller).  The information in these
67            files may help when you're troubleshooting or bringing up a
68            driver on a new board.   Enable these files by choosing "Y"
69            here.  If in doubt, or to conserve kernel memory, say "N".
70
71 config USB_GADGET_DEBUG_FS
72         boolean "Debugging information files in debugfs (DEVELOPMENT)"
73         depends on DEBUG_FS
74         help
75            Some of the drivers in the "gadget" framework can expose
76            debugging information in files under /sys/kernel/debug/.
77            The information in these files may help when you're
78            troubleshooting or bringing up a driver on a new board.
79            Enable these files by choosing "Y" here.  If in doubt, or
80            to conserve kernel memory, say "N".
81
82 config USB_GADGET_VBUS_DRAW
83         int "Maximum VBUS Power usage (2-500 mA)"
84         range 2 500
85         default 2
86         help
87            Some devices need to draw power from USB when they are
88            configured, perhaps to operate circuitry or to recharge
89            batteries.  This is in addition to any local power supply,
90            such as an AC adapter or batteries.
91
92            Enter the maximum power your device draws through USB, in
93            milliAmperes.  The permitted range of values is 2 - 500 mA;
94            0 mA would be legal, but can make some hosts misbehave.
95
96            This value will be used except for system-specific gadget
97            drivers that have more specific information.
98
99 config  USB_GADGET_SELECTED
100         boolean
101
102 #
103 # USB Peripheral Controller Support
104 #
105 # The order here is alphabetical, except that integrated controllers go
106 # before discrete ones so they will be the initial/default value:
107 #   - integrated/SOC controllers first
108 #   - licensed IP used in both SOC and discrete versions
109 #   - discrete ones (including all PCI-only controllers)
110 #   - debug/dummy gadget+hcd is last.
111 #
112 choice
113         prompt "USB Peripheral Controller"
114         depends on USB_GADGET
115         default USB_GADGET_S3C_OTGD if (PLAT_S5P)
116         help
117            A USB device uses a controller to talk to its host.
118            Systems should have only one such upstream link.
119            Many controller drivers are platform-specific; these
120            often need board-specific hooks.
121
122 #
123 # Integrated controllers
124 #
125
126 config USB_GADGET_AT91
127         boolean "Atmel AT91 USB Device Port"
128         depends on ARCH_AT91 && !ARCH_AT91SAM9RL && !ARCH_AT91CAP9 && !ARCH_AT91SAM9G45
129         select USB_GADGET_SELECTED
130         help
131            Many Atmel AT91 processors (such as the AT91RM2000) have a
132            full speed USB Device Port with support for five configurable
133            endpoints (plus endpoint zero).
134
135            Say "y" to link the driver statically, or "m" to build a
136            dynamically linked module called "at91_udc" and force all
137            gadget drivers to also be dynamically linked.
138
139 config USB_AT91
140         tristate
141         depends on USB_GADGET_AT91
142         default USB_GADGET
143
144 config USB_GADGET_ATMEL_USBA
145         boolean "Atmel USBA"
146         select USB_GADGET_DUALSPEED
147         depends on AVR32 || ARCH_AT91CAP9 || ARCH_AT91SAM9RL || ARCH_AT91SAM9G45
148         help
149           USBA is the integrated high-speed USB Device controller on
150           the AT32AP700x, some AT91SAM9 and AT91CAP9 processors from Atmel.
151
152 config USB_ATMEL_USBA
153         tristate
154         depends on USB_GADGET_ATMEL_USBA
155         default USB_GADGET
156         select USB_GADGET_SELECTED
157
158 config USB_GADGET_FSL_USB2
159         boolean "Freescale Highspeed USB DR Peripheral Controller"
160         depends on FSL_SOC || ARCH_MXC
161         select USB_GADGET_DUALSPEED
162         help
163            Some of Freescale PowerPC processors have a High Speed
164            Dual-Role(DR) USB controller, which supports device mode.
165
166            The number of programmable endpoints is different through
167            SOC revisions.
168
169            Say "y" to link the driver statically, or "m" to build a
170            dynamically linked module called "fsl_usb2_udc" and force
171            all gadget drivers to also be dynamically linked.
172
173 config USB_FSL_USB2
174         tristate
175         depends on USB_GADGET_FSL_USB2
176         default USB_GADGET
177         select USB_GADGET_SELECTED
178
179 config USB_GADGET_LH7A40X
180         boolean "LH7A40X"
181         depends on ARCH_LH7A40X
182         help
183            This driver provides USB Device Controller driver for LH7A40x
184
185 config USB_LH7A40X
186         tristate
187         depends on USB_GADGET_LH7A40X
188         default USB_GADGET
189         select USB_GADGET_SELECTED
190
191 config USB_GADGET_OMAP
192         boolean "OMAP USB Device Controller"
193         depends on ARCH_OMAP
194         select ISP1301_OMAP if MACH_OMAP_H2 || MACH_OMAP_H3 || MACH_OMAP_H4_OTG
195         select USB_OTG_UTILS if ARCH_OMAP
196         help
197            Many Texas Instruments OMAP processors have flexible full
198            speed USB device controllers, with support for up to 30
199            endpoints (plus endpoint zero).  This driver supports the
200            controller in the OMAP 1611, and should work with controllers
201            in other OMAP processors too, given minor tweaks.
202
203            Say "y" to link the driver statically, or "m" to build a
204            dynamically linked module called "omap_udc" and force all
205            gadget drivers to also be dynamically linked.
206
207 config USB_OMAP
208         tristate
209         depends on USB_GADGET_OMAP
210         default USB_GADGET
211         select USB_GADGET_SELECTED
212
213 config USB_OTG
214         boolean "OTG Support"
215         depends on USB_GADGET_OMAP && ARCH_OMAP_OTG && USB_OHCI_HCD
216         help
217            The most notable feature of USB OTG is support for a
218            "Dual-Role" device, which can act as either a device
219            or a host.  The initial role choice can be changed
220            later, when two dual-role devices talk to each other.
221
222            Select this only if your OMAP board has a Mini-AB connector.
223
224 config USB_GADGET_PXA25X
225         boolean "PXA 25x or IXP 4xx"
226         depends on (ARCH_PXA && PXA25x) || ARCH_IXP4XX
227         select USB_OTG_UTILS
228         help
229            Intel's PXA 25x series XScale ARM-5TE processors include
230            an integrated full speed USB 1.1 device controller.  The
231            controller in the IXP 4xx series is register-compatible.
232
233            It has fifteen fixed-function endpoints, as well as endpoint
234            zero (for control transfers).
235
236            Say "y" to link the driver statically, or "m" to build a
237            dynamically linked module called "pxa25x_udc" and force all
238            gadget drivers to also be dynamically linked.
239
240 config USB_PXA25X
241         tristate
242         depends on USB_GADGET_PXA25X
243         default USB_GADGET
244         select USB_GADGET_SELECTED
245
246 # if there's only one gadget driver, using only two bulk endpoints,
247 # don't waste memory for the other endpoints
248 config USB_PXA25X_SMALL
249         depends on USB_GADGET_PXA25X
250         bool
251         default n if USB_ETH_RNDIS
252         default y if USB_ZERO
253         default y if USB_ETH
254         default y if USB_G_SERIAL
255
256 config USB_GADGET_R8A66597
257         boolean "Renesas R8A66597 USB Peripheral Controller"
258         select USB_GADGET_DUALSPEED
259         help
260            R8A66597 is a discrete USB host and peripheral controller chip that
261            supports both full and high speed USB 2.0 data transfers.
262            It has nine configurable endpoints, and endpoint zero.
263
264            Say "y" to link the driver statically, or "m" to build a
265            dynamically linked module called "r8a66597_udc" and force all
266            gadget drivers to also be dynamically linked.
267
268 config USB_R8A66597
269         tristate
270         depends on USB_GADGET_R8A66597
271         default USB_GADGET
272         select USB_GADGET_SELECTED
273
274 config USB_GADGET_PXA27X
275         boolean "PXA 27x"
276         depends on ARCH_PXA && (PXA27x || PXA3xx)
277         select USB_OTG_UTILS
278         help
279            Intel's PXA 27x series XScale ARM v5TE processors include
280            an integrated full speed USB 1.1 device controller.
281
282            It has up to 23 endpoints, as well as endpoint zero (for
283            control transfers).
284
285            Say "y" to link the driver statically, or "m" to build a
286            dynamically linked module called "pxa27x_udc" and force all
287            gadget drivers to also be dynamically linked.
288
289 config USB_PXA27X
290         tristate
291         depends on USB_GADGET_PXA27X
292         default USB_GADGET
293         select USB_GADGET_SELECTED
294
295 config USB_GADGET_S3C_HSOTG
296         boolean "S3C HS/OtG USB Device controller"
297         depends on S3C_DEV_USB_HSOTG
298         select USB_GADGET_S3C_HSOTG_PIO
299         select USB_GADGET_DUALSPEED
300         help
301           The Samsung S3C64XX USB2.0 high-speed gadget controller
302           integrated into the S3C64XX series SoC.
303
304 config USB_S3C_HSOTG
305         tristate
306         depends on USB_GADGET_S3C_HSOTG
307         default USB_GADGET
308         select USB_GADGET_SELECTED
309
310 config USB_GADGET_IMX
311         boolean "Freescale IMX USB Peripheral Controller"
312         depends on ARCH_MX1
313         help
314            Freescale's IMX series include an integrated full speed
315            USB 1.1 device controller.  The controller in the IMX series
316            is register-compatible.
317
318            It has Six fixed-function endpoints, as well as endpoint
319            zero (for control transfers).
320
321            Say "y" to link the driver statically, or "m" to build a
322            dynamically linked module called "imx_udc" and force all
323            gadget drivers to also be dynamically linked.
324
325 config USB_IMX
326         tristate
327         depends on USB_GADGET_IMX
328         default USB_GADGET
329         select USB_GADGET_SELECTED
330
331 config USB_GADGET_S3C2410
332         boolean "S3C2410 USB Device Controller"
333         depends on ARCH_S3C2410
334         help
335           Samsung's S3C2410 is an ARM-4 processor with an integrated
336           full speed USB 1.1 device controller.  It has 4 configurable
337           endpoints, as well as endpoint zero (for control transfers).
338
339           This driver has been tested on the S3C2410, S3C2412, and
340           S3C2440 processors.
341
342 config USB_S3C2410
343         tristate
344         depends on USB_GADGET_S3C2410
345         default USB_GADGET
346         select USB_GADGET_SELECTED
347
348 config USB_S3C2410_DEBUG
349         boolean "S3C2410 udc debug messages"
350         depends on USB_GADGET_S3C2410
351
352 config USB_GADGET_S3C_OTGD
353         boolean "S3C HS USB OTG Device"
354         depends on (PLAT_S5P)
355         help
356           Samsung's S3C64XX processors include high speed USB OTG2.0
357           controller. It has 15 configurable endpoints, as well as
358           endpoint zero (for control transfers).
359
360           This driver has been tested on the S3C6410, S5P6440, S5PC100 processor.
361
362           Say "y" to link the driver statically, or "m" to build a
363           dynamically linked module called "s3c-udc-otg" and force all
364           gadget drivers to also be dynamically linked.
365
366 #
367 # Controllers available in both integrated and discrete versions
368 #
369
370 # musb builds in ../musb along with host support
371 config USB_GADGET_MUSB_HDRC
372         boolean "Inventra HDRC USB Peripheral (TI, ADI, ...)"
373         depends on USB_MUSB_HDRC && (USB_MUSB_PERIPHERAL || USB_MUSB_OTG)
374         select USB_GADGET_DUALSPEED
375         select USB_GADGET_SELECTED
376         help
377           This OTG-capable silicon IP is used in dual designs including
378           the TI DaVinci, OMAP 243x, OMAP 343x, TUSB 6010, and ADI Blackfin
379
380 config USB_GADGET_M66592
381         boolean "Renesas M66592 USB Peripheral Controller"
382         select USB_GADGET_DUALSPEED
383         help
384            M66592 is a discrete USB peripheral controller chip that
385            supports both full and high speed USB 2.0 data transfers.
386            It has seven configurable endpoints, and endpoint zero.
387
388            Say "y" to link the driver statically, or "m" to build a
389            dynamically linked module called "m66592_udc" and force all
390            gadget drivers to also be dynamically linked.
391
392 config USB_M66592
393         tristate
394         depends on USB_GADGET_M66592
395         default USB_GADGET
396         select USB_GADGET_SELECTED
397
398 #
399 # Controllers available only in discrete form (and all PCI controllers)
400 #
401
402 config USB_GADGET_AMD5536UDC
403         boolean "AMD5536 UDC"
404         depends on PCI
405         select USB_GADGET_DUALSPEED
406         help
407            The AMD5536 UDC is part of the AMD Geode CS5536, an x86 southbridge.
408            It is a USB Highspeed DMA capable USB device controller. Beside ep0
409            it provides 4 IN and 4 OUT endpoints (bulk or interrupt type).
410            The UDC port supports OTG operation, and may be used as a host port
411            if it's not being used to implement peripheral or OTG roles.
412
413            Say "y" to link the driver statically, or "m" to build a
414            dynamically linked module called "amd5536udc" and force all
415            gadget drivers to also be dynamically linked.
416
417 config USB_AMD5536UDC
418         tristate
419         depends on USB_GADGET_AMD5536UDC
420         default USB_GADGET
421         select USB_GADGET_SELECTED
422
423 config USB_GADGET_FSL_QE
424         boolean "Freescale QE/CPM USB Device Controller"
425         depends on FSL_SOC && (QUICC_ENGINE || CPM)
426         help
427            Some of Freescale PowerPC processors have a Full Speed
428            QE/CPM2 USB controller, which support device mode with 4
429            programmable endpoints. This driver supports the
430            controller in the MPC8360 and MPC8272, and should work with
431            controllers having QE or CPM2, given minor tweaks.
432
433            Set CONFIG_USB_GADGET to "m" to build this driver as a
434            dynamically linked module called "fsl_qe_udc".
435
436 config USB_FSL_QE
437         tristate
438         depends on USB_GADGET_FSL_QE
439         default USB_GADGET
440         select USB_GADGET_SELECTED
441
442 config USB_GADGET_CI13XXX
443         boolean "MIPS USB CI13xxx"
444         depends on PCI
445         select USB_GADGET_DUALSPEED
446         help
447           MIPS USB IP core family device controller
448           Currently it only supports IP part number CI13412
449
450           Say "y" to link the driver statically, or "m" to build a
451           dynamically linked module called "ci13xxx_udc" and force all
452           gadget drivers to also be dynamically linked.
453
454 config USB_CI13XXX
455         tristate
456         depends on USB_GADGET_CI13XXX
457         default USB_GADGET
458         select USB_GADGET_SELECTED
459
460 config USB_GADGET_NET2280
461         boolean "NetChip 228x"
462         depends on PCI
463         select USB_GADGET_DUALSPEED
464         help
465            NetChip 2280 / 2282 is a PCI based USB peripheral controller which
466            supports both full and high speed USB 2.0 data transfers.
467
468            It has six configurable endpoints, as well as endpoint zero
469            (for control transfers) and several endpoints with dedicated
470            functions.
471
472            Say "y" to link the driver statically, or "m" to build a
473            dynamically linked module called "net2280" and force all
474            gadget drivers to also be dynamically linked.
475
476 config USB_NET2280
477         tristate
478         depends on USB_GADGET_NET2280
479         default USB_GADGET
480         select USB_GADGET_SELECTED
481
482 config USB_GADGET_GOKU
483         boolean "Toshiba TC86C001 'Goku-S'"
484         depends on PCI
485         help
486            The Toshiba TC86C001 is a PCI device which includes controllers
487            for full speed USB devices, IDE, I2C, SIO, plus a USB host (OHCI).
488
489            The device controller has three configurable (bulk or interrupt)
490            endpoints, plus endpoint zero (for control transfers).
491
492            Say "y" to link the driver statically, or "m" to build a
493            dynamically linked module called "goku_udc" and to force all
494            gadget drivers to also be dynamically linked.
495
496 config USB_GOKU
497         tristate
498         depends on USB_GADGET_GOKU
499         default USB_GADGET
500         select USB_GADGET_SELECTED
501
502 config USB_GADGET_LANGWELL
503         boolean "Intel Langwell USB Device Controller"
504         depends on PCI
505         select USB_GADGET_DUALSPEED
506         help
507            Intel Langwell USB Device Controller is a High-Speed USB
508            On-The-Go device controller.
509
510            The number of programmable endpoints is different through
511            controller revision.
512
513            Say "y" to link the driver statically, or "m" to build a
514            dynamically linked module called "langwell_udc" and force all
515            gadget drivers to also be dynamically linked.
516
517 config USB_LANGWELL
518         tristate
519         depends on USB_GADGET_LANGWELL
520         default USB_GADGET
521         select USB_GADGET_SELECTED
522
523
524 #
525 # LAST -- dummy/emulated controller
526 #
527
528 config USB_GADGET_DUMMY_HCD
529         boolean "Dummy HCD (DEVELOPMENT)"
530         depends on USB=y || (USB=m && USB_GADGET=m)
531         select USB_GADGET_DUALSPEED
532         help
533           This host controller driver emulates USB, looping all data transfer
534           requests back to a USB "gadget driver" in the same host.  The host
535           side is the master; the gadget side is the slave.  Gadget drivers
536           can be high, full, or low speed; and they have access to endpoints
537           like those from NET2280, PXA2xx, or SA1100 hardware.
538           
539           This may help in some stages of creating a driver to embed in a
540           Linux device, since it lets you debug several parts of the gadget
541           driver without its hardware or drivers being involved.
542           
543           Since such a gadget side driver needs to interoperate with a host
544           side Linux-USB device driver, this may help to debug both sides
545           of a USB protocol stack.
546
547           Say "y" to link the driver statically, or "m" to build a
548           dynamically linked module called "dummy_hcd" and force all
549           gadget drivers to also be dynamically linked.
550
551 config USB_DUMMY_HCD
552         tristate
553         depends on USB_GADGET_DUMMY_HCD
554         default USB_GADGET
555         select USB_GADGET_SELECTED
556
557 # NOTE:  Please keep dummy_hcd LAST so that "real hardware" appears
558 # first and will be selected by default.
559
560 endchoice
561
562 comment "NOTE: S3C OTG device role enables the controller driver below"
563         depends on USB_GADGET_S3C_OTGD
564
565 config USB_S3C_OTGD
566         tristate "S3C high speed(2.0, dual-speed) USB OTG device"
567         depends on USB_GADGET && USB_GADGET_S3C_OTGD
568         default y
569         default USB_GADGET
570         select USB_GADGET_SELECTED
571         select USB_GADGET_DUALSPEED
572         help
573           Say "y" to link the driver statically, or "m" to build a
574           dynamically linked module called "s3c-udc-otg-hs" and force all
575           gadget drivers to also be dynamically linked.
576
577 choice
578         prompt "S3C OTGD transfer mode"
579         depends on USB_S3C_OTGD
580         default y
581         help
582           S3C USB OTG conteroller supports DMA mode and Slave mode
583           for the dat transfer. You must slect one for the core
584           operation mode.
585
586 config USB_GADGET_S3C_OTGD_DMA_MODE
587         bool "enabled DMA MODE"
588         depends on USB_GADGET_S3C_OTGD
589         help
590           S3C USB OTG core operates in DMA mode.
591
592 config USB_GADGET_S3C_OTGD_SLAVE_MODE
593         bool "enabled Slave MODE"
594         depends on USB_GADGET_S3C_OTGD
595         help
596         S3C USB OTG core operates in Slave mode.
597 endchoice
598
599 config USB_GADGET_DUALSPEED
600         bool
601         depends on USB_GADGET
602         default n
603         help
604           Means that gadget drivers should include extra descriptors
605           and code to handle dual-speed controllers.
606
607 #
608 # USB Gadget Drivers
609 #
610 choice
611         tristate "USB Gadget Drivers"
612         depends on USB_GADGET && USB_GADGET_SELECTED
613         default USB_ETH
614         help
615           A Linux "Gadget Driver" talks to the USB Peripheral Controller
616           driver through the abstract "gadget" API.  Some other operating
617           systems call these "client" drivers, of which "class drivers"
618           are a subset (implementing a USB device class specification).
619           A gadget driver implements one or more USB functions using
620           the peripheral hardware.
621
622           Gadget drivers are hardware-neutral, or "platform independent",
623           except that they sometimes must understand quirks or limitations
624           of the particular controllers they work with.  For example, when
625           a controller doesn't support alternate configurations or provide
626           enough of the right types of endpoints, the gadget driver might
627           not be able work with that controller, or might need to implement
628           a less common variant of a device class protocol.
629
630 # this first set of drivers all depend on bulk-capable hardware.
631
632 config USB_ZERO
633         tristate "Gadget Zero (DEVELOPMENT)"
634         help
635           Gadget Zero is a two-configuration device.  It either sinks and
636           sources bulk data; or it loops back a configurable number of
637           transfers.  It also implements control requests, for "chapter 9"
638           conformance.  The driver needs only two bulk-capable endpoints, so
639           it can work on top of most device-side usb controllers.  It's
640           useful for testing, and is also a working example showing how
641           USB "gadget drivers" can be written.
642
643           Make this be the first driver you try using on top of any new
644           USB peripheral controller driver.  Then you can use host-side
645           test software, like the "usbtest" driver, to put your hardware
646           and its driver through a basic set of functional tests.
647
648           Gadget Zero also works with the host-side "usb-skeleton" driver,
649           and with many kinds of host-side test software.  You may need
650           to tweak product and vendor IDs before host software knows about
651           this device, and arrange to select an appropriate configuration.
652
653           Say "y" to link the driver statically, or "m" to build a
654           dynamically linked module called "g_zero".
655
656 config USB_ZERO_HNPTEST
657         boolean "HNP Test Device"
658         depends on USB_ZERO && USB_OTG
659         help
660           You can configure this device to enumerate using the device
661           identifiers of the USB-OTG test device.  That means that when
662           this gadget connects to another OTG device, with this one using
663           the "B-Peripheral" role, that device will use HNP to let this
664           one serve as the USB host instead (in the "B-Host" role).
665
666 config USB_AUDIO
667         tristate "Audio Gadget (EXPERIMENTAL)"
668         depends on SND
669         select SND_PCM
670         help
671           Gadget Audio is compatible with USB Audio Class specification 1.0.
672           It will include at least one AudioControl interface, zero or more
673           AudioStream interface and zero or more MIDIStream interface.
674
675           Gadget Audio will use on-board ALSA (CONFIG_SND) audio card to
676           playback or capture audio stream.
677
678           Say "y" to link the driver statically, or "m" to build a
679           dynamically linked module called "g_audio".
680
681 config USB_ETH
682         tristate "Ethernet Gadget (with CDC Ethernet support)"
683         depends on NET
684         select CRC32
685         help
686           This driver implements Ethernet style communication, in one of
687           several ways:
688           
689            - The "Communication Device Class" (CDC) Ethernet Control Model.
690              That protocol is often avoided with pure Ethernet adapters, in
691              favor of simpler vendor-specific hardware, but is widely
692              supported by firmware for smart network devices.
693
694            - On hardware can't implement that protocol, a simple CDC subset
695              is used, placing fewer demands on USB.
696
697            - CDC Ethernet Emulation Model (EEM) is a newer standard that has
698              a simpler interface that can be used by more USB hardware.
699
700           RNDIS support is an additional option, more demanding than than
701           subset.
702
703           Within the USB device, this gadget driver exposes a network device
704           "usbX", where X depends on what other networking devices you have.
705           Treat it like a two-node Ethernet link:  host, and gadget.
706
707           The Linux-USB host-side "usbnet" driver interoperates with this
708           driver, so that deep I/O queues can be supported.  On 2.4 kernels,
709           use "CDCEther" instead, if you're using the CDC option. That CDC
710           mode should also interoperate with standard CDC Ethernet class
711           drivers on other host operating systems.
712
713           Say "y" to link the driver statically, or "m" to build a
714           dynamically linked module called "g_ether".
715
716 config USB_ETH_RNDIS
717         bool "RNDIS support"
718         depends on USB_ETH
719         default y
720         help
721            Microsoft Windows XP bundles the "Remote NDIS" (RNDIS) protocol,
722            and Microsoft provides redistributable binary RNDIS drivers for
723            older versions of Windows.
724
725            If you say "y" here, the Ethernet gadget driver will try to provide
726            a second device configuration, supporting RNDIS to talk to such
727            Microsoft USB hosts.
728            
729            To make MS-Windows work with this, use Documentation/usb/linux.inf
730            as the "driver info file".  For versions of MS-Windows older than
731            XP, you'll need to download drivers from Microsoft's website; a URL
732            is given in comments found in that info file.
733
734 config USB_ETH_EEM
735        bool "Ethernet Emulation Model (EEM) support"
736        depends on USB_ETH
737        default n
738        help
739          CDC EEM is a newer USB standard that is somewhat simpler than CDC ECM
740          and therefore can be supported by more hardware.  Technically ECM and
741          EEM are designed for different applications.  The ECM model extends
742          the network interface to the target (e.g. a USB cable modem), and the
743          EEM model is for mobile devices to communicate with hosts using
744          ethernet over USB.  For Linux gadgets, however, the interface with
745          the host is the same (a usbX device), so the differences are minimal.
746
747          If you say "y" here, the Ethernet gadget driver will use the EEM
748          protocol rather than ECM.  If unsure, say "n".
749
750 config USB_GADGETFS
751         tristate "Gadget Filesystem (EXPERIMENTAL)"
752         depends on EXPERIMENTAL
753         help
754           This driver provides a filesystem based API that lets user mode
755           programs implement a single-configuration USB device, including
756           endpoint I/O and control requests that don't relate to enumeration.
757           All endpoints, transfer speeds, and transfer types supported by
758           the hardware are available, through read() and write() calls.
759
760           Currently, this option is still labelled as EXPERIMENTAL because
761           of existing race conditions in the underlying in-kernel AIO core.
762
763           Say "y" to link the driver statically, or "m" to build a
764           dynamically linked module called "gadgetfs".
765
766 config USB_FUNCTIONFS
767         tristate "Function Filesystem (EXPERIMENTAL)"
768         depends on EXPERIMENTAL
769         select USB_FUNCTIONFS_GENERIC if !(USB_FUNCTIONFS_ETH || USB_FUNCTIONFS_RNDIS)
770         help
771           The Function Filesystem (FunctioFS) lets one create USB
772           composite functions in user space in the same way as GadgetFS
773           lets one create USB gadgets in user space.  This allows creation
774           of composite gadgets such that some of the functions are
775           implemented in kernel space (for instance Ethernet, serial or
776           mass storage) and other are implemented in user space.
777
778           If you say "y" or "m" here you will be able what kind of
779           configurations the gadget will provide.
780
781           Say "y" to link the driver statically, or "m" to build
782           a dynamically linked module called "g_ffs".
783
784 config USB_FUNCTIONFS_ETH
785         bool "Include configuration with CDC ECM (Ethernet)"
786         depends on USB_FUNCTIONFS && NET
787         help
788           Include a configuration with CDC ECM funcion (Ethernet) and the
789           Funcion Filesystem.
790
791 config USB_FUNCTIONFS_RNDIS
792         bool "Include configuration with RNDIS (Ethernet)"
793         depends on USB_FUNCTIONFS && NET
794         help
795           Include a configuration with RNDIS funcion (Ethernet) and the Filesystem.
796
797 config USB_FUNCTIONFS_GENERIC
798         bool "Include 'pure' configuration"
799         depends on USB_FUNCTIONFS
800         help
801           Include a configuration with the Function Filesystem alone with
802           no Ethernet interface.
803
804 config USB_FILE_STORAGE
805         tristate "File-backed Storage Gadget"
806         depends on BLOCK
807         help
808           The File-backed Storage Gadget acts as a USB Mass Storage
809           disk drive.  As its storage repository it can use a regular
810           file or a block device (in much the same way as the "loop"
811           device driver), specified as a module parameter.
812
813           Say "y" to link the driver statically, or "m" to build a
814           dynamically linked module called "g_file_storage".
815
816 config USB_FILE_STORAGE_TEST
817         bool "File-backed Storage Gadget testing version"
818         depends on USB_FILE_STORAGE
819         default n
820         help
821           Say "y" to generate the larger testing version of the
822           File-backed Storage Gadget, useful for probing the
823           behavior of USB Mass Storage hosts.  Not needed for
824           normal operation.
825
826 config USB_MASS_STORAGE
827         tristate "Mass Storage Gadget"
828         depends on BLOCK
829         help
830           The Mass Storage Gadget acts as a USB Mass Storage disk drive.
831           As its storage repository it can use a regular file or a block
832           device (in much the same way as the "loop" device driver),
833           specified as a module parameter or sysfs option.
834
835           This is heavily based on File-backed Storage Gadget and in most
836           cases you will want to use FSG instead.  This gadget is mostly
837           here to test the functionality of the Mass Storage Function
838           which may be used with composite framework.
839
840           Say "y" to link the driver statically, or "m" to build
841           a dynamically linked module called "g_mass_storage".  If unsure,
842           consider File-backed Storage Gadget.
843
844 config USB_G_SERIAL
845         tristate "Serial Gadget (with CDC ACM and CDC OBEX support)"
846         help
847           The Serial Gadget talks to the Linux-USB generic serial driver.
848           This driver supports a CDC-ACM module option, which can be used
849           to interoperate with MS-Windows hosts or with the Linux-USB
850           "cdc-acm" driver.
851
852           This driver also supports a CDC-OBEX option.  You will need a
853           user space OBEX server talking to /dev/ttyGS*, since the kernel
854           itself doesn't implement the OBEX protocol.
855
856           Say "y" to link the driver statically, or "m" to build a
857           dynamically linked module called "g_serial".
858
859           For more information, see Documentation/usb/gadget_serial.txt
860           which includes instructions and a "driver info file" needed to
861           make MS-Windows work with CDC ACM.
862
863 config USB_MIDI_GADGET
864         tristate "MIDI Gadget (EXPERIMENTAL)"
865         depends on SND && EXPERIMENTAL
866         select SND_RAWMIDI
867         help
868           The MIDI Gadget acts as a USB Audio device, with one MIDI
869           input and one MIDI output. These MIDI jacks appear as
870           a sound "card" in the ALSA sound system. Other MIDI
871           connections can then be made on the gadget system, using
872           ALSA's aconnect utility etc.
873
874           Say "y" to link the driver statically, or "m" to build a
875           dynamically linked module called "g_midi".
876
877 config USB_G_PRINTER
878         tristate "Printer Gadget"
879         help
880           The Printer Gadget channels data between the USB host and a
881           userspace program driving the print engine. The user space
882           program reads and writes the device file /dev/g_printer to
883           receive or send printer data. It can use ioctl calls to
884           the device file to get or set printer status.
885
886           Say "y" to link the driver statically, or "m" to build a
887           dynamically linked module called "g_printer".
888
889           For more information, see Documentation/usb/gadget_printer.txt
890           which includes sample code for accessing the device file.
891
892 config USB_ANDROID
893         boolean "Android Gadget"
894         depends on SWITCH
895         help
896           The Android gadget driver supports multiple USB functions.
897           The functions can be configured via a board file and may be
898           enabled and disabled dynamically.
899
900 config USB_ANDROID_ACM
901         boolean "Android gadget ACM serial function"
902         depends on USB_ANDROID
903         help
904           Provides ACM serial function for android gadget driver.
905
906 config USB_DUN_SUPPORT
907         boolean "DUN support function"
908         depends on USB_ANDROID_ACM
909         help
910           Provides USB modem serial driver.
911
912 config USB_ANDROID_ADB
913         boolean "Android gadget adb function"
914         depends on USB_ANDROID
915         help
916           Provides adb function for android gadget driver.
917
918 config USB_ANDROID_MASS_STORAGE
919         boolean "Android gadget mass storage function"
920         depends on USB_ANDROID && SWITCH
921         help
922           Provides USB mass storage function for android gadget driver.
923
924 config USB_ANDROID_MTP
925         boolean "Android MTP function"
926         depends on USB_ANDROID
927         help
928           Provides Media Transfer Protocol (MTP) support for android gadget driver.
929
930 config USB_ANDROID_RNDIS
931         boolean "Android gadget RNDIS ethernet function"
932         depends on USB_ANDROID
933         help
934           Provides RNDIS ethernet function for android gadget driver.
935
936 config USB_ANDROID_RNDIS_WCEIS
937         boolean "Use Windows Internet Sharing Class/SubClass/Protocol"
938         depends on USB_ANDROID_RNDIS
939         help
940          Causes the driver to look like a Windows-compatible Internet
941          Sharing device, so Windows auto-detects it.
942
943          If you enable this option, the device is no longer CDC ethernet
944          compatible.
945
946 config USB_ANDROID_ECM
947         boolean "Android gadget ECM function"
948         depends on USB_ANDROID
949         help
950           Provides ECM function for android gadget driver.
951
952 config USB_ANDROID_SAMSUNG_COMPOSITE
953         boolean "Samsung Composite function"
954         depends on USB_ANDROID
955         help
956           Provides SAMSUNG composite driver using ACM, UMS, ADB, MTP, RNDIS
957
958 config USB_ANDROID_SAMSUNG_COMPOSITE_ADVANCED
959         boolean "Samsung Composite function anvanced"
960         depends on USB_ANDROID_SAMSUNG_COMPOSITE
961         help
962           Provides SAMSUNG composite driver using ACM, UMS, ADB, MTP, RNDIS
963
964 config USB_ANDROID_SAMSUNG_ESCAPE
965         boolean "Use escape usb host driver in PC side."
966         depends on USB_ANDROID_SAMSUNG_COMPOSITE
967         help
968           If you enable this option, the device will setting custom IAD for Escape driver.
969
970 config USB_ANDROID_SAMSUNG_KIES_UMS
971         boolean "Use UMS composite in Samsung Kies mode"
972         depends on USB_ANDROID_SAMSUNG_ESCAPE
973         help
974           If you enable this option, the ums will be used in Kies mode.
975
976 config CONFIG_USB_ANDROID_SAMSUNG_RNDIS_WITH_MS_COMPOSITE
977         boolean "Use RNDIS with ms composite in PC side."
978         depends on USB_ANDROID_SAMSUNG_COMPOSITE
979         help
980           If you enable this option, the device will setting custom IAD for to use ms composite.
981
982 config USB_ANDROID_SAMSUNG_MTP
983         boolean "Samsung MTP function"
984         depends on USB_ANDROID
985         help
986           Provides Media Transfer Protocol (MTP) support for samsung gadget driver.
987
988 config USB_ANDROID_SAMSUNG_SDB
989         boolean "Samsung SDB function"
990         depends on USB_ANDROID && USB_ANDROID_SAMSUNG_COMPOSITE_ADVANCED && !USB_ANDROID_ADB
991         help
992           Provides Samsung SDB(for SDK) support for samsung gadget driver.
993
994 config USB_CDC_COMPOSITE
995         tristate "CDC Composite Device (Ethernet and ACM)"
996         depends on NET
997         help
998           This driver provides two functions in one configuration:
999           a CDC Ethernet (ECM) link, and a CDC ACM (serial port) link.
1000
1001           This driver requires four bulk and two interrupt endpoints,
1002           plus the ability to handle altsettings.  Not all peripheral
1003           controllers are that capable.
1004
1005           Say "y" to link the driver statically, or "m" to build a
1006           dynamically linked module.
1007
1008 config USB_G_NOKIA
1009         tristate "Nokia composite gadget"
1010         depends on PHONET
1011         help
1012           The Nokia composite gadget provides support for acm, obex
1013           and phonet in only one composite gadget driver.
1014
1015           It's only really useful for N900 hardware. If you're building
1016           a kernel for N900, say Y or M here. If unsure, say N.
1017
1018 config USB_G_MULTI
1019         tristate "Multifunction Composite Gadget (EXPERIMENTAL)"
1020         select USB_G_MULTI_ACM if !USB_G_MULTI_ANYTHING
1021         help
1022           The Multifunction Composite Gadget provides several different
1023           configurations and functions.  Which interfaces are provided can
1024           be configured at build time.  If you choose this gadget additional
1025           options will appear.
1026
1027           Say "y" to link the driver statically, or "m" to build a
1028           dynamically linked module called "g_multi".
1029
1030 config USB_G_MULTI_ANYTHING
1031         bool
1032         depends on USB_G_MULTI
1033
1034 config USB_G_MULTI_RECONFIGURE
1035         bool
1036         depends on USB_G_MULTI
1037
1038 config USB_G_MULTI_RNDIS
1039         bool "Include RNDIS function"
1040         depends on USB_G_MULTI && NET
1041         select USB_G_MULTI_ANYTHING
1042         default y
1043         help
1044           This option enables the RNDIS (Ethernet) function.  It is
1045           protocol dedicated for Windows since it's Microsoft's invention.
1046
1047           If you select also CDC ECM function gadget will have two
1048           configurations one with RNDIS and another with CDC ECM.
1049
1050           If unsure, say "y".
1051
1052 config USB_G_MULTI_ECM
1053         bool "Include CDC ECM function"
1054         depends on USB_G_MULTI && NET
1055         select USB_G_MULTI_ANYTHING
1056         help
1057           This option enables a configuration with CDC Ethernet (ECM), CDC
1058           Serial and Mass Storage functions available in the Multifunction
1059           Composite Gadget.
1060
1061           If unsure, say "y".
1062
1063 config USB_G_MULTI_ACM
1064         bool "Include CDC ACM function"
1065         depends on USB_G_MULTI
1066         default y
1067         help
1068           This option enables the CDC ACM (serial) function.  
1069
1070           If unsure, say "y".
1071
1072 config SAMSUNG_USB_SUPPORT
1073         bool "SAMSUNG USB Driver"
1074         depends on USB_G_MULTI_ACM
1075         default n
1076         help
1077           This option enables the SAMSUNG USB driver
1078
1079 config USB_G_MULTI_MSF
1080         bool "Include mass storage function"
1081         depends on USB_G_MULTI && BLOCK
1082         select USB_G_MULTI_ANYTHING
1083         default y
1084         help
1085           This option enables the mass storage (or UMS) function.  
1086
1087           If unsure, say "y".
1088
1089 config USB_G_MULTI_ADB
1090         bool "Android ADB function"
1091         depends on USB_G_MULTI && !(USB_G_MULTI_CDC && USB_G_MULTI_RNDIS)
1092         default n
1093         help
1094           This option enables the Android's ADB interface.  This works
1095           only with a single configuration driver so you cannot chose both
1096           Ethernet interfaces (CDC ECM, RNDIS or none but not both).
1097
1098           If unsure, say "n".
1099
1100 config USB_G_MULTI_FUNCTIONFS
1101         bool "FunctionFS userspace interface for MTP/PTP"
1102         depends on USB_G_MULTI
1103         select USB_G_MULTI_RECONFIGURE
1104         default n
1105         help
1106           This option enables the FunctionFS userspace interface.
1107           It can be used for providing support for PTP/MTP USB functions
1108           that require userspace deamon.
1109
1110           If unsure, say "n".
1111
1112 config USB_G_MULTI_INSTALL
1113         bool "Install Mode"
1114         depends on USB_G_MULTI && BLOCK
1115         select USB_G_MULTI_RECONFIGURE
1116         default n
1117         help
1118           This option enables an "Install Mode" configuration.  You may
1119           also refer to in as NoCD or ZeroCD (although the later is
1120           a trademark).
1121
1122           This mode makes gadget appear as an USB Mass Storage device
1123           emulating a CD-ROM the first time it is connected.  The intend
1124           is that you can put drivers for your gadget on the disk image.
1125
1126           When eject request is sent to the logical translation unit
1127           gadget switches its mode to the full flagged gadget with all the
1128           other functions.
1129
1130           When device is disconnected, gadget once again switches to the
1131           Install Mode configuration.
1132
1133           If unsure, say "n".
1134
1135 config USB_DYNAMIC_BIND
1136         bool "Dynamic multi gadget mode"
1137         depends on USB_G_MULTI && BLOCK
1138         select USB_G_MULTI_RECONFIGURE
1139         default n
1140         help
1141           This option enables an "Dynamic multi bind mode" configuration.
1142           If unsure, say "n".
1143
1144 config USB_G_HID
1145         tristate "HID Gadget"
1146         help
1147           The HID gadget driver provides generic emulation of USB
1148           Human Interface Devices (HID).
1149
1150           For more information, see Documentation/usb/gadget_hid.txt which
1151           includes sample code for accessing the device files.
1152
1153           Say "y" to link the driver statically, or "m" to build a
1154           dynamically linked module called "g_hid".
1155
1156 config USB_G_DBGP
1157         tristate "EHCI Debug Device Gadget"
1158         help
1159           This gadget emulates an EHCI Debug device. This is useful when you want
1160           to interact with an EHCI Debug Port.
1161
1162           Say "y" to link the driver statically, or "m" to build a
1163           dynamically linked module called "g_dbgp".
1164
1165 if USB_G_DBGP
1166 choice
1167         prompt "EHCI Debug Device mode"
1168         default USB_G_DBGP_SERIAL
1169
1170 config USB_G_DBGP_PRINTK
1171         depends on USB_G_DBGP
1172         bool "printk"
1173         help
1174           Directly printk() received data. No interaction.
1175
1176 config USB_G_DBGP_SERIAL
1177         depends on USB_G_DBGP
1178         bool "serial"
1179         help
1180           Userland can interact using /dev/ttyGSxxx.
1181 endchoice
1182 endif
1183
1184 # put drivers that need isochronous transfer support (for audio
1185 # or video class gadget drivers), or specific hardware, here.
1186 config USB_G_WEBCAM
1187         tristate "USB Webcam Gadget"
1188         depends on VIDEO_DEV
1189         help
1190           The Webcam Gadget acts as a composite USB Audio and Video Class
1191           device. It provides a userspace API to process UVC control requests
1192           and stream video data to the host.
1193
1194           Say "y" to link the driver statically, or "m" to build a
1195           dynamically linked module called "g_webcam".
1196
1197 endchoice
1198
1199 endif # USB_GADGET