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

This commit is contained in:
Linux Build Service Account 2017-07-11 17:57:51 -07:00 committed by Gerrit - the friendly Code Review server
commit 9a74724cda

View file

@ -652,13 +652,16 @@ static int qusb_phy_set_suspend(struct usb_phy *phy, int suspend)
writel_relaxed(intr_mask,
qphy->base + QUSB2PHY_INTR_CTRL);
/* enable phy auto-resume */
writel_relaxed(0x91,
if (linestate & (LINESTATE_DP | LINESTATE_DM)) {
/* enable phy auto-resume */
writel_relaxed(0x91,
qphy->base + QUSB2PHY_TEST1);
/* flush the previous write before next write */
wmb();
writel_relaxed(0x90,
qphy->base + QUSB2PHY_TEST1);
/* flush the previous write before next write */
wmb();
writel_relaxed(0x90,
qphy->base + QUSB2PHY_TEST1);
}
dev_dbg(phy->dev, "%s: intr_mask = %x\n",
__func__, intr_mask);