Age | Commit message (Collapse) | Author |
|
* Functions and the device descriptor are configured from user space:
echo 0 > /sys/class/android_usb/android0/enable
echo adb,acm > /sys/class/android_usb/android0/functions
echo 2 > /sys/class/android_usb/android0/f_acm/instances
echo 1 > /sys/class/android_usb/android0/enable
* Driver does not require platform data anymore
* Moved function initialization to android.c instead of each
function file
* Replaced switches by uevents
Signed-off-by: Benoit Goby <benoit@android.com>
Signed-off-by: Mike Lockwood <lockwood@android.com>
Change-Id: If5ad9267c111ad0a442f0d87a0d31082dc5381b6
|
|
In adb_read(), if wait_event_interruptible() returns an error, we need to
remove the request from the EP queue. Else, on the next call to adb_read(), we
will attempt to enqueue the request again, potentially corrupting the
queue. This is what happens with musb_gadget_queue(), which does not check for
duplicate requests.
Signed-off-by: Iliyan Malchev <malchev@google.com>
|
|
Add switch to notify current USB configuration. This can be used to detect
USB connect and disconnect events.
Broadcast a change via the usb_composite class when a USB function is
enabled or disabled.
Rename usb_function.hidden to usb_function.disabled.
Signed-off-by: Mike Lockwood <lockwood@android.com>
|
|
usb: gadget: f_mass_storage: use dev_set_name()
Replacing strcpy() to device->bus_id which no longer exists in 2.6.32
Change-Id: Id978c881f457044c750bfd62f4c5bcc35bcd4fc5
Signed-off-by: Mike Lockwood <lockwood@android.com>
USB: gadget: f_adb: Claim endpoints so they are not reused by another function.
Change-Id: Ic9536cca800162e701c81cab36054f51ea759b72
Signed-off-by: Mike Lockwood <lockwood@android.com>
USB: gadget: f_acm: Fix crashes in acm_set_alt()
Change-Id: I91b761d392f8b1ca8784c69069b43e402b90d6a4
Signed-off-by: Mike Lockwood <lockwood@android.com>
USB: gadget: f_acm: Include android code only if CONFIG_USB_ANDROID_ACM is set.
Signed-off-by: Mike Lockwood <lockwood@android.com>
USB: gadget: Android support for RNDIS serial ethernet function.
Signed-off-by: Mike Lockwood <lockwood@android.com>
USB: gadget: android: Add function name to android_register_function printk.
Change-Id: I38bf79d9b544cdeaec9385f7482a131417fc4b23
Signed-off-by: Mike Lockwood <lockwood@android.com>
|
|
Previously we queued 4K requests rather than the count passed into read().
Signed-off-by: Mike Lockwood <lockwood@android.com>
|
|
USB: android gadget: add remote wakeup attribute to android function
Add remote wakeup attribute to configuration descriptor of android
function to advertise remote wakeup capability to host
Acked-by: Allam, Suresh Reddy <sallam@qualcomm.com>
Signed-off-by: Mike Lockwood <lockwood@android.com>
USB: gadget: android: Allow functions to handle setup requests.
Signed-off-by: Mike Lockwood <lockwood@android.com>
Support for specifying the list of USB functions from platform data.
The main android.c gadget driver no longer has hard coded references
to the mass_storage and adb functions.
Support for computing the product ID based on tables in platform data
and the currently enabled functions.
Moved the adb enable/disable logic from android.c to f_adb.c.
Change-Id: I6259d3fb1473ed973f700e55d17744956f3527bb
Signed-off-by: Mike Lockwood <lockwood@android.com>
|
|
Change-Id: I4101540916b73a5f4e48684727ff782f98b969c7
Signed-off-by: Mike Lockwood <lockwood@android.com>
USB: android gadget: add remote wakeup attribute to android function
Add remote wakeup attribute to configuration descriptor of android
function to advertise remote wakeup capability to host
Acked-by: Allam, Suresh Reddy <sallam@qualcomm.com>
Signed-off-by: Mike Lockwood <lockwood@android.com>
usb gadget: link fixes for android composite gadget
Signed-off-by: Mike Lockwood <lockwood@android.com>
usb gadget: Fix null pointer errors in android composite driver
Signed-off-by: Mike Lockwood <lockwood@android.com>
usb: gadget: android: Allow usb charging to draw up to 500mA instead of 250.
Signed-off-by: Rebecca Schultz Zavin <rebecca@android.com>
usb gadget: android: Add helper function for usb_gadget_connect and disconnect.
Signed-off-by: Mike Lockwood <lockwood@android.com>
drivers: usb: gadget: call switch_dev_unregister in mass storage unbind callback
This fixes a problem unloading the android gadget driver when built as a module
Signed-off-by: Mike Lockwood <lockwood@android.com>
usb: gadget: android: Add dependency on switch driver.
Signed-off-by: Mike Lockwood <lockwood@android.com>
USB: gadget: android: Fix USB WHQL Certification Issues
Submitted on behalf of RaviKumar Vembu <ravi.v@motorola.com>
Signed-off-by: Jared Suttles <jared.suttles@motorola.com>
Signed-off-by: Mike Lockwood <lockwood@android.com>
drivers: usb: gadget: Add "usb_mass_storage" platform driver.
This will be used for configuring vendor, product and release from board file.
Submitted on behalf of RaviKumar Vembu <ravi.v@motorola.com>
Signed-off-by: Jared Suttles <jared.suttles@motorola.com>
Signed-off-by: Mike Lockwood <lockwood@android.com>
drivers: usb: gadget: Use usb_mass_storage platform device as parent for lun
If a platform device is specified for the f_mass_storage function, use it as the
parent driver for the lun files in sysfs.
This allows a platform independent file path for controlling USB mass storage
from user space.
Signed-off-by: Mike Lockwood <lockwood@android.com>
drivers: usb: gadget: Add platform data struct for usb_mass_storage device
Signed-off-by: Mike Lockwood <lockwood@android.com>
usb: gadget: mass_storage: Fix Mass Storage Panic during PC reboot
Submitted on behalf of RaviKumar Vembu <ravi.v@motorola.com>
Signed-off-by: Jared Suttles <jared.suttles@motorola.com>
Signed-off-by: Mike Lockwood <lockwood@android.com>
usb: gadget: f_mass_storage: Handle setup request correctly
Signed-off-by: Mike Lockwood <lockwood@android.com>
usb: gadget: f_mass_storage: Clean up wakelocks on error paths
Signed-off-by: Rebecca Schultz Zavin <rebecca@android.com>
Signed-off-by: Mike Lockwood <lockwood@android.com>
|