[PATCH 0/9] Android Composite Gadget driver

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Dear All,


This is the third version of the Android Composite Gadget driver
and is a follow-up to this threads:

http://www.spinics.net/lists/linux-usb/msg56065.html
http://thread.gmane.org/gmane.linux.usb.general/56245
http://www.spinics.net/lists/linux-usb/msg59641.html

v3:

Implement review comments after Michal's and Manu's reviews -
thank you guys.

This version does not contain the Accessory function.

This version still uses sysfs to configure things.

@Felipe: Is it possible that you pull this into staging?
We really need a multifunction composite gadget configurable
at runtime from userspace, be it "Android" gadget or anything
named differently and would prefer to have it in 3.5. Conversion
to configfs will take a considerable amount of time and I am
afraid we won't make it for 3.5.

v2:

This version removes adb, mtp and ptp functions in favor of
introducing the FunctionFS function, which enables certain
functions to be implemented in userspace. An example setup would
be e.g. mass_storage provided by the gadget itself and
mtp, ptp and adb provided from userspace through FunctionFS.

This version also contains some changes after Felipe's, Greg's,
and Michal's reviews.

The original patch 07/10 was apparently meant to introduce
the Android Composite Gadget driver, but in fact it only
added respective Kconfig and Makefile entries, while the
patch 08/10 added the android gadget proper plus mtp/ptp functions.
In this patch series the original patches 07/10 and 08/10 are
merged together, and from that combined version the mtp and ptp
are removed.

This series requires that the patch series found here:

http://www.spinics.net/lists/linux-usb/msg59641.html

is applied before.

@Benoit & Mike: I think applied the authorship information correctly.
If not, please do correct it.

v1:

The Android 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/android_usb/android0/enable
echo rndis,acm > /sys/class/android_usb/android0/functions
echo 2       > /sys/class/android_usb/android0/f_acm/instances
echo 2d01    > /sys/class/android_usb/android0/idProduct
echo 1       > /sys/class/android_usb/android0/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.

Rebased on top of Linux 3.4-rc3.

Patch 1 to 6 are small additions/fixes to the composite framework.

Patch 7 adds main gadget driver.

Patch 8 adds FunctionFS function.

Patch 9 adds respective sysfs files description.


Andrzej Pietrasiewicz (2):
  usb: gadget: Add FunctionFS support to Android Composite Gadget
    driver
  usb: gadget: add sysfs files description for Android Composite Gadget

Benoit Goby (5):
  usb: gadget: composite: Add usb_remove_config
  usb: gadget: composite: Initialize config->interface
  usb: gadget: u_serial: Allow calling gserial_setup after init
  usb: gadget: rndis: Fix re-binding f_rndis
  usb: gadget: f_rndis: Set rndis vendor parameters

Mike Lockwood (2):
  usb: gadget: Add variant of gether_setup to customize the device name
  usb: gadget: Add Android Composite Gadget driver

 Documentation/ABI/testing/sysfs-class-android_usb |  158 +++
 drivers/usb/gadget/Kconfig                        |    9 +
 drivers/usb/gadget/Makefile                       |    2 +
 drivers/usb/gadget/android.c                      | 1369 +++++++++++++++++++++
 drivers/usb/gadget/composite.c                    |   69 +-
 drivers/usb/gadget/f_rndis.c                      |   30 +-
 drivers/usb/gadget/u_ether.c                      |    8 +-
 drivers/usb/gadget/u_ether.h                      |   46 +-
 drivers/usb/gadget/u_serial.c                     |    4 +-
 include/linux/usb/composite.h                     |    3 +
 10 files changed, 1651 insertions(+), 47 deletions(-)
 create mode 100644 Documentation/ABI/testing/sysfs-class-android_usb
 create mode 100644 drivers/usb/gadget/android.c

--
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


[Index of Archives]     [Linux Media]     [Linux Input]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Old Linux USB Devel Archive]

  Powered by Linux