OSDN Git Service

usb: pd: Keep PROP_PR_SWAP set during ERROR_RECOVERY
authorJack Pham <jackp@codeaurora.org>
Wed, 7 Jun 2017 05:22:18 +0000 (22:22 -0700)
committerJack Pham <jackp@codeaurora.org>
Wed, 7 Jun 2017 05:50:27 +0000 (22:50 -0700)
commit00adcfcbad43e8f68bed8c3f3df63b58f978137b
tree25ad2dad8767c28b8c7e6a961c92a810c70fb1e9
parented97270b784c0ecaa3809fe8474aa2609ecd3492
usb: pd: Keep PROP_PR_SWAP set during ERROR_RECOVERY

Since ErrorRecovery handling requires a spoof disconnect, the
charger driver needs to avoid immediately reapplying the
terminations. Re-use the PROP_PR_SWAP property which ignores
the disconnect. After the 25ms delay, policy engine will
explicitly reset back to DRP.

Also remove the transition to ErrorRecovery from PE_SNK_DISCOVERY
as it is removed in V1.3 of the PD 2.0 specification.

Change-Id: I41f1da293208b6813dfb540a123ee84ac35b4a68
Signed-off-by: Jack Pham <jackp@codeaurora.org>
drivers/usb/pd/policy_engine.c