summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDiana Z <dzigterman@chromium.org>2022-12-13 15:49:10 -0700
committerChromeos LUCI <chromeos-scoped@luci-project-accounts.iam.gserviceaccount.com>2022-12-14 17:29:12 +0000
commit3ff6d1ff038c9d4d894ea14f9244920363334e75 (patch)
tree9877b65ba27e7e261ddf28d2904c0b5b9276e32b
parentbe23e2974380aa2d82b84a7fc80a8f68f819c10f (diff)
downloadchrome-ec-3ff6d1ff038c9d4d894ea14f9244920363334e75.tar.gz
USB mux: Remove polarity from SAFE mode sets
Currently, we don't send polarity down to drivers for NONE mode. We should do likewise for SAFE mode, which is generally the same as NONE in most applications. BRANCH=None BUG=b:260045058 TEST=on skyrim, ensure SAFE mode is set for either orientation for dongles Change-Id: I7e63804ed46d082dd8db9cee09739d62b466edb6 Signed-off-by: Diana Z <dzigterman@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/4104563 Reviewed-by: Andrew McRae <amcrae@google.com> Code-Coverage: Zoss <zoss-cl-coverage@prod.google.com>
-rw-r--r--driver/usb_mux/usb_mux.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/driver/usb_mux/usb_mux.c b/driver/usb_mux/usb_mux.c
index 73c8a165bf..8029fd6fe6 100644
--- a/driver/usb_mux/usb_mux.c
+++ b/driver/usb_mux/usb_mux.c
@@ -515,7 +515,8 @@ static void perform_mux_set(int port, int index, mux_state_t mux_mode,
return;
/* Configure superspeed lanes */
- mux_state = ((mux_mode != USB_PD_MUX_NONE) && polarity) ?
+ mux_state = ((mux_mode != USB_PD_MUX_NONE) &&
+ (mux_mode != USB_PD_MUX_SAFE_MODE) && polarity) ?
mux_mode | USB_PD_MUX_POLARITY_INVERTED :
mux_mode;