summaryrefslogtreecommitdiff
path: root/drivers/usb/phy/phy-msm-qusb.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/usb/phy/phy-msm-qusb.c')
-rw-r--r--drivers/usb/phy/phy-msm-qusb.c14
1 files changed, 8 insertions, 6 deletions
diff --git a/drivers/usb/phy/phy-msm-qusb.c b/drivers/usb/phy/phy-msm-qusb.c
index 6a2529ec1511..bd2722e8fc48 100644
--- a/drivers/usb/phy/phy-msm-qusb.c
+++ b/drivers/usb/phy/phy-msm-qusb.c
@@ -730,13 +730,15 @@ static int qusb_phy_set_suspend(struct usb_phy *phy, int suspend)
writel_relaxed(intr_mask,
qphy->base + QUSB2PHY_PORT_INTR_CTRL);
- /* enable phy auto-resume */
- writel_relaxed(0x0C,
+ if (linestate & (LINESTATE_DP | LINESTATE_DM)) {
+ /* enable phy auto-resume */
+ writel_relaxed(0x0C,
qphy->base + QUSB2PHY_PORT_TEST_CTRL);
- /* flush the previous write before next write */
- wmb();
- writel_relaxed(0x04,
- qphy->base + QUSB2PHY_PORT_TEST_CTRL);
+ /* flush the previous write before next write */
+ wmb();
+ writel_relaxed(0x04,
+ qphy->base + QUSB2PHY_PORT_TEST_CTRL);
+ }
dev_dbg(phy->dev, "%s: intr_mask = %x\n",