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:Jack Pham <jackp@codeaurora.org>
Loading
Please register or sign in to comment