[PATCHv2 00/10] Android Composite Gadget driver

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

 



Dear All,

This is the second 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

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

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

Patch 7 adds main gadget driver.

Patch 8 adds the accessory function.

Patch 9 adds FunctionFS function.

Patch 10 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 (3):
  usb: gadget: Add variant of gether_setup to customize the device name
  usb: gadget: Add Android Composite Gadget driver
  usb: gadget: accessory: Add Android Accessory function

 Documentation/ABI/testing/sysfs-class-android_usb |  165 +++
 drivers/usb/gadget/Kconfig                        |    9 +
 drivers/usb/gadget/Makefile                       |    2 +
 drivers/usb/gadget/android.c                      | 1399 +++++++++++++++++++++
 drivers/usb/gadget/composite.c                    |   70 +-
 drivers/usb/gadget/f_accessory.c                  |  796 ++++++++++++
 drivers/usb/gadget/f_rndis.c                      |   22 +-
 drivers/usb/gadget/u_ether.c                      |   22 +-
 drivers/usb/gadget/u_ether.h                      |   12 +
 drivers/usb/gadget/u_serial.c                     |    4 +-
 include/linux/usb/composite.h                     |    3 +
 include/linux/usb/f_accessory.h                   |   83 ++
 12 files changed, 2558 insertions(+), 29 deletions(-)
 create mode 100644 Documentation/ABI/testing/sysfs-class-android_usb
 create mode 100644 drivers/usb/gadget/android.c
 create mode 100644 drivers/usb/gadget/f_accessory.c
 create mode 100644 include/linux/usb/f_accessory.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


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

  Powered by Linux