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

Commit 172cec3a authored by Jack Pham's avatar Jack Pham
Browse files

usb: pd: Improve sink hard reset handling



During hard reset in sink mode, move the wait for VBUS to
reconnect to the PE_SNK_TRANSITION_TO_DEFAULT state. Use
the hrtimer to wait up to the maximum expected time for
VBUS to come back, which is triggered by the CC notification
from psy_changed(). This simplifies PE_SNK_STARTUP to only be
invoked when VBUS is already present and eliminates the
PE_SNK_DISCOVERY state.

When a non-PD source is connected, as the engine attempts to
wait for source capabilities this will result in hard reset
getting attempted 3 times with the hrtimer reaching full
timeout each time (for a total of ~6s) before settling.

Change-Id: Iee74c206b28fea9b75df2d234609a7939bc3d93c
Signed-off-by: default avatarJack Pham <jackp@codeaurora.org>
parent 773f15cd
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