summaryrefslogtreecommitdiff
path: root/drivers/usb/dwc3/dwc3-msm.c
diff options
context:
space:
mode:
authorAjay Agarwal <ajaya@codeaurora.org>2018-07-04 10:56:28 +0530
committerAjay Agarwal <ajaya@codeaurora.org>2018-07-10 15:43:33 +0530
commit07cc3a041ec1ce9c1044c782f4d2c73a6e435696 (patch)
tree0cd26f0d25af8d1de28139d8fda1f90e2a73e490 /drivers/usb/dwc3/dwc3-msm.c
parent093e11e9d29912ceadbde6e82202256ed2cd9bcc (diff)
usb: dwc3-msm: Enable PHY IRQ wakeup only for non-auto targets
On automotive targets, we do not want the system to wakeup if the connected peripheral is issuing remote wakeup when the system is PM suspended. Do not enable the system wakeup capability of the PHY IRQs if the target is automotive. Change-Id: I0bd986fdfab8f978692b605a44301086de3d0a87 Signed-off-by: Ajay Agarwal <ajaya@codeaurora.org>
Diffstat (limited to 'drivers/usb/dwc3/dwc3-msm.c')
-rw-r--r--drivers/usb/dwc3/dwc3-msm.c12
1 files changed, 8 insertions, 4 deletions
diff --git a/drivers/usb/dwc3/dwc3-msm.c b/drivers/usb/dwc3/dwc3-msm.c
index f94d0ba2f966..4f8b0fb6d670 100644
--- a/drivers/usb/dwc3/dwc3-msm.c
+++ b/drivers/usb/dwc3/dwc3-msm.c
@@ -2162,10 +2162,12 @@ static int dwc3_msm_suspend(struct dwc3_msm *mdwc, bool hibernation)
* case of host bus suspend and device bus suspend.
*/
if (mdwc->vbus_active || mdwc->in_host_mode) {
- enable_irq_wake(mdwc->hs_phy_irq);
+ if (!mdwc->no_wakeup_src_in_hostmode)
+ enable_irq_wake(mdwc->hs_phy_irq);
enable_irq(mdwc->hs_phy_irq);
if (mdwc->ss_phy_irq) {
- enable_irq_wake(mdwc->ss_phy_irq);
+ if (!mdwc->no_wakeup_src_in_hostmode)
+ enable_irq_wake(mdwc->ss_phy_irq);
enable_irq(mdwc->ss_phy_irq);
}
mdwc->lpm_flags |= MDWC3_ASYNC_IRQ_WAKE_CAPABILITY;
@@ -2287,10 +2289,12 @@ static int dwc3_msm_resume(struct dwc3_msm *mdwc)
/* Disable wakeup capable for HS_PHY IRQ & SS_PHY_IRQ if enabled */
if (mdwc->lpm_flags & MDWC3_ASYNC_IRQ_WAKE_CAPABILITY) {
- disable_irq_wake(mdwc->hs_phy_irq);
+ if (!mdwc->no_wakeup_src_in_hostmode)
+ disable_irq_wake(mdwc->hs_phy_irq);
disable_irq_nosync(mdwc->hs_phy_irq);
if (mdwc->ss_phy_irq) {
- disable_irq_wake(mdwc->ss_phy_irq);
+ if (!mdwc->no_wakeup_src_in_hostmode)
+ disable_irq_wake(mdwc->ss_phy_irq);
disable_irq_nosync(mdwc->ss_phy_irq);
}
mdwc->lpm_flags &= ~MDWC3_ASYNC_IRQ_WAKE_CAPABILITY;