Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 07cc3a04 authored by Ajay Agarwal's avatar Ajay Agarwal
Browse files

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: default avatarAjay Agarwal <ajaya@codeaurora.org>
parent 093e11e9
Loading
Loading
Loading
Loading
+8 −4
Original line number Diff line number Diff line
@@ -2162,9 +2162,11 @@ 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) {
		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) {
			if (!mdwc->no_wakeup_src_in_hostmode)
				enable_irq_wake(mdwc->ss_phy_irq);
			enable_irq(mdwc->ss_phy_irq);
		}
@@ -2287,9 +2289,11 @@ 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) {
		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) {
			if (!mdwc->no_wakeup_src_in_hostmode)
				disable_irq_wake(mdwc->ss_phy_irq);
			disable_irq_nosync(mdwc->ss_phy_irq);
		}