f0724bcda2711df7ec9fa451c2cc70d345bf9778
393 Commits
| Author | SHA1 | Message | Date | |
|---|---|---|---|---|
|
|
81bda9d20e |
USB: core: Fix misc OTG related bugs
This patch fixes the following OTG related bugs: 1. The current code does not wait for the ongoing HNP polling work to finish upon the device disconnection which results in a crash when accessing the udev structure in hnp polling routine. 2. bcdOTG field is added to OTG descriptor in 2.0 revision. Check OTG descriptor size before validating bcdOTG field. A legacy device sends 2 bytes lesser than the size of OTG descriptor specified in 2.0 spec. 3. The host is required to execute a GetStatus() with a frequency of THOST_REQ_POLL in order to determine the state of the Host request flag. The limits of THOST_REQ_POLL are 1 - 2 sec. Use the average value 1.5 sec for HNP polling to pass compliance tests. Change-Id: Ie6a6a8e915d10c1347946f979c919d04d64823b4 Signed-off-by: Pavankumar Kondeti <pkondeti@codeaurora.org> Signed-off-by: Vijayavardhan Vennapusa <vvreddy@codeaurora.org> |
||
|
|
95b650ab5d |
USB: gadget: composite: Process GetDescriptor(OTG) request
If gadget is OTG capable, respond to a GetDescriptor(OTG) request with its OTG descriptor. This patch adds a utility to function to find and fill the requested descriptor. Change-Id: I5b3624b1145d46179b0c4737e82a47c68604cab4 Signed-off-by: Pavankumar Kondeti <pkondeti@codeaurora.org> Signed-off-by: Vijayavardhan Vennapusa <vvreddy@codeaurora.org> |
||
|
|
91223e07a7 |
USB: EHCI: msm: Add support for EHCI based Host Controller
This patch adds support for EHCI compliant USB Host Controller for Liquid on 8064. This driver supports Host only mode and is different from ehci-msm which relies on OTG driver for putting hardware in low pwer mode and PHY initialization as well. Change-Id: I84b63b2577311900a0b434f53df547bad62f6316 Signed-off-by: Manu Gautam <mgautam@codeaurora.org> Signed-off-by: Hemant Kumar <hemantk@codeaurora.org> |
||
|
|
cd82e9d62a |
msm: 8960: usb: Add msm_bus vote when cable is connected
Drivers need to specify their bandwidth requirements to bus-scaling driver to get guaranteed bandwidth on fabrics. USB hardware uses a single buffer to transfer data across the bus. As a result USB performance is highly dependent on system fabric frequency as USB controller continuously sends NAKs on the USB BUS unless complete buffer is filled/drained to the memory. Hence, request for high bus bandwidth as long as USB cable is connected to improve USB throughput. While testing with Class-10 Extreme III SD cards, this patch seems to improve the IN performance from 15MBps to 24MBps and OUT performance from 11MBps to 16MBps. CRs-Fixed: 327557 Change-Id: I21c284c611a09b1b12df9ae7a6f39e0b1bff45ef Signed-off-by: Manu Gautam <mgautam@codeaurora.org> |
||
|
|
ac5d15452f |
Revert: d702207826
Accidentally merged without proper testing. Change-Id: Iea6c3f7cd383357ac657fd15fde08cbab86bf809 Signed-off-by: David Brown <davidb@codeaurora.org> |
||
|
|
d702207826 |
Merge remote-tracking branch 'idos/usb3-msm-3.0-backport-dwc3' into merge/idos
Merge a backport of the following 82 commits from the 3.2 kernel. commit |
||
|
|
eae1148b27 |
usb: gadget: clean-up msm_usb_bam_platform_data structure
Due to changes in usb_bam driver and usage of the standard mechanism of platform resources instead of adding new platform data, usb_bam_phy_base and usb_bam_phy_size fields became unnecessary and were removed. Change-Id: I0f3a57724ecc033e704aaca6f651561a344c9fef Signed-off-by: Ofir Cohen <ofirc@codeaurora.org> |
||
|
|
7dd2266ae3 |
usb: msm_otg: Migrate to clock apis for XO voting
Use the clock APIs instead of the msm_xo APIs to vote on CXO. This removes one more msm specific api from this driver and will allow us to move XO control into the rpm clock driver. Change-Id: Ie9344aad20651002e98f13cd3adb39680fbd93bd Signed-off-by: Stephen Boyd <sboyd@codeaurora.org> |
||
|
|
9e42b8b008 |
usb: gadget: fix typo for default U1/U2 exit latencies
s/DEFULT/DEFAULT/, no functional changes. Signed-off-by: Felipe Balbi <balbi@ti.com> Signed-off-by: Ido Shayevitz <idos@codeaurora.org> |
||
|
|
61a3b903ab |
usb: gadget: udc-core: add "new-style" registration interface
udc_start() should only trigger the internal state machine and make minimal house keeping. Before that call udc-core calls the bind() callback and after the callback the pullup(). udc_stop() is simillar, udc-core calls pullup(), unbind() and finally udc_stop(). Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de> Signed-off-by: Felipe Balbi <balbi@ti.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> Signed-off-by: Ido Shayevitz <idos@codeaurora.org> |
||
|
|
355527ba15 |
usb: gadget: add SuperSpeed support to the Gadget Framework
SuperSpeed USB has defined a new descriptor, called the Binary Device Object Store (BOS) Descriptor. It has also changed a bit the definition of SET_FEATURE and GET_STATUS requests to add USB3-specific details. This patch implements both changes to the Composite Gadget Framework. [ balbi@ti.com : slight changes to commit log fixed a compile error on ARM ] Signed-off-by: Tatyana Brokhman <tlinder@codeaurora.org> Signed-off-by: Felipe Balbi <balbi@ti.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> Signed-off-by: Ido Shayevitz <idos@codeaurora.org> |
||
|
|
fd11902012 |
usb: gadget: add max_speed to usb_composite_driver
This field is used by the Gadget drivers to specify the maximum speed they support, meaning: the maximum speed they can provide descriptors for. The driver speed will be set in consideration of this value. [ balbi@ti.com : dropped the ifdeffery ] Signed-off-by: Tatyana Brokhman <tlinder@codeaurora.org> Signed-off-by: Felipe Balbi <balbi@ti.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> Signed-off-by: Ido Shayevitz <idos@codeaurora.org> |
||
|
|
24728e0ee2 |
usb: gadget: add streams support to the gadget framework
This patch defines necessary fields to support streaming for USB3.0. It implements a new function, called usb_ep_autoconfig_ss(), to be used instead of the existing usb_ep_autoconfig() when working in SuperSpeed mode and there is a need to search for an endpoint according to the number of required streams. [ balbi@ti.com : slight changes to commit log ] Signed-off-by: Maya Erez <merez@codeaurora.org> Signed-off-by: Tatyana Brokhman <tlinder@codeaurora.org> Signed-off-by: Felipe Balbi <balbi@ti.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> Signed-off-by: Ido Shayevitz <idos@codeaurora.org> |
||
|
|
ebd3f395ba |
usb: gadget: use config_ep_by_speed() instead of ep_choose()
Remove obsolete functions: 1. ep_choose() 2. usb_find_endpoint() Signed-off-by: Tatyana Brokhman <tlinder@codeaurora.org> Signed-off-by: Felipe Balbi <balbi@ti.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> [idos@codeaurora.org: Changed also the following files to comply with this commit: f_accessory.c,f_adb.c,f_diag.c,f_mtp.c, f_rmnet.c,f_rmnet_sdio,f_rmnet_smd,f_rmnet_smd_sdio,f_serial.f_ccid.c. Also merged a patch in f_serial.c for correct checking of the return value of config_ep_by_speed. See "usb: gadget: fix g_serial regression". Also fix a bug in ci13xxx_udc. Since f_serial is now checking if the endpoint descriptors are null in the set_alt function, need to set them to null on ep_disable in case of cable disconnect. Since the ep descriptor was inserted to struct usb_ep in "usb: gadget: add usb_endpoint_descriptor to struct usb_ep" then simply convert the ci13xxx_udc to work with mEp->ep.desc instead of mEp->desc, this will ensure that the correct descriptor will be cleared on endpoint disable. I will upstream it to Linux community soon, I will name it: "usb: gadget: use usb ep descriptor of struct usb_ep instead of wrapper desc"] Signed-off-by: Ido Shayevitz <idos@codeaurora.org> |
||
|
|
e2a9f931cc |
usb: gadget: configure endpoint according to gadget speed
Add config_ep_by_speed() to configure the endpoint according to the gadget speed. Using this function will spare the FDs from handling the endpoint chosen descriptor. Signed-off-by: Tatyana Brokhman <tlinder@codeaurora.org> Signed-off-by: Felipe Balbi <balbi@ti.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> Signed-off-by: Ido Shayevitz <idos@codeaurora.org> |
||
|
|
9168a350f7 |
usb: gadget: add usb_endpoint_descriptor to struct usb_ep
Change usb_ep_enable() prototype to use endpoint descriptor from usb_ep. This optimization spares the FDs from saving the endpoint chosen descriptor. This optimization is not full though. To fully exploit this change, one needs to update all the UDCs as well since in the current implementation each of them saves the endpoint descriptor in it's internal (and extended) endpoint structure. Signed-off-by: Tatyana Brokhman <tlinder@codeaurora.org> Signed-off-by: Felipe Balbi <balbi@ti.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> [idos@codeaurora.org: Added more changes for the following files since API break with msm code tree: ci13xxx_udc.c,f_accessory,f_adb, f_diag,f_mtp,f_rmnet,f_rmnet_sdio,f_rmnet_smd, f_rmnet_smd_sdio,u_bam.c, u_sdio.c,u_rmnet.h,u_sdio.c,u_smd.c,f_ccid.c,u_data_hsic.c] Signed-off-by: Ido Shayevitz <idos@codeaurora.org> |
||
|
|
b657342882 |
usb: gadget: introduce UDC Class
this class will be used to abstract away several of the duplicated operations scattered among the USB gadget controller drivers. Later, we can add an atomic notifier to tell interested drivers about what's happening with the controller. Notifications such as suspend, resume, enumerated, etc. will be useful, at a minimum, for implementing usb charger detection. As part of the converting process usb_gadget_probe_driver() is no longer part of each udc but pushed into the ->stap() callback. The same for his couterpart. The core is currently set explicit to 'n'. It will be changed to 'y' once all users are converted since it provides functions which clash with other drivers. Signed-off-by: Felipe Balbi <balbi@ti.com> Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de> Acked-by: Michal Nazarewicz <mina86@mina86.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> Signed-off-by: Ido Shayevitz <idos@codeaurora.org> |
||
|
|
1e4eabf4be |
usb: ch9: add function defines from ch9, USB 3.0 spec
not to confuse with Table 9-7 in USB 2.0 spec Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de> Signed-off-by: Felipe Balbi <balbi@ti.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> Signed-off-by: Ido Shayevitz <idos@codeaurora.org> |
||
|
|
24a340bc5f |
usb: add usb_endpoint_maxp() macro
Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> [idos@codeaurora.org: use __le16_to_cpu instead of le16_to_cpu] Signed-off-by: Ido Shayevitz <idos@codeaurora.org> |
||
|
|
010009b830 |
usb: gadget: Add HSIC Peripheral over SPS support
Add support in HSIC peripheral(device) over SPS. Only one USB core can be use - currently HSUSB is enabled by default. To enable HSIC core defconfig file should be changed. Change-Id: I256aecd9e6dfd8bfd71719c32beed8b24225e11c Signed-off-by: Ofir Cohen <ofirc@codeaurora.org> |
||
|
|
8549e63277 |
msm: board-9615: Return result from vbus power routine
USB OTG driver maintains the state of VBUS using vbus_is_online flag for pdata based vbus power routine. Hence remove the used vbus_is_online flag here and return the result of VBUS power sequence to update the vbus_is_online flag in OTG driver. Change-Id: I8bea42d5ebc27fab6fc2ae8a0b9fb58bdbaf854a Signed-off-by: Mayank Rana <mrana@codeaurora.org> |
||
|
|
2d09e5fe33 |
USB: OTG: msm: Implement data contact detection based on timeout
Data contact can be detected by either current source or timeout methods. The current source method is not working for an unknown reason. Implement timeout based data contact detection. The spec allows any timeout between 300msec to 900msec. Use 600msec. CRs-fixed: 330217 Change-Id: I67151d1412f43ba974cc1afb164d6473f89d2dbf Signed-off-by: Pavankumar Kondeti <pkondeti@codeaurora.org> |
||
|
|
5143b25310 |
msm: clock: Use device names to distinguish between USB clocks
Drivers should now use their device names to distinguish between clocks of the same type rather than the clock name. Clock names are updated to match the new naming convention. CRs-Fixed: 327559 Change-Id: I78757806589e037a0655a63e7ee20c935214c99d Signed-off-by: Manu Gautam <mgautam@codeaurora.org> |
||
|
|
4da266f11a |
usb: gadget: fix crash on USB cable disconnection
Crash was observed (9x15) when USB cable was disconnected. Root cause was NULL pointer and USB BAM reset due to USB PHY reset. On 9x15 no reset on disconnect will be performed. CRs-Fixed: 326999 Change-Id: I006afb8dcd225caf9280dd915f8af3edfaebff5a Signed-off-by: Ofir Cohen <ofirc@codeaurora.org> |
||
|
|
a1c2a87d39 |
usb: gadget: Add SPS BAM-to-BAM support
Adding new support to enable USB-Peripheral BAM-to-BAM transactions. Changes were added to the UDC to support "legacy/regular" USB transfers and endless BAM-to-BAM transfers. To avoid adding new vendor specific UDC file to support the new feature and keep the UDC as a generic as possiblea, USB request holds a vendor specific data that distinguish between the two transfer types. USB BAM will be added in seperate commit. Change-Id: I3211a122fe5236cda2dbe844b44f52a2b2063baf Signed-off-by: Ofir Cohen <ofirc@codeaurora.org> Signed-off-by: Amit Blay <ablay@codeaurora.org> |
||
|
|
c7827e45a3 |
usb: gadget: SPS BAM-to-BAM - USB BAM driver
USB BAM driver to support BAM-to-BAM USB<->Peripheral transactions. Change-Id: Ib49a41f5dcdccb6f6bff2492fa64ead40f18b870 Signed-off-by: Ofir Cohen <ofirc@codeaurora.org> |
||
|
|
a7c1c5ce1f |
USB: OTG: prevent idle standalone PC when USB cable is connected.
When USB cable is connected, the mass storage function in the device will get interrupts for every 3ms. Entering and exiting the idle standalone PC itself will take around 3ms on 8960. Hence allowing idle standalone PC when USB cable is connected causes processor to spend most of the time in entering and exiting the idle standalone PC. Hence Vote for minimum DMA latency to prevent idle standalone PC when USB cable is connected. Change-Id: Id625dc01f253ed553b2f65f08900022a8c6e1daa Signed-off-by: Anji jonnala <anjir@codeaurora.org> |
||
|
|
7da3f26984 |
usb: msm_otg: vote and unvote for TCXO through XO API
USB PHY takes TCXO clock as input and using the PHY internal PLL, gets the 480MHz clock for USB operations. While USB PHY is suspended, the TCXO clock can be turned off. On 8960 target, mandating that TCXO clock users must need to vote for TCXO and if all the users vote for TCXO clock-off, then MSM can switch to lower power clock and can run. Change-Id: Ia9a91bca52a1003439a3a38bbd8eb835dbf349e1 Signed-off-by: Anji jonnala <anjir@codeaurora.org> Signed-off-by: Matt Wagantall <mattw@codeaurora.org> |
||
|
|
e130fd0c7b |
USB: gadget: Add CCID function driver
This USB CCID function driver will be a transport layer between userspace CCID component and the Windows Host. Data and control commands from the Windows Host will be sent to the userspace component and vice-versa. Change-Id: I5f00f9802a57329d2c932bba740b286b98cb8e27 Signed-off-by: Chiranjeevi Velempati <cvelempa@codeaurora.org> |
||
|
|
58b3147caf |
usb: otg: Upgrade support for PHY retention mode
Current implementation supports PHY retention mode, when VBUS detection is done by PMIC. This change adds the support for PHY retention mode, for the case where VBUS detection is done by USB PHY. In that case, the PHY wakes up the MPM and CORE using its High-Voltage interrupts. Change-Id: I5fec518337413f175a8bc671897836affc55381c Signed-off-by: Amit Blay <ablay@codeaurora.org> |
||
|
|
d074fa2796 |
Merge remote-tracking branch 'common/android-3.0' into msm-3.0
* common/android-3.0: (570 commits) misc: remove kernel debugger core ARM: common: fiq_debugger: dump sysrq directly to console if enabled ARM: common: fiq_debugger: add irq context debug functions net: wireless: bcmdhd: Call init_ioctl() only if was started properly for WEXT net: wireless: bcmdhd: Call init_ioctl() only if was started properly net: wireless: bcmdhd: Fix possible memory leak in escan/iscan cpufreq: interactive governor: default 20ms timer cpufreq: interactive governor: go to intermediate hi speed before max cpufreq: interactive governor: scale to max only if at min speed cpufreq: interactive governor: apply intermediate load on current speed ARM: idle: update idle ticks before call idle end notifier input: gpio_input: don't print debounce message unless flag is set net: wireless: bcm4329: Skip dhd_bus_stop() if bus is already down net: wireless: bcmdhd: Skip dhd_bus_stop() if bus is already down net: wireless: bcmdhd: Improve suspend/resume processing net: wireless: bcmdhd: Check if FW is Ok for internal FW call tcp: Don't nuke connections for the wrong protocol ARM: common: fiq_debugger: make uart irq be no_suspend net: wireless: Skip connect warning for CONFIG_CFG80211_ALLOW_RECONNECT mm: avoid livelock on !__GFP_FS allocations ... Conflicts: arch/arm/mm/cache-l2x0.c arch/arm/vfp/vfpmodule.c drivers/mmc/core/host.c kernel/power/wakelock.c net/bluetooth/hci_event.c Signed-off-by: Bryan Huntsman <bryanh@codeaurora.org> |
||
|
|
eaea7fe54a |
msm: Add device tree support for HSUSB
Add device tree support for MSM HSUSB. The OTG driver registers gadget and host platform devices based on the operational mode. This patch also updates the copper device tree source file with HSUSB device specifics. Change-Id: I0a50b0500d15f32ff65468cdb411398a80a20329 Signed-off-by: Pavankumar Kondeti <pkondeti@codeaurora.org> |
||
|
|
aa449e1efb |
USB: OTG: msm: Fix ACA implementation
Synopsis 28nm PHY has two different circuits for detecting changes on ID line. ID_DIG is designed for detecting ID_float vs ID_gnd. ID_ACA is designed for detecting RID_A, RID_B, RID_C states. These are mutually exclusive and enabling both circuits has undefined behavior. Enable ID_ACA upon VBUS high or ID_gnd events to detect further ACA states. ACA ID_GND threshold range is overlapped with OTG ID_FLOAT threshold range. Hence PHY ID_DIG circuit can not be used for detecting ACA ID_GND. Use PMIC ID circuit for detecting both OTG and ACA ID_GND. Link controller can not generate PHY_ALT interrupt in host mode. But the corresponding PHY register reflects the actual ID state. Hence implement polling to read PHY register to detect ID_GND --> ID_A, ID_A --> ID_B transitions. That means low power mode can not be allowed in host mode. Also disallow suspending the device attached on the root hub. Otherwise PHY is put into suspend state automatically upon setting SUSP bit in PORTSC register. Link controller can not generate asynchronous interrupt for ID_ACA changes in low power mode. Hence disallow low power mode in ID_B and ID_C states. USB_MSM_ACA is not selected by default. If it selected, ACA states can be detected and low power mode is not allowed in host mode. Writing "enable" to <debugfs>/msm_otg/aca enables ACA irrespective of USB_MSM_ACA selection. This is meant for debugging only. Change-Id: I51e80d803a583c5bdffc8111696943c04958f604 Signed-off-by: Pavankumar Kondeti <pkondeti@codeaurora.org> |
||
|
|
fc464f0f66 |
usb: msm_otg: Vote for EXT_3P3V regulator for MHL connector
In case of 8960 Liquid, need to vote for EXT_3P3V regulator to avoid usb connection lost as MHL analog switch is powered by this regulator. Change-Id: Ifc36d7916a5407801fdf43357176efa264d160bd CRs-fixed: 315979 Signed-off-by: Vijayavardhan Vennapusa <vvreddy@codeaurora.org> |
||
|
|
2b592824f9 |
USB: EHCI: Configure HSIC host<->hub<->Conventional USB devices
SMSC hub must be configured so that Conventional USB devices can be connected to SMSC hub on 8960 liquid. Change-Id: I261798de153d3c37f2fa2c4d7e15d96bb81c432f Signed-off-by: Vijayavardhan Vennapusa <vvreddy@codeaurora.org> |
||
|
|
15f2553568 |
USB: Add nop functions for !USB case
OTG drivers that use USB core functions like usb_add_hcd, usb_remove_hcd, etc can be selected for gadget only mode without selecting CONFIG_USB. Change-Id: Ie4b0c1703622cc9051ad9f50b8901f0005daeeb6 Signed-off-by: Pavankumar Kondeti <pkondeti@codeaurora.org> |
||
|
|
e3316a1098 |
USB: EHCI: msm: Configure GPIOs for HSIC strobe and data lines
As part of HSIC initialization, in addition to enabling HSIC host mode and periodic pad calibration, need to configure GPIO150 and GPIO151 pins for HSIC strobe and data lines respectively for proper data communication between HSIC devices. Change-Id: I7cdf8e4532045d813ac6c6e3f53455d0a640245b Signed-off-by: Vijayavardhan Vennapusa <vvreddy@codeaurora.org> |
||
|
|
39025fee42 |
USB: EHCI: msm: Add support for HSIC based Host Controller
This patch adds support for EHCI compliant USB Host Controller present in MSM chips. This Controller uses an HSIC PHY which communicates with downstream devices using STROBE/DATA lines. HSIC is a supplement to USB 2.0 specification and is preferred for chip-to-chip interconnect (having maximum circuit length of 10cm) as it removes the analog transceivers. Change-Id: Id54dcc802e606e0ff7dd31bc64671a797cd8bc09 Signed-off-by: Vijayavardhan Vennapusa <vvreddy@codeaurora.org> Signed-off-by: Manu Gautam <mgautam@codeaurora.org> |
||
|
|
02eff13c45 |
usb: otg: Add usb_hs_system_clk to OTG driver for MSM9615
This change add usb system clock support to OTG Driver. System clock is a 60MHZ input clock to the USB ChipIdea core. This clock is required starting from MDM9615. This change also removes the enforcement for using a phy_reset_clk for reseting the PHY. Starting from MDM9615, PHY reset is not implemented. The core is reset together with the PHY using "usb_hs_clk" signal. Signed-off-by: Amit Blay <ablay@codeaurora.org> |
||
|
|
3f2bc4d6eb |
Initial Contribution
msm-2.6.38: tag AU_LINUX_ANDROID_GINGERBREAD.02.03.04.00.142 Signed-off-by: Bryan Huntsman <bryanh@codeaurora.org> |
||
|
|
6b82151ce5 |
usb: otg_id: add suspend/resume interface
It is possible that while one driver has already suspended, another driver calls otg_id_notify() because it has not yet been suspended. It would then be possible for the suspended driver's detect callback to be called. This is undesirable. Introduce new otg_id_suspend/otg_id_resume functions that keep a suspended count, and if a notification happens while someone is suspended, that notification is deferred until all the drivers are resumed. If the notification happens before the last driver is suspended, that suspend will be aborted and once the final driver resumes through otg_id_resume, the notification will be delivered. Change-Id: I32fd32bec65e366e5f97a25c15255d94773b85b3 Signed-off-by: Dima Zavin <dima@android.com> |
||
|
|
e65d9fe556 |
usb: otg: add proxy_wait handler to otg_id
Some otg_id handlers can detect what's connected but can't detect a change. This allows that handler to pass off the waiting for ID change to a proxy. Change-Id: Ib38b750c3da4bffc35e37b620ecee37c5d64d31f Signed-off-by: Erik Gilling <konkers@android.com> |
||
|
|
adf0760ceb |
USB: gadget: f_accessory: Add ioctl to detect USB accessory attached at boot
Signed-off-by: Mike Lockwood <lockwood@android.com> |
||
|
|
ce4022b8d1 |
USB: gadget: f_mtp: Add support for sending MTP header during file transfer
MTP_SEND_FILE_WITH_HEADER ioctl allows sending a file with the 12 byte header prepended at the beginning. This is to allow MTP to use a single packet for the data phase instead of two. Signed-off-by: Mike Lockwood <lockwood@android.com> |
||
|
|
ab246b81fb |
USB: otg: add otg id notifier utiltiies
Add a otg_id notifier to allow multiple drivers to cooperate to determine the type of cable connected to a USB connector without requiring direct calls between the drivers. Change-Id: Ic5675f1a89daf85b17336765de24e4bdb6df6348 Signed-off-by: Colin Cross <ccross@android.com> |
||
|
|
cf7addf29b |
USB: gadget: f_mtp: Add PTP variant of MTP USB function
This is the same as MTP but with PTP interface descriptor. Also removed obsolete ioctl for switching between MTP and PTP mode Signed-off-by: Mike Lockwood <lockwood@android.com> |
||
|
|
aab96815ae |
usb: gadget: android: Update android gadget driver
* 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 |
||
|
|
94df1bdfdc |
usb: gadget: composite: Add usb_remove_config
This allows composite drivers to dynamically change their configuration. For example, a driver might remove a configuration and register a new one with a different set of functions. User should prevent the host from enumerating the device while changing the configuration: usb_gadget_disconnect(cdev->gadget); usb_remove_config(cdev, old_config); usb_add_config(cdev, new_config, new_conf_bind); usb_gadget_connect(cdev->gadget); Change-Id: Icbfb4ce41685fde9bf63d5d58fca1ad242aa69f9 Signed-off-by: Benoit Goby <benoit@android.com> |
||
|
|
9902e0b5c5 |
USB: gadget: f_accessory: New gadget driver for android USB accesories
Signed-off-by: Mike Lockwood <lockwood@android.com> USB: gadget: f_accessory: Misc improvements and cleanup: - Add URI string - Replace type string with a description string - Add a control call to retrieve accessory protocol version (currently 1) - Driver read() and write() calls now fail after USB disconnect until driver file is closed and reopened. - Misc cleanup work Signed-off-by: Mike Lockwood <lockwood@android.com> USB: gadget: f_accessory: Clear accessory strings when USB is disconnected Signed-off-by: Mike Lockwood <lockwood@android.com> USB: gadget: f_accessory: Clear previous strings on ACCESSORY_GET_PROTOCOL Clearing strings on disconnect does not work since we may receive a disconnect on some devices when transitioning into accessory mode. We require an accessory to send ACCESSORY_GET_PROTOCOL before sending any strings, so any strings from a previous session will be cleared. Signed-off-by: Mike Lockwood <lockwood@android.com> USB: gadget: f_accessory: Clear disconnected flag when driver file is opened Fixes a race condition that can occur when entering accessory mode. Signed-off-by: Mike Lockwood <lockwood@android.com> USB: gadget: f_accessory: Add string for accessory's unique serial number Signed-off-by: Mike Lockwood <lockwood@android.com> USB: gadget: f_accessory: Set bNumEndpoints to correct value of 2 Change-Id: I24f4e36f196d45436e0573301500c3b93215953d Signed-off-by: Mike Lockwood <lockwood@android.com> |
||
|
|
aecca43f09 |
USB: gadget: android: Support switching vendor ID when configuration changes
Based on the list of enabled USB functions, we can now switch the vendor ID as well as the product ID. Signed-off-by: Mike Lockwood <lockwood@android.com> |