Skip to content

Commit

Permalink
USB: g_multi: Multifunction Composite Gadget added
Browse files Browse the repository at this point in the history
The Multifunction Composite Gadget has two configurations
consisting of Ethernet (RNDIS in first and CDC Ethernet in
second configuration), CDC Serial and File-backed Storage
functions.

When connected to a Windows host, the first configuration
is chosen thus gadget provides RNDIS Ethernet, serial and
mass storage whereas when connected to Linux host, second
configuration is chosen thus providing CDC Ethernet,
serial and mass storage.

Which configurations are built can be configured via
KConfig options.

Signed-off-by: Michal Nazarewicz <m.nazarewicz@samsung.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
  • Loading branch information
Michal Nazarewicz authored and gregkh committed Dec 11, 2009
1 parent c85efcb commit f176a5d
Show file tree
Hide file tree
Showing 3 changed files with 399 additions and 0 deletions.
42 changes: 42 additions & 0 deletions drivers/usb/gadget/Kconfig
Expand Up @@ -812,6 +812,48 @@ config USB_CDC_COMPOSITE
Say "y" to link the driver statically, or "m" to build a
dynamically linked module.

config USB_G_MULTI
tristate "Multifunction Composite Gadget (EXPERIMENTAL)"
help
The Multifunction Composite Gadget provides Ethernet (RNDIS
and/or CDC Ethernet), mass storage and ACM serial link
interfaces.

You will be asked too choose which of the two configurations are
to be available in the gadget. At least one configuration must
be choosen to make gadget usable. Selecting more then one
configuration will prevent Windows from automatically detecting
the gadget as a composite gadget an INF file will be needed to
use the gadget.

Say "y" to link the driver statically, or "m" to build a
dynamically linked module called "g_multi".

config USB_G_MULTI_RNDIS
bool "RNDIS + CDC Serial + Storage configuration"
depends on USB_G_MULTI
default y
help
This option enables a configuration with RNDIS, CDC Serial and
Mass Storage functions available in the Multifunction Composite
Gadget. This is configuration dedicated for Windows since RNDIS
is Microsfot's protocol.

If unsure, say "y".

config USB_G_MULTI_CDC
bool "CDC Ethernet + CDC Serial + Storage configuration"
depends on USB_G_MULTI
default n
help
This option enables a configuration with CDC Ethernet (ECM), CDC
Serial and Mass Storage functions available in the Multifunction
Composite Gadget. This is configuration dedicated for Windows
since RNDIS is Microsfot's protocol.

If unsure, say "y".


# put drivers that need isochronous transfer support (for audio
# or video class gadget drivers), or specific hardware, here.

Expand Down
2 changes: 2 additions & 0 deletions drivers/usb/gadget/Makefile
Expand Up @@ -42,6 +42,7 @@ g_file_storage-objs := file_storage.o
g_mass_storage-objs := mass_storage.o
g_printer-objs := printer.o
g_cdc-objs := cdc2.o
g_multi-objs := multi.o

obj-$(CONFIG_USB_ZERO) += g_zero.o
obj-$(CONFIG_USB_AUDIO) += g_audio.o
Expand All @@ -53,4 +54,5 @@ obj-$(CONFIG_USB_G_SERIAL) += g_serial.o
obj-$(CONFIG_USB_G_PRINTER) += g_printer.o
obj-$(CONFIG_USB_MIDI_GADGET) += g_midi.o
obj-$(CONFIG_USB_CDC_COMPOSITE) += g_cdc.o
obj-$(CONFIG_USB_G_MULTI) += g_multi.o

0 comments on commit f176a5d

Please sign in to comment.