USB: OTG: msm: Simplify Runtime PM usage
In current design, PM usage counter operations are scattered across
charging detection work, state machine work, interrupt handler and
resume work. This did not give any problems for typical device mode
or host mode use cases. But with ACA implementation, there will be
many corner cases where PM usage operations can go wrong and device
stays out of low power mode (LPM). Hence leave PM usage counter
operations to state machine work, which knows best about the device
state.
Don't create device and host controller platform devices as children
of OTG device. This helps OTG state machine to know about host bus
suspend and can take a decision whether low power mode is possible or
not.
Change-Id: I00474e396546d2567d09409e70591a6c9d325c06
Signed-off-by: Pavankumar Kondeti <pkondeti@codeaurora.org>
5 files changed