usb: dwc3-msm: Allow suspend when ext client in use
In order to allow the DWC3 HW to suspend, the OTG layer must not
be runtime PM active, as that would cause the DWC3 parent to also
remain in RPM active state. An external client, such as MHL, could
notify that it is using the connection, but it may happen after
the VBUS cable detection event was already sent to OTG to kick off
its state machines, which necessarily does a runtime resume.
In that case, force OTG to runtime suspend by de-asserting BSV (and
asserting ID) which puts it in OTG_STATE_B_IDLE, as long as the
external client is in use. This will allow the dwc3-msm device to
enter suspend. Then after the external client is finished, OTG can
be notified of cached BSV/ID values to resume normal USB operation.
Change-Id: Ic3319f05605eb1723324db225be1d11c3b55b01e
Signed-off-by: Jack Pham <jackp@codeaurora.org>
1 file changed