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

Commit 450ba6dd authored by Jack Pham's avatar Jack Pham Committed by Kyle Yan
Browse files

usb: pd: Update power_supply type to USB_PD after PD is established



The USB power_supply now allows PROP_TYPE to be modified. Update it
to 'USB_PD' only after PD communication has been established. This
can happen only in a couple places:

   - in sink mode, when a source capabilities message is received

   - in source mode, when GoodCRC is received after sending the
     source capabilities message successfully

Since PD_ACTIVE=1 is required to be set, also update it in source
mode prior to sending out the capabilities, and clear it if all the
attempts fail. Remove the unreachable/dead code found there as well.

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