usb: pd: Handle APSD detection during initial connection
The charger driver recently updated to run APSD type detection
concurrently with initial PD communication. In the case of a
non-PD SDP source, the type detection will be completed as the
sink state machine is attempting to do a hard reset. Add a check
in SNK_STARTUP to determine if it is SDP/CDP and start the USB
peripheral stack then.
In the case a PD source is connected and the USB Communication
bit is set in the capabilities message, wait until after setting
PD_ACTIVE to the charger before starting the USB peripheral stack.
This ensures that the charger will be done using D+/D- for charger
detection and won't conflict with USB data signaling. In this
case the USB Communication capable bit supersedes the charger type
detection.
Change-Id: If068046e1ba959eb31ec2233159313e642442e00
Signed-off-by:
Jack Pham <jackp@codeaurora.org>
Loading
Please register or sign in to comment