summaryrefslogtreecommitdiff
path: root/drivers/usb
AgeCommit message (Collapse)Author
2015-02-26Modifications for using TUSB1211 with ULPI on our board.mattis fjallstrom
Change-Id: I2e9bea100d30e40ff3188bb9ca7c6d112e2604c1
2014-07-21IKXCLOCK-3107 Reduce kernel loggingDoug Zobel
Change-Id: I6efba076db7129990d4b2d9a64d97e0121de0b2e
2014-07-10IKXCLOCK-2570 usb: phy: tusb: add support for supplied_toMohsan Habibi
Since USB can serve as a power supply for various components, add supplied_to support that can be specified in device tree. This will allow drivers that need to be USB-power-aware to be able to be notified of VBUS state changes. Change-Id: I36b33a2ef856faed13325e4d75e2398e4bb909a2 Signed-off-by: Mohsan Habibi <mohsan@motorola.com>
2014-07-02IKXCLOCK-2631 usb: omap2430: remove low_level_* callsJim Wylder
Disabling force standby causes the HSOTG clock to stick on after USB is resumed. Change-Id: I8cb89d866b7113727553cfa5b9791e6602cf82f4 Signed-off-by: Jim Wylder <jwylder@motorola.com>
2014-06-10IKXCLOCK-1638 Compilation err fixVladimir Tsunaev
Change-Id: Ia3aa43388f63bdfac3ce5bc65b3e0cf16e22a37c Signed-off-by: Vladimir Tsunaev <vladimirt@motorola.com>
2014-06-09IKXCLOCK-1638 Idle Mode RetentionVladimir Tsunaev
Signed-off-by: Vladimir Tsunaev <vladimirt@motorola.com>
2014-05-30IKXCLOCK-1848: kernel: musb: reset phy only when VBUS is onRiyad Abd
When msub calls reset to phy, phy will only do it if VBUS is present otherwise, it will ignore the call. Change-Id: I69a1e068672045c8da26a3c4b236d25fe533c862
2014-05-29IKXCLOCK-1624: kernel: consecutive fastboot/adb failsRiyad Abd
Change-Id: I428b91a1faeded005ad5efe4276774354b350b91
2014-05-23IKXCLOCK-1654 kernel: revert MUSB changes made in IKXCLOCK-1323Riyad Abd
Change-Id: I7f43a5d9ba9afac03da1ffa2e20d00209a63910c
2014-05-23IKXCLOCK-1568 omap3: musb: USB enumeration fails after offmodeDoug Zobel
After OMAP hits offmode, USB enumeration fails. The PM_PWSTCTRL_USBHOST.SAVEANDRESTORE feature cannot be used because it breaks offmode. Instead, the musb context is stored on driver suspend and restored on driver resume. Change-Id: I8a22c132df9a183cb7a53822c840a05fe6d7d0dc
2014-05-21IKXCLOCK-1323: musb: force d+/d- transition via vbusRiyad Abd
When CONFIG_MUSB_HARDCONNECT is defined in defconfig force the musb driver to call pullup enable/disable API which will cause registered phy to set the state of the vbus line and hence control d+/d- and reset usb controller. Change-Id: I6b4db4e3af4c2151512bf0f708302f9687d4bd89
2014-05-21IKXCLOCK-1323: drivers:phy: control reset via vbus_set apiRiyad Abd
Create a helper function and move code from worker queue and re-use it whenever it is required by both, the new reset routine and worker queue. Implement vbus_set and allow gadget driver to control reset sequence by calling vbus_set APIs. Change-Id: I11b7e0c0f92b8a273d1569da3016f49f56ea64ca
2014-04-28IKXCLOCK-871: usb: phy: tusb: Notify Android when externally poweredDmitriy Gruzman
Set /sys/class/power_supply/ac/online to "1" when powered by VBUS to prevent the device from powering off when battery capacity is reported as 0%. Change-Id: I695977785086d3f9e4ecbcb31a4522a85c089b88 Signed-off-by: Dmitriy Gruzman <dgruzman@motorola.com>
2014-04-28IKXCLOCK-871: usb: phy: tusb: Change initcall priority from subsys to deviceDmitriy Gruzman
Change driver initcall priority to the device since this driver is not a subsystem. Particularily, calling power_supply_register() from the probe() would fail before since probe() was executed before power supply subsystem is initialized. Change-Id: I2f247b41b3875ead8aa393fdec52f88c33369167 Signed-off-by: Dmitriy Gruzman <dgruzman@motorola.com>
2014-04-28IKXCLOCK-871: usb: phy: tusb: Move enabling irq to the end of probeDmitriy Gruzman
Enable irq after driver is ready to process interrupts (workqueue is created, usb phy device is declared, etc.) and add missing error checking. Change-Id: Ic435e232488525396584669cfb65443ac0257248 Signed-off-by: Dmitriy Gruzman <dgruzman@motorola.com>
2014-04-03IKXCLOCK-638 Add control for external 26 MHz clock which is used for both ↵Wengang Wu
display and usb Change-Id: I3d03546bdbc7086552ae9890ee483ef911a44c03
2014-03-19IKXCLOCK-468 usb: gadget: acc_hid_work check for devJames Wylder
During a shutdown, the _acc_dev will be set to NULL in acc_cleanup. acc_hid_work should be stopped prior to clearing _acc_dev. Change-Id: Ie15169ebe2991383e45f8ca8de92e7c5aa275ffa Signed-off-by: James Wylder <jwylder@motorola.com>
2014-03-12IKXCLOCK-424 usb: Enable usbnet. adb fails without this.Jee Su Chang
Change-Id: I463d029f0411452d504c048b6f37fc143df835ee
2014-03-05IKXCLOCK-242 usb: Initialize t-usb phy at probeDoug Zobel
TUSB phy driver needs to set the phy to the correct state once at boot since there may not be an interrupt fired when they are enabled. Change-Id: I3cda43cee8048a3bb90eb1b4b2a7a0e581e016d5
2014-03-05IKXCLOCK-299: usb: phy: tusb set last_eventJames Wylder
Set the last_event value in the phy to ensure listeners can determine the state if they missed the notification. Change-Id: I07ebf592aa2dc761fc702c016e272abc5f4e90b9 Signed-off-by: James Wylder <jwylder@motorola.com>
2014-03-05IKXCLOCK-234 usb: Factory interface for tusb PHY driverDoug Zobel
Factory needs an interface to be able to force the tusb PHY driver to stay powered on even when VBUS is not present. A sysfs entry was added to give this control. Change-Id: I1a197f677af1246ff14a707a6fa6ce7fb167edc5
2014-03-05IKXCLOCK-165 usb: phy: tusb: add vbus notificationsJames Wylder
Send USB_EVENT_VBUS and USB_EVENT_NONE for VBUS insertion and VBUS removed. Change-Id: I8396346a25382037a0c588cf256fedfdf8a2bbd1 Reviewed-on: http://gerrit.pcs.mot.com/607998 SLTApproved: Slta Waiver <sltawvr@motorola.com> Tested-by: Jira Key <jirakey@motorola.com> Reviewed-by: Douglas Zobel <dzobel1@motorola.com> Submit-Approved: Jira Key <jirakey@motorola.com>
2014-03-05IKXCLOCK-165 usb: phy: otg_wakelock build dependenciesJames Wylder
Change-Id: Id8ed9d7c0593bab691236056b09305c9a4c899e7 Reviewed-on: http://gerrit.pcs.mot.com/607996 Tested-by: Jira Key <jirakey@motorola.com> SLTApproved: Slta Waiver <sltawvr@motorola.com> Reviewed-by: Douglas Zobel <dzobel1@motorola.com> Submit-Approved: Jira Key <jirakey@motorola.com>
2014-03-05IKXCLOCK-154 usb: Disable TI USB xcvr when VBUS is not present.Doug Zobel
Change-Id: I101ac959747908f3ee78d812b1b08b9b36b66bd0 Reviewed-on: http://gerrit.pcs.mot.com/607519 SLTApproved: Slta Waiver <sltawvr@motorola.com> Tested-by: Jira Key <jirakey@motorola.com> Reviewed-by: Jee Su Chang <w20740@motorola.com> Submit-Approved: Jira Key <jirakey@motorola.com>
2014-03-05IKXCLOCK-32 tusb dts: Add TUSB USB phy driverDoug Zobel
Add support for TI TUSB1211 USB phy driver. Enable phy when VBUS is sensed, and disable when VBUS is not present Change-Id: I80854285bdc15e7949c453b2efd6bacf829cd54b Reviewed-on: http://gerrit.pcs.mot.com/590175 SLTApproved: Slta Waiver <sltawvr@motorola.com> Tested-by: Jira Key <jirakey@motorola.com> Reviewed-by: Jee Su Chang <w20740@motorola.com> Reviewed-by: James Wylder <jwylder@motorola.com> Submit-Approved: Jira Key <jirakey@motorola.com>
2014-03-05CW integration and minnow bringupDoug Zobel
* create minnow machine type * create Android makefile * add pre-commit syntax check * enable -Werror * Add drivers: CPCAP, TPS65xxx, m4sensorhub, atmxt, lm3535, usb gadget, minnow display, TI 12xx wireless Change-Id: I7962f5e1256715f2452aed5a62a4f2f2383d5046
2014-02-25drivers: usb: gadget: 64-bit related type fixesGreg Hackmann
Change-Id: I2f9b12e1e0cdfe64ffe20db78d319a6221821184 Signed-off-by: Greg Hackmann <ghackmann@google.com>
2014-02-13fix false disconnect due to a signal sent to the reading processkeunyoung
- In the current implementation, when a signal is sent to the reading process, read is cancelled by calling usb_ep_dequeue, which lead into calling acc_complete_out with ECONNRESET, but the current logic treats it as disconnection, which makes the device inaccessible until cable is actually disconnected. - The fix calls disconnect only when ESHUTDOWN error is passed. - If data has already arrived while trying cancelling, the data is marked as available, and it will be read out on the next read. This is necessary as USB bulk is assumed to guarantee no data loss. Signed-off-by: keunyoung <keunyoung@google.com>
2013-11-07usb: gadget: f_mtp: move userspace interface to uapiColin Cross
Move the most of linux/usb/f_mtp.h header to uapi. Move the only remaining structure definition into f_mtp.c, the only place that uses it. Change-Id: I952c1a9dc15c36bf295a0eb4d74b6b1ad912ed03 Signed-off-by: Colin Cross <ccross@android.com>
2013-10-24usb: gadget: android: Remove device if probe failsBenoit Goby
Make sure the android0 device is removed before we can destroy the class. Change-Id: Id584888c407beb80a1df4990f73fe31ccb9d4767 Signed-off-by: Benoit Goby <benoit@android.com>
2013-09-19USB: remove duplicate out endpoint creation in MTP modePeter Oh
Android MTP gadget uses 3 endpoints which are 1 in endpoint, 1 out endpoint, and 1 interrupt endpoint. However when MTP gadget creates its endpoints, it creates the out endpoint twice and overwrites the first created out endpoint with the second one, so that it causes a leak of endpoint resources. Change-Id: Iba82950095610b26b362f4b10a67cedfb1fee366 Signed-off-by: Peter Oh <poh@broadcom.com> Reviewed-on: http://mps-gerrit.broadcom.com/37744 Reviewed-by: Graham Williams <gwilli@broadcom.com> Reviewed-by: John Garry <jgarry@broadcom.com> Branch-Open: Branch Status <branch_status_noreply@broadcom.com> Reviewed-by: Checkpatch Status <checkpatch_status_noreply@broadcom.com> Reviewed-by: Joyjit Nath <joyjit@broadcom.com> Tested-by: AutoSubmit Status <autosubmit_status_noreply@broadcom.com>
2013-07-01usb: gadget: android: 3.10 fixesArve Hjønnevåg
Signed-off-by: Arve Hjønnevåg <arve@android.com>
2013-07-01usb: gadget: android: move init to late_initcall for nowArve Hjønnevåg
gserial_alloc_line crashes when called from module_init Signed-off-by: Arve Hjønnevåg <arve@android.com>
2013-07-01usb: gadget: android: Fixes and hacks to make android usb gadget compile on 3.9Arve Hjønnevåg
Signed-off-by: Arve Hjønnevåg <arve@android.com>
2013-07-01usb: gadget: Fix android gadget driver buildBenoit Goby
Removed obsolete f_adb function Change-Id: Idfb4110429bc0ea63f493c68ad667f49ca471987 Signed-off-by: Benoit Goby <benoit@android.com>
2013-07-01HACK: usb: gadget: Fix enumeration on bootBenoit Goby
The Android gadget driver disconnects the gadget on bind and expects the gadget to stay disconnected until it calls usb_gadget_connect when userspace is ready. Removed the call to usb_gadget_connect in usb_gadget_probe_driver to avoid enabling the pullup before userspace is ready. Change-Id: I63707ac6e16a44eca52351a4bf80407d25fbd35e Signed-off-by: Benoit Goby <benoit@android.com>
2013-07-01usb: gadget: android: Fixes and hacks to make android usb gadget compile on 3.8Arve Hjønnevåg
Signed-off-by: Arve Hjønnevåg <arve@android.com>
2013-07-01usb: otg: otg-wakelock: Fix build for 3.7Arve Hjønnevåg
Signed-off-by: Arve Hjønnevåg <arve@android.com>
2013-07-01usb: gadget: accessory: Fix section mismatch (again)Todd Poynor
create_bulk_endpoints should not be __init since it is called when accessory is enabled. Change-Id: Iac6e9f29d53c93760e926efd8e7603432632acb4 Signed-off-by: Todd Poynor <toddpoynor@google.com>
2013-07-01usb: gadget: f_fs: Fix enumeration in fullspeed modeBenoit Goby
ffs_func_eps_enable always take the highspeed usb_endpoint_descriptor if it is available. Choose the correct usb_endpoint_descriptor depending on the gadget speed instead. Change-Id: I5b8444cfdf1b6fe1eef25525fb7a0a0f617a353e Signed-off-by: Benoit Goby <benoit@android.com>
2013-07-01USB: gadget: f_audio_source: New gadget driver for audio outputMike Lockwood
This driver presents a standard USB audio class interface to the host and an ALSA PCM device to userspace Change-Id: If16b14a5ff27045f9cb2daaf1ae9195c5eeab7d0 Signed-off-by: Mike Lockwood <lockwood@google.com>
2013-07-01USB: gadget: f_accessory: Add support for HID input devicesMike Lockwood
Change-Id: I4f1452db32508382df52acdc47c0eb395ae328c7 Signed-off-by: Mike Lockwood <lockwood@google.com>
2013-07-01USB: gadget: Add ACCESSORY_SET_AUDIO_MODE control request and ioctlMike Lockwood
The control request will be used by the host to enable/disable USB audio and the ioctl will be used by userspace to read the audio mode Change-Id: I81c38611b588451e80eacdccc417ca6e11c60cab Signed-off-by: Mike Lockwood <lockwood@google.com>
2013-07-01usb: gadget: Fix usb string id allocationBenoit Goby
Don't reset next_string_id every time the gadget is enabled, this makes the next strings allocated overwrite strings allocated at probe time. Instead, fix rndis not to allocate new string ids on every config bind. Change-Id: Ied28ee416bb6f00c434c34176fe5b7f0dcb2b2d4 Signed-off-by: Benoit Goby <benoit@android.com>
2013-07-01usb: gadget: accessory: Fix section mismatchBenoit Goby
create_bulk_endpoints should not be __init since it is called when accessory is enabled Change-Id: If827a4531f0f6c15af938345163923186368e2a5 Signed-off-by: Benoit Goby <benoit@android.com>
2013-07-01usb: gadget: android: Add FunctionFSBenoit Goby
Add support for FunctionFS (ffs) to implement usb functions in userspace. The aliases property stores the list of functions that are implemented using functionfs. For example: echo "adb,mtp" > /sys/class/android_usb/android0/f_ffs/aliases Then when the function are enabled: echo "adb,acm" > /sys/class/android_usb/android0/functions Internally, ffs and acm will be used. Change-Id: I44117b183d48a5a99ddbee3ef2cf8998be74598e Signed-off-by: Benoit Goby <benoit@android.com>
2013-07-01usb: gadget: android: Fix product nameBenoit Goby
Product names may contain spaces and scanf %s only matches the 1st word. Use strlcpy instead. Change-Id: Ie8703fea9775f7fc17fe615a42597ca3816d36b0 Signed-off-by: Benoit Goby <benoit@android.com>
2013-07-01usb: gadget: composite: Fix corruption when changing configurationBenoit Goby
Remove the config from the configs list before releasing the spinlock. Otherwise the other cpu might be processing a SET_CONFIGURATION that will switch to the configuration that is being released. Change-Id: Id4da0d0e18ead63e20cb236cd1d3e8e6d116acce Signed-off-by: Benoit Goby <benoit@android.com>
2013-07-01usb: otg: otg-wakelock: Fix build for 3.4Benoit Goby
Change-Id: I97e21e9e6645bf18522675039e512f85fe836794 Signed-off-by: Benoit Goby <benoit@android.com>
2013-07-01usb: gadget: adb: Only enable the gadget when adbd is readyBenoit Goby
When adb is enabled, only connect the gadget when adbd is ready. If adbd dies or is restarted (e.g. "adb root"), the gadget is disconnected when the adb device is close, and it is re-connected once adb re-open the device. - Add callbacks to adb, similar to FunctionFs callbacks, to notify the gadget when the daemon is ready or closed. - Refcount calls to android_enable/android_disable to enable the gadget only once all the function daemons are ready. - Add enable/disble to android_usb_function to notify the function when it is added/removed from the list of enabled functions. Change-Id: Id54ff85aec9cf8715c94b4f9bd6137a79ad58bfc Signed-off-by: Benoit Goby <benoit@android.com>