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