Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 21caf806 authored by Mayank Rana's avatar Mayank Rana Committed by Ajay Agarwal
Browse files

dwc3-msm: Allow USB LPM with data role swap from dfp to ufp



Current code checks IN_P3 status (i.e. USB is into U3 or not) with
dwc3_prepare_suspend() API using in_host_mode or vbus_active flag.
With data role swap transition (e.g. dfp -> ufp case), in_host_mode
flag sets to false and vbus_active flag sets to true due to quick
calling of stop host and start peripheral mode from policy engine.
This results into USB doesn't go into LPM with stop host mode (i.e.
USB LPM is aborted due to vbus_active flag seen as true) which
results into no USB enumeration in start peripheral mode. Current
code doesn't perform block reset while stopping USB host mode
functionality. Hence to invoke USB core and PHYs related reset and
init functionality allow USB LPM by replacing vbus_active check with
in_device_mode flag which provides status of USB controller's data
role while going into USB LPM. Start peripheral mode brings USB
out of LPM which performs POR functionality.

Change-Id: I2bbb804bce5f910826ba30a3dda4317bbdb2e1f1
Signed-off-by: default avatarMayank Rana <mrana@codeaurora.org>
Signed-off-by: default avatarAjay Agarwal <ajaya@codeaurora.org>
parent 58a9174f
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment