usb: msm_otg: Don't enable OTG IRQ for wakeup if ASYNC IRQ is used
On targets that use a dedicated async wakeup interrupt, the OTG
IRQ is not used for triggering wakeup from deep low power mode.
Hence, change the logic so that one or the other, but not both,
is used when calling enable/disable_irq_wakeup().
Change-Id: I39d279825a0cf5a023deb1eb76e60fd966463ed6
Signed-off-by: Jack Pham <jackp@codeaurora.org>
diff --git a/drivers/usb/otg/msm_otg.c b/drivers/usb/otg/msm_otg.c
index 4d5bbf84..c69071d 100644
--- a/drivers/usb/otg/msm_otg.c
+++ b/drivers/usb/otg/msm_otg.c
@@ -1008,9 +1008,11 @@
}
if (device_may_wakeup(phy->dev)) {
- enable_irq_wake(motg->irq);
if (motg->async_irq)
enable_irq_wake(motg->async_irq);
+ else
+ enable_irq_wake(motg->irq);
+
if (motg->pdata->pmic_id_irq)
enable_irq_wake(motg->pdata->pmic_id_irq);
if (pdata->otg_control == OTG_PHY_CONTROL &&
@@ -1117,9 +1119,11 @@
skip_phy_resume:
if (device_may_wakeup(phy->dev)) {
- disable_irq_wake(motg->irq);
if (motg->async_irq)
disable_irq_wake(motg->async_irq);
+ else
+ disable_irq_wake(motg->irq);
+
if (motg->pdata->pmic_id_irq)
disable_irq_wake(motg->pdata->pmic_id_irq);
if (pdata->otg_control == OTG_PHY_CONTROL &&