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

Skip to content
Commit eda06a9d authored by Jack Pham's avatar Jack Pham
Browse files

usb: dwc3-msm: Fix check for device suspend



The check in dwc3_msm_suspend() for whether the controller is
in peripheral mode only looks at the charger type being either
SDP or CDP. However, that does not accommodate if the charger
type is unknown, or if SDP/CDP are erroneously detected during
host mode, in which case the device LPM sequence would wrongly
get performed. Instead, check if the OTG state is B_PERIPHERAL.
Also move the checks for pending gadget interrupts and BAM LPM
status under this condition since they're unneeded for host mode.

Change-Id: I7f7be50f3392f6e6b0ccbefc83cd59b3f85a01e2
Signed-off-by: default avatarJack Pham <jackp@codeaurora.org>
parent 86c28639
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