summaryrefslogtreecommitdiff
path: root/drivers/usb/dwc3/dwc3-msm.c
diff options
context:
space:
mode:
authorAjay Agarwal <ajaya@codeaurora.org>2018-04-16 19:40:02 +0530
committerAjay Agarwal <ajaya@codeaurora.org>2018-04-26 18:46:45 +0530
commit19ca45e5ff1f42d93df018dd1e0f268dd54e62aa (patch)
tree084de36de3b97aa536b41f40434cc343356a72ae /drivers/usb/dwc3/dwc3-msm.c
parent502257f3e6a9fbc83bdf42d98aef495c8dcecf11 (diff)
usb: dwc3-msm: Resume PHY before notify_connect on start_host
Currently as a part of host cable connection, we are notifying cable connect to phy driver first and then resuming the PHY. This leads to bus resume case running instead of the cable connect case resume, hence the phy driver does not vote for the LDOs. As a result, PHY goes into bad state. Fix this by first resuming PHY so that cable connect case resume runs. Change-Id: Ica5b16e420c38b920688b86a24af396644487a6b Signed-off-by: Ajay Agarwal <ajaya@codeaurora.org>
Diffstat (limited to 'drivers/usb/dwc3/dwc3-msm.c')
-rw-r--r--drivers/usb/dwc3/dwc3-msm.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/usb/dwc3/dwc3-msm.c b/drivers/usb/dwc3/dwc3-msm.c
index 2cd600a58fd7..3f59a2f8b84f 100644
--- a/drivers/usb/dwc3/dwc3-msm.c
+++ b/drivers/usb/dwc3/dwc3-msm.c
@@ -3487,6 +3487,7 @@ static int dwc3_otg_start_host(struct dwc3_msm *mdwc, int on)
if (on) {
dev_dbg(mdwc->dev, "%s: turn on host\n", __func__);
+ pm_runtime_get_sync(mdwc->dev);
mdwc->hs_phy->flags |= PHY_HOST_MODE;
if (dwc->maximum_speed == USB_SPEED_SUPER) {
mdwc->ss_phy->flags |= PHY_HOST_MODE;
@@ -3495,7 +3496,6 @@ static int dwc3_otg_start_host(struct dwc3_msm *mdwc, int on)
}
usb_phy_notify_connect(mdwc->hs_phy, USB_SPEED_HIGH);
- pm_runtime_get_sync(mdwc->dev);
dbg_event(0xFF, "StrtHost gync",
atomic_read(&mdwc->dev->power.usage_count));
if (!IS_ERR(mdwc->vbus_reg))