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

Skip to content
Commit 1fdc55bc authored by Jack Pham's avatar Jack Pham
Browse files

usb: pd: Adapt to new charger detection flow



In sink mode charger will start PD right away, so BC1.2 detected
type will not be known yet. To determine when to start USB peripheral
stack we can do this several ways:

- In case of PD capable source, bit 26 in the first PDO of the
  Source Capabilities indicates USB Communications Capable. Start
  peripheral stack in case this is set
- Similarly for source mode, the Request RDO has an equivalent bit.
  This can be used to determine whether to enable USB data in
  DR Swap and even turn off host stack in source mode.
- In case of non-PD capable source which is determined after 3
  failed hard reset attempts, the REAL_TYPE property will be
  set following policy engine setting PD_ACTIVE to 0. If this
  type is SDP/CDP/FLOAT, start the peripheral stack.
- In case of non-PD legacy cable, power_supply property PE_START
  will be 0 but REAL_TYPE will be populated. Same as above.

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