usb: pd: Reset pd protocol during cable disconnect
Consider a case where the device has initiated dr_swap to
the connected PD charger to support type-C headset and charging
concurrently. If the charger got disconnected at the same time
when the driver was trying to change the data role then
send_dr_swap flag will be set during disconnect. Upon next connect,
since the flag is already set, the driver will not set the current_pr
to sink and the PD state machine will not kick in causing the charger
to be detected as DCP. Fix this by resetting the pd protocol during
cable disconnect which will clear the flags.
Change-Id: I282986b9d6df37a74d65eb80c1ebc5510add7fe9
Signed-off-by: Pratham Pratap <prathampratap@codeaurora.org>
1 file changed