USB: phy-msm-qusb: 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: I8150a571e11ccc128298fe75acef21ffe9b08a9a Signed-off-by: Vijayavardhan Vennapusa <vvreddy@codeaurora.org>
This commit is contained in:
parent
85baaeb2e2
commit
1b358a8e1b
1 changed files with 8 additions and 6 deletions
|
@ -730,6 +730,7 @@ static int qusb_phy_set_suspend(struct usb_phy *phy, int suspend)
|
||||||
writel_relaxed(intr_mask,
|
writel_relaxed(intr_mask,
|
||||||
qphy->base + QUSB2PHY_PORT_INTR_CTRL);
|
qphy->base + QUSB2PHY_PORT_INTR_CTRL);
|
||||||
|
|
||||||
|
if (linestate & (LINESTATE_DP | LINESTATE_DM)) {
|
||||||
/* enable phy auto-resume */
|
/* enable phy auto-resume */
|
||||||
writel_relaxed(0x0C,
|
writel_relaxed(0x0C,
|
||||||
qphy->base + QUSB2PHY_PORT_TEST_CTRL);
|
qphy->base + QUSB2PHY_PORT_TEST_CTRL);
|
||||||
|
@ -737,6 +738,7 @@ static int qusb_phy_set_suspend(struct usb_phy *phy, int suspend)
|
||||||
wmb();
|
wmb();
|
||||||
writel_relaxed(0x04,
|
writel_relaxed(0x04,
|
||||||
qphy->base + QUSB2PHY_PORT_TEST_CTRL);
|
qphy->base + QUSB2PHY_PORT_TEST_CTRL);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
dev_dbg(phy->dev, "%s: intr_mask = %x\n",
|
dev_dbg(phy->dev, "%s: intr_mask = %x\n",
|
||||||
|
|
Loading…
Add table
Reference in a new issue