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

Commit 46a0144a authored by Vijayavardhan Vennapusa's avatar Vijayavardhan Vennapusa Committed by Mayank Rana
Browse files

USB: phy-msm-qusb-v2: Enable autoresume only when device is connected



Currently driver is enabling autoresume feature even if no device is
connected which is not required. Hence enable auto resume only when
any HS/FS/LS devices are connected during bus suspend.

Change-Id: Id02a357597dde64fe4026ccaacf73bf3abd4b565
Signed-off-by: default avatarVijayavardhan Vennapusa <vvreddy@codeaurora.org>
Signed-off-by: default avatarMayank Rana <mrana@codeaurora.org>
parent 010ff9e0
Loading
Loading
Loading
Loading
+9 −5
Original line number Diff line number Diff line
@@ -572,11 +572,15 @@ static int qusb_phy_set_suspend(struct usb_phy *phy, int suspend)
				qphy->base +
				qphy->phy_reg[PLL_CORE_INPUT_OVERRIDE]);

			if (linestate & (LINESTATE_DP | LINESTATE_DM)) {
				/* enable phy auto-resume */
			writel_relaxed(0x91, qphy->base + qphy->phy_reg[TEST1]);
				writel_relaxed(0x91,
					qphy->base + qphy->phy_reg[TEST1]);
				/* flush the previous write before next write */
				wmb();
			writel_relaxed(0x90, qphy->base + qphy->phy_reg[TEST1]);
				writel_relaxed(0x90,
					qphy->base + qphy->phy_reg[TEST1]);
			}

			dev_dbg(phy->dev, "%s: intr_mask = %x\n",
			__func__, intr_mask);