USB: OTG: msm: Avoid resetting PHY 2 times during initialization

The PHY is reset in B_IDLE state before entering into low power mode.
When B_IDLE is reached via B_PERIPHERAL or A_HOST states, it is fine.
But this is redundant if B_IDLE is reached via UNDEFINED state, which
happens only once during initialization as PHY is already reset in
UNDEFINED state.  Hence enter B_IDLE state only when cable is connected
during initialization.  Otherwise enter low power mode directly from
UNDEFINED state.

Change-Id: I0692dd52ad69093f1a10cb5c87ec713d46d9c7dd
Signed-off-by: Pavankumar Kondeti <pkondeti@codeaurora.org>
1 file changed