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

This commit is contained in:
Linux Build Service Account 2017-07-05 02:57:08 -07:00 committed by Gerrit - the friendly Code Review server
commit 488f22ed0f

View file

@ -730,6 +730,7 @@ static int qusb_phy_set_suspend(struct usb_phy *phy, int suspend)
writel_relaxed(intr_mask,
qphy->base + QUSB2PHY_PORT_INTR_CTRL);
if (linestate & (LINESTATE_DP | LINESTATE_DM)) {
/* enable phy auto-resume */
writel_relaxed(0x0C,
qphy->base + QUSB2PHY_PORT_TEST_CTRL);
@ -737,6 +738,7 @@ static int qusb_phy_set_suspend(struct usb_phy *phy, int suspend)
wmb();
writel_relaxed(0x04,
qphy->base + QUSB2PHY_PORT_TEST_CTRL);
}
dev_dbg(phy->dev, "%s: intr_mask = %x\n",