diff options
author | Diana Z <dzigterman@chromium.org> | 2022-09-17 22:21:09 -0600 |
---|---|---|
committer | Chromeos LUCI <chromeos-scoped@luci-project-accounts.iam.gserviceaccount.com> | 2022-09-19 20:00:57 +0000 |
commit | 6278fe9df729c6816eafbea2169968170ac2a714 (patch) | |
tree | 7a3719d72eaf2f9eb2a314f593c9736dcbb44a51 /driver/retimer/pi3dpx1207.c | |
parent | a83d94399b79a91421034ee37bfc22dad05c8013 (diff) | |
download | chrome-ec-6278fe9df729c6816eafbea2169968170ac2a714.tar.gz |
USB Mux: Unify drivers for safe mode
When safe mode was first introduced, it was added only to drivers on the
boards with virtual muxes and the mode wasn't sent to other drivers.
Since safe mode is defined as an input for the mux API, ensure all
drivers can handle this input. For now, set up all drivers which did
not have handling to handle it the same as None, which was previously
sent to them.
LOW_COVERAGE_REASON=20 of the changed drivers have no emulators
BRANCH=None
BUG=b:234772074
TEST=make -j buildall; search for all files containing a usb_mux_driver
without any reference to USB_PD_MUX_SAFE_MODE and ensure they are
correct to not reference it
Signed-off-by: Diana Z <dzigterman@chromium.org>
Change-Id: Ib927057bbf1638d09000bdad98bc096a6e103611
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3902611
Code-Coverage: Zoss <zoss-cl-coverage@prod.google.com>
Reviewed-by: Abe Levkoy <alevkoy@chromium.org>
Commit-Queue: Abe Levkoy <alevkoy@chromium.org>
Diffstat (limited to 'driver/retimer/pi3dpx1207.c')
-rw-r--r-- | driver/retimer/pi3dpx1207.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/driver/retimer/pi3dpx1207.c b/driver/retimer/pi3dpx1207.c index 5fac18e049..27ea474832 100644 --- a/driver/retimer/pi3dpx1207.c +++ b/driver/retimer/pi3dpx1207.c @@ -101,6 +101,10 @@ static int pi3dpx1207_set_mux(const struct usb_mux *me, mux_state_t mux_state, /* This driver does not use host command ACKs */ *ack_required = false; + /* This driver treats safe mode as none */ + if (mux_state == USB_PD_MUX_SAFE_MODE) + mux_state = USB_PD_MUX_NONE; + /* USB */ if (mux_state & USB_PD_MUX_USB_ENABLED) { gpio_or_ioex_set_level(gpio_enable, 1); |