aboutsummaryrefslogtreecommitdiff
path: root/include/linux/usb
Commit message (Collapse)AuthorAgeFilesLines
* Merge "USB: phy: Dont flush work from set suspend during runtime idle"Linux Build Service Account2015-02-061-1/+2
|\
| * USB: phy: Dont flush work from set suspend during runtime idleSujeet Kumar2015-02-041-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Race condition may occur if set suspend is waiting for sm work to finish from runtime idle but OTG cable is disconnected. As part of disconnect, sm work removes hcd which inturn it is waiting for pm framework to finish the previous runtime idle processing. Dont flush the work, as there is no guarantee that when OTG state machine runs, OTG cable would remain connected. Instead wait for USB in LPM or ID float and bail out waiting in set suspend. Also a timeout of 2 second will bring the wait state. This way we make sure that no such race condition would occur. CRs-Fixed: 786472 Change-Id: I16516cd1864587f017b54907e9c41aaa384a240f Signed-off-by: Sujeet Kumar <ksujeet@codeaurora.org>
* | Merge "USB: phy-msm-usb: Ensure strict order of phy event processing"Linux Build Service Account2015-02-061-0/+2
|\|
| * USB: phy-msm-usb: Ensure strict order of phy event processingSujeet Kumar2015-02-041-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Using system_nrt_wq does not guarantee the serial execution of the multiple works. This can lead to parallel execution of different tasks at the same time. It can lead to a situation where state machine put device into low power mode and charger detection still running and accessing registers. This will cause unclocked access. Use strict order workqueue to schedule state machine, charger detection, ID detection, suspend work. workqueue is tunned to run at max one task at any given point in time which helps avoid parallel execution of different tasks. CRs-Fixed: 765672 Change-Id: I02eb36dd4bcbea923638c6532fc4a94c3e5dd6b9 Signed-off-by: Sujeet Kumar <ksujeet@codeaurora.org>
* | usb: gadget: ci13xxx: Reset USB hardware on FLUSH failureManu Gautam2015-02-021-0/+1
|/ | | | | | | | EP flush operation is observed to be failing sometimes. Reset hardware before next connection to recover from it. Change-Id: Ie48e214c4b686ce8287f950a0eed1b5b729dff7f Signed-off-by: Manu Gautam <mgautam@codeaurora.org>
* usb: phy-msm-usb: Add support for the PHY based ID detectionPavankumar Kondeti2014-11-222-0/+23
| | | | | | | | | | The Femto PHY wrapper has an IRQ to generate an interrupt for ID line state change. The USB PHY can generate this interrupt in retention mode and also MPM pin is available for ID detection during deep sleep. The PHY regulators can not be turned off, instead they are put into LPM. Change-Id: I20f82989fcde3cfd4740f76bf0b3c72194cffc49 Signed-off-by: Pavankumar Kondeti <pkondeti@codeaurora.org>
* USB: QTI: Make changes to use QTI as transport with other USB functionsMayank Rana2014-10-072-41/+52
| | | | | | | | | | Currently USB QTI driver is used with USB RMNET function driver. This change adds required support which allows to use QTI driver for control transport with other USB function driver. CRs-Fixed: 701879 Change-Id: Ia2991e615b4ef9a543d991c36e4de1de3539d3b0 Signed-off-by: Mayank Rana <mrana@codeaurora.org>
* Merge "usb: phy-msm-usb: Add support for Femto PHY"Linux Build Service Account2014-09-272-4/+39
|\
| * usb: phy-msm-usb: Add support for Femto PHYPavankumar Kondeti2014-09-242-4/+39
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Synopsys 28nm Femto PHY is connected to the Chipidea USB2.0 link on Ferrum target. The following changes are made to support the Femto PHY. - A new PHY type called SNPS_FEMTO_PHY is added to make the Femto PHY specific changes. The targets that use this PHY should pass qcom,hsusb-otg-phy-type = 2 from the device tree. - PHY CSR IO memory is available that provides register level interface for accessing the PHY. This register interface is used for putting PHY in retention, HV interrupts management. It is also possible to override the PHY parameters via this interface. But the parameter overriding through this new interface is not implemented in this patch. - New reset clocks phy_reset_clk and phy_por_clk are introduced to reset the whole PHY block (PHY CSR, ULPI bridge, Femto PHY) and only the Femto PHY (POR signal). - A new clock phy_csr_clk is required to access PHY CSR registers via AHB2PHY interface. This clock is turned off during low power mode. - The USB link register USB_PHY_CONTROL interface is not available on the Femto PHY. Add wrappers for HV interrupts and retention management. - The PHY DVDD can be connected to a always-on regulator unlike previous targets where it is connected to either vddcx/vddmx. qcom,phy-dvdd-always-on is passed from dtsi to indicate this configuration to the driver. In this case, PHY can keep the D+ pull-up during peripheral bus suspend without any board re-work. The D+ and D- pull-down are also enabled during host bus suspend. - The charger detection procedures are exactly the same except data contact detection (DCD). The Idp_src and Rdm_down are de-coupled in the Femto PHY. When DCD is enabled, the Idp_src alone is enabled without enabling the Rdm_down resistors. Hence enable the Rdm_down explicitly after enabling the DCD. Change-Id: I381ded8ed2e739120923b337ab24059e45bf33aa Signed-off-by: Pavankumar Kondeti <pkondeti@codeaurora.org>
* | Merge "usb: dwc3: Remove toggling of HSPHY autosuspend"Linux Build Service Account2014-09-242-15/+0
|\ \ | |/ |/|
| * usb: dwc3: Remove toggling of HSPHY autosuspendJack Pham2014-09-192-15/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | There have been issues related to having the GUSB2PHYCFG_SUSPHY bit set which may cause problems with controller commands timing out in both peripheral and host modes. Instead of working around this by toggling it off and on as needed, simply disable it whenever the controller is not in low power mode. The only place where it will be set is just prior to entering suspend and cleared just after exiting. This patch effectively reverts the following: commit e1e8f22e "USB: dwc3: Clear USB2PHY_SUSP bit during disconnect" commit 02b09d2b "USB: dwc3: msm: Fix stop endpoint command timeout issue" commit 438c0416 "usb: dwc3: Add support to disable hsphy auto suspend feature" Change-Id: Iaa5274dbfaf2d3ab243e030f09510bdbad72616e Signed-off-by: Jack Pham <jackp@codeaurora.org>
* | usb: phy-msm-usb: remove the unused alt core clockPavankumar Kondeti2014-09-181-2/+0
|/ | | | | | | | | | | | The alt core clock is a substitute clock for the ulpi clock, which comes from the phy. The phy does not provide ulpi clock during reset and alt core clock is required at this time. The USB controller on all active targets use asynchronous reset and does not require alt core clock during phy reset. Change-Id: Ic7b86c97a2ad59d90690a19bb49213ba7770d59b Signed-off-by: Pavankumar Kondeti <pkondeti@codeaurora.org>
* USB: phy-msm-usb: Add support for voting for nominal frequenciesSujeet Kumar2014-09-111-0/+6
| | | | | | | | | | | | Currently USB driver has support for voting for bus frequencies passed through device tree bus parameters. With this, it is not possible to vote for maximum nominal bus frequenices from USB to DDR path. Hence add support for voting nominal values which helps in mitigating thermal issue. CRs-Fixed: 722888 Change-Id: I5697cd5dc7f3bd1bee448fe3aada57cca482fdeb Signed-off-by: Sujeet Kumar <ksujeet@codeaurora.org>
* USB: Prevent USB to enter LPM if qdss connect work is not processedSaket Saurabh2014-09-021-0/+2
| | | | | | | | | | | | | | | | | | | | | For usb cable connect in qdss composition, qdss driver will queue qdss connect work as part of qdss_set_alt(). As part of multiple usb connect and disonnect, USB can enter low power mode before the qdss connect work is compeleted. This results in crash while acessing usb registers during processing of the qdss connect work as USB clocks are off. Fix this issue by ensuring that if qdss connect work is scheduled, then do not allow USB to enter low power mode before qdss connect work is completely processed. To implement this, use flag qdss_usb_active. When usb is connected, set flag qdss_usb_active to true in qdss_set_alt(). When qdss connect work is already processed, then set the flag qdss_usb_active to false. Further, add check in msm_bam_usb_lpm_ok() and check if usb qdss connect work is scheduled but not completely processed, then do not allow USB to enter low power mode. CRs-Fixed: 718015 Change-Id: Id3d0751a01b96fb3a4f9bbb9fe3adbe25228618e Signed-off-by: Saket Saurabh <ssaurabh@codeaurora.org>
* Merge "usb: gadget: qti: Update EP_LOOKUP ioctl info for BAM-DMUX transport"Linux Build Service Account2014-08-311-0/+1
|\
| * usb: gadget: qti: Update EP_LOOKUP ioctl info for BAM-DMUX transportPavankumar Kondeti2014-08-271-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | The RMNET function uses QTI as control transport and BAM-DMUX as data transport on some targets where IPA hardware is not available. A new endpoint type is introduced for BAM-MUX transport. Return this endpoint type and channel number information in EP_LOOKUP ioctl. The IPA producer and consumer pipe numbers are set to 0 and user space should ignore them for BAM-DMUX endpoint type. Change-Id: Ic41b764b214e9a3172d88d460ecadaf17054f1f2 Signed-off-by: Pavankumar Kondeti <pkondeti@codeaurora.org>
* | HSIC_HOST: Wait for BAM Pipe to be empty before suspendMayank Rana2014-08-201-0/+2
|/ | | | | | | | | | | | | | | | | | HSIC_CONS release notification doesn't confirm that all IPA HSIC BAM pipes' are empty used for HSIC host mode functionality. In some of regression testing, it has been found that HSIC host is being suspended when there is data pending in HSIC IPA BAM pipe which causes BAM data stall issue. Hence this change adds required support to check all used BAM pipes' state with HSIC Host mode before performing suspend and notifying IPA driver to switch of IPA clocks. This change also checks pipe state before resuming root hub in resume sequeunce, and would crash device if there is any pending data i.e. data is written to HSIC BAM when HSIC host was suspended. CRs-Fixed: 711785 Change-Id: I4721c38273c2b23584a192457517139371cdbce2 Signed-off-by: Mayank Rana <mrana@codeaurora.org>
* USB: ANDROID: Implement dynamic pm_qos voting based on USB activityManu Gautam2014-07-101-1/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Currently USB android driver maintains only two states for DMA latency voting with pm_qos i.e. USB connect and disconnect/suspend. This doesn't take into consideration when USB is completely IDLE or very minimal USB transfers are happening resulting in high power consumption. Even though USB is used for battery charging but not allowing CPU to enter lower power states may result in high charging time or even device getting hot. Driver now monitors USB traffic using UI interrupts count and based on that takes decision to vote appropriate DMA latency. If interrupts during a sample time are less than threshold then it allows transition from WFI to IDLE_PC and further to IDLE_PC_RPM if no interrupts are seen for a while. All these thresholds and sample times (note below) are configurable and should be defined such that we ramp up fast to WFI (up_sample_sec) but slow down shift to IDLE_PC (down_sample_sec). User configurable parameters are: 1. Parameters to control WFI to L2 IDLE_PC transition: * down_pm_qos_sample_sec: Interrupts sampling time * down_pm_qos_threshold: If interrupts during a sample are less than this threshold then allow L2 IDLE_PC. 2. Parameters to control IDLE_PC to IDLE_PC_RPM transition: * idle_pc_rpm_no_int_secs: If no interrupts are seen for this much time then allow L2 IDLE_PC_RPM. 3. Parameters to control transition to WFI: * up_pm_qos_sample_sec: Interrupts sampling time * up_pm_qos_threshold: If interrupts during a sample are more than this threshold then allow only WFI. Change-Id: I945dfca84e56005e8d5940f3dc31ed2c1197cde1 Signed-off-by: Manu Gautam <mgautam@codeaurora.org>
* usb: gadget: Fix Missing Function Wakeup notification sending on BAM wakeupDanny Segal2014-07-091-0/+4
| | | | | | | | | | | | | | | | In Super-Speed mode, when the USB core wishes to issue remote wakeup due to new data arriving on the BAM to BAM path, it needs to send Function Wakeup notification to the USB host after the USB bus is resumed. However, the sending of this notification fails when the USB core needs to wake up from low-power mode, because the low-power mode exit is done asynchronously and the sending of the Function Wakeup notification can not be done until the USB bus is resumed. This patch fixes this issue by checking whether the USB bus is suspended, and if so, the sending Function Wakeup notification is delayed until the USB bus is resumed. Change-Id: I293476aaaf920b67fdbdf72a63524edc7a35750b Signed-off-by: Danny Segal <dsegal@codeaurora.org>
* Merge "USB: ci13xxx_udc: Add support for UI interrupts counting"Linux Build Service Account2014-06-301-3/+5
|\
| * USB: ci13xxx_udc: Add support for UI interrupts countingManu Gautam2014-06-261-3/+5
| | | | | | | | | | | | | | | | | | | | | | Add counting of UI or USB transfers completion interrupts so that it can be used to determine USB transfers or BUS usage. This is a simple approach which gives reasonable accuracy to avoid counting actual bytes that got transferred over USB. Change-Id: I1ee3c6997e40ee5db1da26af1e68fced06ea2de4 Signed-off-by: Manu Gautam <mgautam@codeaurora.org>
* | Merge "usb: dwc3: gadget: Set txfifo for all eps in usb configuration"Linux Build Service Account2014-06-301-0/+4
|\ \
| * | usb: dwc3: gadget: Set txfifo for all eps in usb configurationVamsi Krishna2014-06-271-0/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Resize txfifo function currently configures txfifo for enabled endpoints. In most cases endpoints are enabled by function drivers after usb host selects the configuration. Some functions like ecm and ncm have two interfaces (control and data) and data interface are enabled only after the configuration is selected and may not have proper correct txfifo settings. To avoid this issue, configure the txfifo for all IN endpoints in the selected usb configuration, regardless of ep enabled status. Change-Id: I4fe32f338b6f63904dcdc08bdd03dcb093bfd73d Signed-off-by: Vamsi Krishna <vskrishn@codeaurora.org>
* | | USB: gadget: Implement COMPAT_IOCTL for ioctlsSujeet Kumar2014-06-241-0/+30
| |/ |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 32-bit userspace calling into 64-bit kernel cause different ioctl codes to get generated. The different ioctl code gets generated because sizeof is used on mtp and accessory structures which is different for 32/64 compilation. Because of this, 64-bit kernel can never execute the right ioctl command. Implement compat_ioctl to handle such execution environment. CRs-Fixed: 678625 Change-Id: I26cc10986e28a28eab6f3c65f28f4d2b808112d9 Signed-off-by: Sujeet Kumar <ksujeet@codeaurora.org>
* | Merge "Merge v3.10.40 and related reverts into msm-3.10"Linux Build Service Account2014-06-201-1/+1
|\ \
| * \ Merge upstream tag 'v3.10.40' into msm-3.10Ian Maund2014-06-181-1/+1
| |\ \ | | |/ | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * commit 'v3.10.40': (203 commits) Linux 3.10.40 ARC: !PREEMPT: Ensure Return to kernel mode is IRQ safe drm: cirrus: add power management support Input: synaptics - add min/max quirk for ThinkPad Edge E431 Input: synaptics - add min/max quirk for ThinkPad T431s, L440, L540, S1 Yoga and X1 lockd: ensure we tear down any live sockets when socket creation fails during lockd_up dm thin: fix dangling bio in process_deferred_bios error path dm transaction manager: fix corruption due to non-atomic transaction commit Skip intel_crt_init for Dell XPS 8700 mtd: sm_ftl: heap corruption in sm_create_sysfs_attributes() mtd: nuc900_nand: NULL dereference in nuc900_nand_enable() mtd: atmel_nand: Disable subpage NAND write when using Atmel PMECC tgafb: fix data copying gpio: mxs: Allow for recursive enable_irq_wake() call rtlwifi: rtl8188ee: initialize packet_beacon rtlwifi: rtl8192se: Fix regression due to commit 1bf4bbb rtlwifi: rtl8192se: Fix too long disable of IRQs rtlwifi: rtl8192cu: Fix too long disable of IRQs rtlwifi: rtl8188ee: Fix too long disable of IRQs rtlwifi: rtl8723ae: Fix too long disable of IRQs ... Change-Id: If5388cf980cb123e35e1b29275ba288c89c5aa18 Signed-off-by: Ian Maund <imaund@codeaurora.org>
| | * usbnet: include wait queue head in device structureOliver Neukum2014-04-141-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | [ Upstream commit 14a0d635d18d0fb552dcc979d6d25106e6541f2e ] This fixes a race which happens by freeing an object on the stack. Quoting Julius: > The issue is > that it calls usbnet_terminate_urbs() before that, which temporarily > installs a waitqueue in dev->wait in order to be able to wait on the > tasklet to run and finish up some queues. The waiting itself looks > okay, but the access to 'dev->wait' is totally unprotected and can > race arbitrarily. I think in this case usbnet_bh() managed to succeed > it's dev->wait check just before usbnet_terminate_urbs() sets it back > to NULL. The latter then finishes and the waitqueue_t structure on its > stack gets overwritten by other functions halfway through the > wake_up() call in usbnet_bh(). The fix is to just not allocate the data structure on the stack. As dev->wait is abused as a flag it also takes a runtime PM change to fix this bug. Signed-off-by: Oliver Neukum <oneukum@suse.de> Reported-by: Grant Grundler <grundler@google.com> Tested-by: Grant Grundler <grundler@google.com> Signed-off-by: David S. Miller <davem@davemloft.net> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* | | USB: phy-msm-usb: Fix unclocked access during disconnect in qdss modeVijayavardhan Vennapusa2014-06-181-1/+0
|/ / | | | | | | | | | | | | | | | | | | | | | | | | | | when cable is disconnected in qdss composition, qdss driver will queue disconnect work as part of qdss_disable() and doesn't wait till the disconnect work is completed. This results in crash if disconnect work is scheduled after USB enters low power mode. Fix the issue by checking whether usb bam pipe is disconnected or not and if it is not disconnected, don't allow low power mode and instead schedule suspend later. CRs-Fixed: 678631 Change-Id: I72ef57fc4a04407f624fa73cd5abc12f5df3fecc Signed-off-by: Vijayavardhan Vennapusa <vvreddy@codeaurora.org>
* | Merge "xhci: hsic: kick stop ep command watchdog upon xHC halt failure"Linux Build Service Account2014-06-151-0/+2
|\ \
| * | xhci: hsic: kick stop ep command watchdog upon xHC halt failureHemant Kumar2014-06-101-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When stop ep command times out due to controller halt failure no point waiting till XHCI_STOP_EP_CMD_TIMEOUT to giveback urbs. Kick stop ep command watchdog to finish endpoint related cleanup as early as possible. CRs-Fixed: 676195 Change-Id: Ibef1099ee62f18fecd93578961110ea5c29c3f79 Signed-off-by: Hemant Kumar <hemantk@codeaurora.org>
* | | usb: gadget: f_accessory: move userspace interface to uapiColin Cross2014-06-131-124/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Move the entire contents of linux/usb/f_accessory.h header to uapi, it only contains a userspace interface. Change-Id: Ieb5547da449588ae554988a201c0e6b4e3afc531 Signed-off-by: Colin Cross <ccross@android.com> Git-commit: 7a6a0851afc3c63400f561b876374ca105448d0e Git-Repo: https://android.googlesource.com/kernel/common.git Signed-off-by: Ian Maund <imaund@codeaurora.org>
* | | usb: gadget: f_mtp: move userspace interface to uapiColin Cross2014-06-131-53/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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> Git-commit: 4d174ee19f31fd93f7f1d835bf7e2b613e399dad Git-Repo: https://android.googlesource.com/kernel/common.git Signed-off-by: Ian Maund <imaund@codeaurora.org>
* | | USB: EHCI: Add MSM UICC controller driverPavankumar Kondeti2014-06-111-1/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | EHCI compliant Full-Speed only controller is used for UICC connectivity on MSM8939. The controller is configured in 3-wire serial mode and there is no separate PHY. The TLMM block in MSM converts the controller serial signals into DP and DM signals. Manage the clock and gpio as part of root hub PM. The remote wakeup support is not added in this patch. It can be implemented by configuration the DP/DM gpio line as an interrupt. CRs-Fixed: 671394 Change-Id: I8c14230eb567b6ffef6b5a9e8dc312a197e0811e Signed-off-by: Pavankumar Kondeti <pkondeti@codeaurora.org>
* | | Merge "usb: gadget: add infrastructure support for super-speed function suspend"Linux Build Service Account2014-06-082-1/+49
|\ \ \
| * | | usb: gadget: add infrastructure support for super-speed function suspendDanny Segal2014-06-052-1/+49
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The USB 3.0 specification defines a new 'Function Suspend' feature. This feature enables the USB host to put inactive composite device functions in a suspended state even when the device itself is not suspended. This patch extends the existing framework of USB gadget to properly support the 'Function Resume' and 'Function Remote Wakeup' related features. Change-Id: I51713eac557eabc7b465d161377c09d4b6afa152 Signed-off-by: Danny Segal <dsegal@codeaurora.org>
* | | | USB: ci13xxx_msm: Disable TXFIFO_IDLE_FORCE bit to prevent corruptionManu Gautam2014-06-051-0/+1
| |/ / |/| | | | | | | | | | | | | | | | | | | | | | | | | | There is a possibility of TX buffer corruption in core (device mode) if TXFIFO_IDLE_FORCE chicken bit is left enabled. As this bit is not required with the current core configuration, disable it. CRs-fixed: 674673 Change-Id: I91c7ca3d02585858bb07c39444a577b3e59fc9c3 Signed-off-by: Manu Gautam <mgautam@codeaurora.org>
* | | Merge "usb: phy-msm-usb.c: Fix timeout during usb disconnect with hvdcp charger"Linux Build Service Account2014-06-011-1/+14
|\ \ \
| * | | usb: phy-msm-usb.c: Fix timeout during usb disconnect with hvdcp chargerSaket Saurabh2014-05-301-1/+14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Once DCP is detected, ext_chg_active is set to true and DCP uevent reached to user space. The hvdcp main thread mark dcp_connected to true and wakesup the detector thread to do hvdcp detection. But before the detector thread gets a chance to run, DCP is removed. The disconnect uevent reached the user space and the hvdcp main thread marks the dcp_connected to false and it will not call any ioctl call. As ext_chg_active is still set to true, it is waiting for 3 seconds while processing usb disconnect. Also it is possible that DCP uevent is reached to the user space much before ext_chg_active flag is set to true in otg state machine work which later leads to timeout of 3 seconds later while processing usb disconnect. Fix these issues by maintaining different states for ext_chg_active. Upon DCP disconnect, if the ext_chg_active value is still default, mark it to inactive. This avoid the 3 seconds wait timeout while processing the usb disconnect. CRs-Fixed: 671181 Change-Id: Ic4aa6745e994a007bd6bd2e75d4f44fb8f7ac9c1 Signed-off-by: Saket Saurabh <ssaurabh@codeaurora.org>
* | | | xhci: hsic: De-assert host ready gpio when device in configured stateHemant Kumar2014-05-301-0/+1
|/ / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Host ready gpio needs to be de-asserted after usb device is enumerated. Add hc driver call back which gets called from usb core when usb device state is set to USB_STATE_CONFIGURED. This callback lowers host ready gpio. CRs-Fixed: 672909 Change-Id: Icea6174d594691a8f8a87eac45f79be05abaf87b Signed-off-by: Hemant Kumar <hemantk@codeaurora.org>
* / / usb: dwc3: gadget: allow running wakeup in delayed contextBar Weiner2014-05-191-0/+1
|/ / | | | | | | | | | | | | | | | | | | | | Adding the option of running the gadget wakeup function from the context in which it is called, or delaying it - in case it is called from an atomic context. This is required in order to support a case where the gadget is in lpm and the wakeup would result in a queue to the low-powered hardware. Change-Id: I09fc60e75c79202c97251146aab1539de3307424 Signed-off-by: Bar Weiner <bweiner@codeaurora.org>
* | USB: phy-msm-usb: Drop the 45nm chipidea PHY supportPavankumar Kondeti2014-05-061-1/+1
| | | | | | | | | | | | | | | | The 45nm chipidea PHY is not present on any of the active targets on which this driver is used. Remove the 45nm PHY specific code. Change-Id: I7662f6dfb15f5886d64cea603bd8d58891adcd80 Signed-off-by: Pavankumar Kondeti <pkondeti@codeaurora.org>
* | rmnet_ctrl_qti: Add modem online/offline ioctlsVamsi Krishna2014-05-021-0/+2
| | | | | | | | | | | | | | these ioctls will be used to notify modem status to usb host Change-Id: I32bf1c670248c18297bdd68e77421151a8cc610c Signed-off-by: Vamsi Krishna <vskrishn@codeaurora.org>
* | USB: phy-msm-usb: Process HOST disconnect only after system RESUMEManu Gautam2014-04-231-0/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | If Host Cable (ID_GND) is disconnected in system suspend then it results in race between device removal and device pm_resume. PM core does't handle this correctly and sometimes frees up parent device before children are resumed. To avoid this race make sure that system has resumed completely before handling ID_FLOAT (or host cable disconnect) event. CRs-fixed: 652870, 651561 Change-Id: Id0956a9677d819d3fa3f17f54965cae38f2ee31d Signed-off-by: Manu Gautam <mgautam@codeaurora.org>
* | Merge "phy-msm-usb: Set pm_done to true only when usb is in lpm"Linux Build Service Account2014-04-161-1/+4
|\ \
| * | phy-msm-usb: Set pm_done to true only when usb is in lpmSaket Saurabh2014-04-161-1/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | As part of USB disconnect event, msm_otg_suspend() executes and USB enters into low power mode and pm_done flag is set to true. In the scenario in which before the msm_otg_suspend() finished executing, then USB connect event came in, in this case msm_otg_suspend() returns -EBUSY. And later USB connect event is processed. As device is already in resumed state, hence pm_done flag is never set to false. So on next USB connect pm usage counter gets incremented in msm_otg_sm_work() and device cannot enter into sleep state. Fix the issue by setting pm_done flag to true as part of USB disconnect event only when USB finished executing msm_otg_suspend() and is able to enter low power mode. CRs-fixed: 649434 Change-Id: Icd8d612ce6280300d0d97656f3dcf1921b45126f Signed-off-by: Saket Saurabh <ssaurabh@codeaurora.org>
* | | Merge "usb: gadget: Add support for DMA mapping optimization of request buffers"Linux Build Service Account2014-04-121-0/+6
|\ \ \ | |/ / |/| |
| * | usb: gadget: Add support for DMA mapping optimization of request buffersDanny Segal2014-04-081-0/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In order to improve performance, this patch enabled mapping of USB request buffers in advance, before queueing them to the HW. This can be used when there is a pool or pre-mapped request buffers so we don't need to map it again every time the request gets queued. Change-Id: Ic3a6db749343ef1345e0816210517755aee055b3 Signed-off-by: Danny Segal <dsegal@codeaurora.org>
* | | USB: dwc3: msm: Fix stop endpoint command timeout issueVijayavardhan Vennapusa2014-04-092-0/+15
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Currently HSPHY SUSP bit is set while starting host mode and it is not cleared till stopping host mode. As part of urb dequeue, xhci stack will queue stop endpoint command for flushing endpoint which is getting timedout due to this HSPHY SUSP bit. Hence clear this bit before queuing stop endpoint command and set it back after stop endpoint command completion. Otherwise xhci stack treats this timeout as fatal error and halts host controller. Crs-Fixed: 580268 Change-Id: I784407386e6f87bcabd8569fcbae4e3af167144d Signed-off-by: Vijayavardhan Vennapusa <vvreddy@codeaurora.org>
* | | Merge "msm: USB: Add support for USB ID detection"Linux Build Service Account2014-04-081-1/+5
|\ \ \ | |/ / |/| |
| * | msm: USB: Add support for USB ID detectionSaket Saurabh2014-04-081-1/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | For USB Host mode, ID detection for USB connect and disconnect is done using PMIC or PHY based on the platforms supporting PMIC or PHY based ID detection. For PMIC and PHY based ID detection, support is already added in driver. For platform like MSM8916 where ID line is neither routed to PMIC nor PHY, hence PMIC and PHY cannot be used for USB ID detection on these platforms. This change enables support for USB ID detection using external ID line connected to msm gpio. CRs-fixed: 601057 Change-Id: If8a585002145df4175441008bae7681774587e24 Signed-off-by: Saket Saurabh <ssaurabh@codeaurora.org>