diff options
| author | Vijayavardhan Vennapusa <vvreddy@codeaurora.org> | 2016-02-17 14:47:54 +0530 |
|---|---|---|
| committer | David Keitel <dkeitel@codeaurora.org> | 2016-03-25 16:02:39 -0700 |
| commit | 117c9a3b2765e4459e35a9549b923dd2172dfecc (patch) | |
| tree | 7e65af879e695f0cdd05816c6695274e96cfbbe2 | |
| parent | 88e3bbd091cf4f222221d2c66cf5418e35466737 (diff) | |
USB: dwc3-msm: Enable power event irq in case of host bus suspend
Currently MPM pin for DP line state change is not mapped to irq.
Only MPM for DM line state chagne is mapped to hs_phy irq. But this
results in delayed device detection in VDDmin when HS/FS devices
are connected in host mode. Hence enable power event irq during
host bus suspend so that MPM pin for DP line state can be also
mapped for early detection of HS/FS devices during VDDmin.
CRs-Fixed: 972212
Change-Id: I71d7c3c374a23b51a0489cf44410d76d5734d009
Signed-off-by: Vijayavardhan Vennapusa <vvreddy@codeaurora.org>
| -rw-r--r-- | drivers/usb/dwc3/dwc3-msm.c | 19 |
1 files changed, 16 insertions, 3 deletions
diff --git a/drivers/usb/dwc3/dwc3-msm.c b/drivers/usb/dwc3/dwc3-msm.c index c20fb5b04240..3583317a3d3f 100644 --- a/drivers/usb/dwc3/dwc3-msm.c +++ b/drivers/usb/dwc3/dwc3-msm.c @@ -1924,6 +1924,15 @@ static int dwc3_msm_suspend(struct dwc3_msm *mdwc) enable_irq_wake(mdwc->ss_phy_irq); enable_irq(mdwc->ss_phy_irq); } + /* + * Enable power event irq during bus suspend in host mode for + * mapping MPM pin for DP so that wakeup can happen in system + * suspend. + */ + if (mdwc->in_host_mode) { + enable_irq(mdwc->pwr_event_irq); + enable_irq_wake(mdwc->pwr_event_irq); + } mdwc->lpm_flags |= MDWC3_ASYNC_IRQ_WAKE_CAPABILITY; } @@ -2010,9 +2019,6 @@ static int dwc3_msm_resume(struct dwc3_msm *mdwc) atomic_set(&dwc->in_lpm, 0); - /* enable power evt irq for IN P3 detection */ - enable_irq(mdwc->pwr_event_irq); - /* Disable HSPHY auto suspend */ dwc3_msm_write_reg(mdwc->base, DWC3_GUSB2PHYCFG(0), dwc3_msm_read_reg(mdwc->base, DWC3_GUSB2PHYCFG(0)) & @@ -2027,11 +2033,18 @@ static int dwc3_msm_resume(struct dwc3_msm *mdwc) disable_irq_wake(mdwc->ss_phy_irq); disable_irq_nosync(mdwc->ss_phy_irq); } + if (mdwc->in_host_mode) { + disable_irq_wake(mdwc->pwr_event_irq); + disable_irq(mdwc->pwr_event_irq); + } mdwc->lpm_flags &= ~MDWC3_ASYNC_IRQ_WAKE_CAPABILITY; } dev_info(mdwc->dev, "DWC3 exited from low power mode\n"); + /* enable power evt irq for IN P3 detection */ + enable_irq(mdwc->pwr_event_irq); + /* Enable core irq */ if (dwc->irq) enable_irq(dwc->irq); |
