From 11893dae63da0f5b251cf7f9a24d64c8ff4771ff Mon Sep 17 00:00:00 2001 From: Stephen Boyd Date: Wed, 28 Dec 2016 14:57:06 -0800 Subject: usb: chipidea: msm: Handle phy power states The ULPI phy on qcom platforms needs to be initialized and powered on after a USB reset and before we toggle the run/stop bit. Otherwise, the phy locks up and doesn't work properly. Hook the phy initialization into the RESET event and the phy power off into the STOPPED event. Acked-by: Peter Chen Cc: Greg Kroah-Hartman Signed-off-by: Stephen Boyd Signed-off-by: Peter Chen --- drivers/usb/chipidea/host.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'drivers/usb/chipidea/host.c') diff --git a/drivers/usb/chipidea/host.c b/drivers/usb/chipidea/host.c index f884c0877bca..915f3e91586e 100644 --- a/drivers/usb/chipidea/host.c +++ b/drivers/usb/chipidea/host.c @@ -90,8 +90,12 @@ static int ehci_ci_reset(struct usb_hcd *hcd) ehci->need_io_watchdog = 0; - if (ci->platdata->notify_event) - ci->platdata->notify_event(ci, CI_HDRC_CONTROLLER_RESET_EVENT); + if (ci->platdata->notify_event) { + ret = ci->platdata->notify_event(ci, + CI_HDRC_CONTROLLER_RESET_EVENT); + if (ret) + return ret; + } ci_platform_configure(ci); -- cgit v1.2.3