phy-msm-usb: Fix crash due to USB h/w reset on disconnect

Commit 734b1be21389 ("phy-msm-usb: Put PHY in non-driving mode
during charger detection") resets USB h/w to put PHY in normal
mode on charger disconnect. However, in case of disconnect of
host PC this can create a race condition where USB hardware is
reset while USB controller is active in device mode and can
cause NOC errors. Fix this by not touching USB h/w on disconnect
if USB was active in device mode as there is not need to change
PHY mode in that case.

Change-Id: Ifbb8caa8d76e10758bce6e79c26310c52c25c1b0
Signed-off-by: Manu Gautam <mgautam@codeaurora.org>
1 file changed