[PATCH 00/10] Android Composite Gadget driver

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

 



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, adb, rndis, mtp/ptp, 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 and adb (Android Debug
Bridge) is only enabled when the user wants to debug applications
for security reasons.

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.2-rc6


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

Patch 7 adds the main gadget driver.

Patch 8 to 10 add the mtp, adb and accessory functions.


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 (5):
  usb: gadget: Add variant of gether_setup to customize the device name
  usb: gadget: Add Android Composite Gadget driver
  usb: gadget: mtp: Add MTP/PTP function
  usb: gadget: adb: Add ADB function
  usb: gadget: accessory: Add Android Accessory function

 drivers/usb/gadget/Kconfig       |    9 +
 drivers/usb/gadget/Makefile      |    2 +
 drivers/usb/gadget/android.c     | 1211 +++++++++++++++++++++++++++++++++++
 drivers/usb/gadget/composite.c   |   70 ++-
 drivers/usb/gadget/f_accessory.c |  796 +++++++++++++++++++++++
 drivers/usb/gadget/f_adb.c       |  611 ++++++++++++++++++
 drivers/usb/gadget/f_mtp.c       | 1283 ++++++++++++++++++++++++++++++++++++++
 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 +++
 include/linux/usb/f_mtp.h        |   75 +++
 14 files changed, 4174 insertions(+), 29 deletions(-)
 create mode 100644 drivers/usb/gadget/android.c
 create mode 100644 drivers/usb/gadget/f_accessory.c
 create mode 100644 drivers/usb/gadget/f_adb.c
 create mode 100644 drivers/usb/gadget/f_mtp.c
 create mode 100644 include/linux/usb/f_accessory.h
 create mode 100644 include/linux/usb/f_mtp.h

-- 
1.7.3.1

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