summaryrefslogtreecommitdiff
path: root/include/usb_pd.h
diff options
context:
space:
mode:
authorAlec Berg <alecaberg@chromium.org>2015-05-04 10:44:52 -0700
committerChromeOS Commit Bot <chromeos-commit-bot@chromium.org>2015-05-05 03:36:24 +0000
commit828086e961c0107bbdd65fa1086c082e95c912fc (patch)
tree63dd7a3750d5f1bc13ad0f0787d5822dd422d253 /include/usb_pd.h
parent1abcdf9145eaa4508546190f76577289dcd04803 (diff)
downloadchrome-ec-828086e961c0107bbdd65fa1086c082e95c912fc.tar.gz
pd: add explicit setting of D+/D- switch when setting type-C muxes
Add explicit setting of USB D+/D- switch when setting the type-C muxes. This fixes a bug in which we would open D+/D- switch when entering DP mode and lose USB2.0 connection. BUG=chrome-os-partner:39766 BRANCH=samus TEST=add printf to board_set_usb_switches() on samus and make sure we don't open the D+/D- switch when entering DP mode. Change-Id: I2b5bb2185298794ddb4cc457f3695ce6adabd9f8 Signed-off-by: Alec Berg <alecaberg@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/268993 Reviewed-by: Todd Broch <tbroch@chromium.org> Tested-by: Todd Broch <tbroch@chromium.org> Reviewed-by: Vincent Palatin <vpalatin@chromium.org> Reviewed-by: Scott Collyer <scollyer@chromium.org>
Diffstat (limited to 'include/usb_pd.h')
-rw-r--r--include/usb_pd.h8
1 files changed, 7 insertions, 1 deletions
diff --git a/include/usb_pd.h b/include/usb_pd.h
index 30e25d949a..d957761ac5 100644
--- a/include/usb_pd.h
+++ b/include/usb_pd.h
@@ -1135,6 +1135,11 @@ enum typec_mux {
TYPEC_MUX_DOCK,
};
+enum usb_switch {
+ USB_SWITCH_CONNECT,
+ USB_SWITCH_DISCONNECT,
+};
+
/**
* Configure superspeed muxes on type-C port.
*
@@ -1142,7 +1147,8 @@ enum typec_mux {
* @param mux selected function.
* @param polarity plug polarity (0=CC1, 1=CC2).
*/
-void board_set_usb_mux(int port, enum typec_mux mux, int polarity);
+void board_set_usb_mux(int port, enum typec_mux mux,
+ enum usb_switch usb, int polarity);
/**
* Query superspeed mux status on type-C port.