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

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

usb: pd: Set PROP_PR_SWAP before forcing role



On newer PMICs forcing the current role prior to a PR Swap
causes the Type-C state machine to re-run. During this time
debounce is happening and PD PHY messages will fail to be
transmitted. This is remedied by first sending the Accept
message before setting PROP_PR_SWAP which temporarily reduces
debounce delay, so that then forcing role can happen in a
short time and not interfere with PD PHY operation.

While at it consolidate the handling of all of the above in the
PE_SRC_SNK_TRANSITION_TO_OFF and PE_SNK_SRC_TRANSITION_TO_OFF
cases in usbpd_set_state() to remove redundant code.

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