diff options
Diffstat (limited to 'driver')
-rw-r--r-- | driver/build.mk | 2 | ||||
-rw-r--r-- | driver/retimer/bb_retimer.h | 2 | ||||
-rw-r--r-- | driver/usb_mux/virtual.c | 16 |
3 files changed, 9 insertions, 11 deletions
diff --git a/driver/build.mk b/driver/build.mk index 4a22432ded..edd97a09a9 100644 --- a/driver/build.mk +++ b/driver/build.mk @@ -138,7 +138,7 @@ driver-$(CONFIG_USB_PD_TCPM_TUSB422)+=tcpm/tusb422.o driver-$(CONFIG_USB_PD_TCPM_NCT38XX)+=tcpm/nct38xx.o # Type-C Retimer drivers -driver-$(CONFIG_USB_PD_RETIMER_INTEL_BB)+=retimer/bb_retimer.o +driver-$(CONFIG_USBC_RETIMER_INTEL_BB)+=retimer/bb_retimer.o # USB mux high-level driver driver-$(CONFIG_USBC_SS_MUX)+=usb_mux/usb_mux.o diff --git a/driver/retimer/bb_retimer.h b/driver/retimer/bb_retimer.h index faecfef4ba..7134517325 100644 --- a/driver/retimer/bb_retimer.h +++ b/driver/retimer/bb_retimer.h @@ -49,7 +49,7 @@ struct bb_retimer { /* * USB Retimers in system, ordered by PD port #, defined at board-level - * CONFIG_USB_PD_RETIMER_INTEL_BB need to be defind at board-level. + * CONFIG_USBC_RETIMER_INTEL_BB need to be defind at board-level. */ extern struct bb_retimer bb_retimers[]; diff --git a/driver/usb_mux/virtual.c b/driver/usb_mux/virtual.c index 70a51953ad..7dc0d9087b 100644 --- a/driver/usb_mux/virtual.c +++ b/driver/usb_mux/virtual.c @@ -28,21 +28,19 @@ 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; -#ifdef CONFIG_USB_PD_RETIMER - if (retimer_set_state(port, mux_state)) + if (IS_ENABLED(CONFIG_USBC_VIRTUAL_MUX_RETIMER) && + retimer_set_state(port, mux_state)) return; -#endif host_set_single_event(EC_HOST_EVENT_USB_MUX); } } static int virtual_init(int port) { -#ifdef CONFIG_USB_PD_RETIMER - return retimer_init(port); -#else - return EC_SUCCESS; -#endif + if (IS_ENABLED(CONFIG_USBC_VIRTUAL_MUX_RETIMER)) + return retimer_init(port); + else + return EC_SUCCESS; } /* @@ -86,7 +84,7 @@ const struct usb_mux_driver virtual_usb_mux_driver = { .init = virtual_init, .set = virtual_set_mux, .get = virtual_get_mux, -#ifdef CONFIG_USB_PD_RETIMER +#ifdef CONFIG_USBC_VIRTUAL_MUX_RETIMER .enter_low_power_mode = retimer_low_power_mode, #endif }; |