diff options
author | Denis Brockus <dbrockus@chromium.org> | 2019-11-21 07:30:54 -0700 |
---|---|---|
committer | Commit Bot <commit-bot@chromium.org> | 2019-11-25 22:17:24 +0000 |
commit | f9fd94f64d3294c2005048164361e3697d63a7bb (patch) | |
tree | d408036789da808cc6be0d2b4b08ad9e8f6c6970 /driver/usb_mux | |
parent | a621ea9f352a7fdd5fa41982bfc4c13f1e351f3c (diff) | |
download | chrome-ec-f9fd94f64d3294c2005048164361e3697d63a7bb.tar.gz |
usbc: make BB virtual mux retimer compatible with non-virtual
Changed the driver interface for BB virtual mux retimer to
stop using global functions and use the usb_retimers array
instead.
BUG=none
BRANCH=none
TEST=make buildall -j
Change-Id: I56befaca1720eb2f4e0599a983629b4df45dc76b
Signed-off-by: Denis Brockus <dbrockus@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/1928121
Reviewed-by: Edward Hill <ecgh@chromium.org>
Commit-Queue: Edward Hill <ecgh@chromium.org>
Diffstat (limited to 'driver/usb_mux')
-rw-r--r-- | driver/usb_mux/virtual.c | 13 |
1 files changed, 2 insertions, 11 deletions
diff --git a/driver/usb_mux/virtual.c b/driver/usb_mux/virtual.c index 7dc0d9087b..a6e8377ce8 100644 --- a/driver/usb_mux/virtual.c +++ b/driver/usb_mux/virtual.c @@ -9,7 +9,6 @@ #include "console.h" #include "host_command.h" #include "usb_mux.h" -#include "usb_retimer.h" #include "util.h" /* @@ -28,19 +27,14 @@ static inline void virtual_mux_update_state(int port, mux_state_t mux_state) { if (virtual_mux_state[port] != mux_state) { virtual_mux_state[port] = mux_state; - if (IS_ENABLED(CONFIG_USBC_VIRTUAL_MUX_RETIMER) && - retimer_set_state(port, mux_state)) - return; + host_set_single_event(EC_HOST_EVENT_USB_MUX); } } static int virtual_init(int port) { - if (IS_ENABLED(CONFIG_USBC_VIRTUAL_MUX_RETIMER)) - return retimer_init(port); - else - return EC_SUCCESS; + return EC_SUCCESS; } /* @@ -84,7 +78,4 @@ const struct usb_mux_driver virtual_usb_mux_driver = { .init = virtual_init, .set = virtual_set_mux, .get = virtual_get_mux, -#ifdef CONFIG_USBC_VIRTUAL_MUX_RETIMER - .enter_low_power_mode = retimer_low_power_mode, -#endif }; |