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

Commit 7ae4a171 authored by Jack Pham's avatar Jack Pham Committed by Abhijeet Dharmapurikar
Browse files

usb: pd: Start state machine when PE_START is true



Support the new POWER_SUPPLY_PROP_PE_START property which
indicates when the policy engine state machine can begin.
This helps to simplify the psy_changed() routine as we can
now rely on this property to indicate that PROP_TYPEC_MODE
and PROP_TYPE are already settled. The state machine work
can now simply begin when seeing a change in TYPEC_MODE.

This replaces the previous use of PROP_PD_ALLOWED which prior
to commit 18da0833 ("usb: pd: Handle PD_ALLOWED within
state machine") was intended to be a marker to start up
the policy engine but now simply indicates whether or not to
start PD comms. We can now move reading of this property to
usbpd_set_state() as it is now only needed locally in the
SNK_STARTUP handling.

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