On Mon, May 14, 2012 at 03:51:53PM +0200, Andrzej Pietrasiewicz wrote: > The Configurable Gadget driver is a composite driver that allows > userspace to change at runtime the list of functions enabled in > its configuration and to configure these functions. It supports > multiple functions: acm, rndis, mass storage and accessory. > > It is usually controlled by a daemon that changes the configuration > based on user settings. For example, rndis is enabled when the user > enables sharing the phone data connection. > > As an example on how to use it, the following shell commands will > make the gadget disconnect from the host and make it be re-enumerated > as a composite with 1 rndis and 2 acm interfaces, and a different > product id: > > echo 0 > /sys/class/ccg_usb/ccg0/enable > echo rndis,acm > /sys/class/ccg_usb/ccg0/functions > echo 2 > /sys/class/ccg_usb/ccg0/f_acm/instances > echo -n 0x2d01 > /sys/module/g_ccg/parameters/idProduct > echo 1 > /sys/class/ccg_usb/ccg0/enable > > The driver requires a gadget controller that supports software > control of the D+ pullup and the controller driver must support > disabling the pullup during composite_bind. > > Signed-off-by: Mike Lockwood <lockwood@xxxxxxxxxxx> > Signed-off-by: Benoit Goby <benoit@xxxxxxxxxxx> > [import android.c, implement review comments, remove adb,mtp,ptp,accessory] > Signed-off-by: Andrzej Pietrasiewicz <andrzej.p@xxxxxxxxxxx> > Signed-off-by: Kyungmin Park <kyungmin.park@xxxxxxxxxxx> > --- > drivers/staging/Makefile | 1 + > drivers/staging/ccg/Kconfig | 8 + > drivers/staging/ccg/Makefile | 4 + > drivers/staging/ccg/TODO | 6 + > drivers/staging/ccg/ccg.c | 995 +++++++++++++++++++++++++++++++ > drivers/staging/ccg/sysfs-class-ccg_usb | 128 ++++ > drivers/usb/gadget/Kconfig | 2 + > 7 files changed, 1144 insertions(+), 0 deletions(-) > create mode 100644 drivers/staging/ccg/Kconfig > create mode 100644 drivers/staging/ccg/Makefile > create mode 100644 drivers/staging/ccg/TODO > create mode 100644 drivers/staging/ccg/ccg.c > create mode 100644 drivers/staging/ccg/sysfs-class-ccg_usb > > diff --git a/drivers/staging/Makefile b/drivers/staging/Makefile > index e4637d1..eae8a21 100644 > --- a/drivers/staging/Makefile > +++ b/drivers/staging/Makefile > @@ -56,3 +56,4 @@ obj-$(CONFIG_ANDROID) += android/ > obj-$(CONFIG_PHONE) += telephony/ > obj-$(CONFIG_RAMSTER) += ramster/ > obj-$(CONFIG_USB_WPAN_HCD) += ozwpan/ > +obj-$(CONFIG_USB_G_CCG) += ccg/ > diff --git a/drivers/staging/ccg/Kconfig b/drivers/staging/ccg/Kconfig > new file mode 100644 > index 0000000..8015c74 > --- /dev/null > +++ b/drivers/staging/ccg/Kconfig > @@ -0,0 +1,8 @@ > +config USB_G_CCG > + tristate "Configurable Composite Gadget (EXPERIMENTAL)" > + depends on EXPERIMENTAL This needs to depend on STAGING, right? > --- a/drivers/usb/gadget/Kconfig > +++ b/drivers/usb/gadget/Kconfig > @@ -842,6 +842,8 @@ config USB_G_PRINTER > For more information, see Documentation/usb/gadget_printer.txt > which includes sample code for accessing the device file. > > +source "drivers/staging/ccg/Kconfig" > + Why are you including this here and not in drivers/staging/Kconfig? That is where it should be to show that this really is a staging driver. Care to rework this one again and resend it and the 3/3 patch as I only applied the 1st one in this series. thanks, greg k-h -- To unsubscribe from this list: send the line "unsubscribe linux-usb" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html