diff options
author | Daisuke Nojiri <dnojiri@chromium.org> | 2019-01-15 10:09:34 -0800 |
---|---|---|
committer | ChromeOS Commit Bot <chromeos-commit-bot@chromium.org> | 2019-01-16 03:52:08 +0000 |
commit | 52fe46f16cb1eb444a1efe4a5e2cb02f40237152 (patch) | |
tree | 600d7476c91cbbe70ede57aa8a07576ec87f364e | |
parent | 04628c211532196af66b1bf9bf8e6fa6a87a4360 (diff) | |
download | chrome-ec-52fe46f16cb1eb444a1efe4a5e2cb02f40237152.tar.gz |
USB-PD: Disable Vconn on SRC_DISCONNECT
Currently, source only devices do not turn off Vconn when a partner
is disconnected. This causes the polarity detection to be disabled.
This patch turns off Vconn on SRC_DISCONNECT for
!CONFIG_USB_PD_DUAL_ROLE boards.
Signed-off-by: Daisuke Nojiri <dnojiri@chromium.org>
BUG=b/122861749
BRANCH=Kalista
TEST=Plug in an ethernet dongle via a USB-C-to-A adapter. Replug it
upside down and verify Ethernet is turned on on both sides.
Change-Id: I4ac303f2121d9e4114ce7097db304e4f65f27ae0
Reviewed-on: https://chromium-review.googlesource.com/c/1412992
Tested-by: David Huang <David.Huang@quantatw.com>
Reviewed-by: David Huang <David.Huang@quantatw.com>
Reviewed-by: Daisuke Nojiri <dnojiri@chromium.org>
Commit-Queue: David Huang <David.Huang@quantatw.com>
-rw-r--r-- | common/usb_pd_protocol.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/common/usb_pd_protocol.c b/common/usb_pd_protocol.c index 1f5ce39987..93c32a7a1e 100644 --- a/common/usb_pd_protocol.c +++ b/common/usb_pd_protocol.c @@ -628,7 +628,10 @@ static inline void set_state(int port, enum pd_states next_state) 0); #else /* CONFIG_USB_PD_DUAL_ROLE */ if (next_state == PD_STATE_SRC_DISCONNECTED) { -#endif +#ifdef CONFIG_USBC_VCONN + set_vconn(port, 0); +#endif /* CONFIG_USBC_VCONN */ +#endif /* !CONFIG_USB_PD_DUAL_ROLE */ /* * If we are source, make sure VBUS is off and * if PD REV3.0, restore RP. |