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>
This commit is contained in:
parent
88e3bbd091
commit
117c9a3b27
1 changed files with 16 additions and 3 deletions
|
@ -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);
|
||||
|
|
Loading…
Add table
Reference in a new issue