diff options
author | Tomasz Michalec <tm@semihalf.com> | 2022-07-20 13:46:12 +0200 |
---|---|---|
committer | Chromeos LUCI <chromeos-scoped@luci-project-accounts.iam.gserviceaccount.com> | 2022-09-13 11:17:21 +0000 |
commit | d0a517d8d8c073d2187e178343761872d0229bd5 (patch) | |
tree | c4e6237d1c39f0022820f6756941bb8bcf0b4f47 /test | |
parent | 1c560952691392bab354f01d4d434f664f5123b3 (diff) | |
download | chrome-ec-d0a517d8d8c073d2187e178343761872d0229bd5.tar.gz |
test: usb_mux: Split struct usb_mux in tests
Update tests to use new struct usb_mux_chain.
BUG=b:236274003
TEST=make buildall
BRANCH=None
Cq-Depend: chromium:3748785
Signed-off-by: Tomasz Michalec <tm@semihalf.com>
Change-Id: I2d01d35d1155a6cdec558bedf06b09e0b00aa642
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3780413
Tested-by: Tomasz Michalec <tmichalec@google.com>
Commit-Queue: Tomasz Michalec <tmichalec@google.com>
Reviewed-by: Keith Short <keithshort@chromium.org>
Diffstat (limited to 'test')
-rw-r--r-- | test/usb_pd_int.c | 7 | ||||
-rw-r--r-- | test/usb_pe_drp.c | 7 | ||||
-rw-r--r-- | test/usb_pe_drp_noextended.c | 7 | ||||
-rw-r--r-- | test/usb_pe_drp_old.c | 2 | ||||
-rw-r--r-- | test/usb_pe_drp_old_noextended.c | 2 | ||||
-rw-r--r-- | test/usb_tcpmv2_compliance.h | 2 | ||||
-rw-r--r-- | test/usb_tcpmv2_compliance_common.c | 7 | ||||
-rw-r--r-- | test/usb_typec_drp_acc_trysrc.c | 7 |
8 files changed, 28 insertions, 13 deletions
diff --git a/test/usb_pd_int.c b/test/usb_pd_int.c index 0450f88514..44cc280ed1 100644 --- a/test/usb_pd_int.c +++ b/test/usb_pd_int.c @@ -19,8 +19,11 @@ const struct tcpc_config_t tcpc_config[CONFIG_USB_PD_PORT_MAX_COUNT] = { }, }; -const struct usb_mux usb_muxes[CONFIG_USB_PD_PORT_MAX_COUNT] = { { - .driver = &mock_usb_mux_driver, +const struct usb_mux_chain usb_muxes[CONFIG_USB_PD_PORT_MAX_COUNT] = { { + .mux = + &(const struct usb_mux){ + .driver = &mock_usb_mux_driver, + }, } }; void board_reset_pd_mcu(void) diff --git a/test/usb_pe_drp.c b/test/usb_pe_drp.c index 0c8795efb4..8d75454c6a 100644 --- a/test/usb_pe_drp.c +++ b/test/usb_pe_drp.c @@ -28,8 +28,11 @@ const struct tcpc_config_t tcpc_config[CONFIG_USB_PD_PORT_MAX_COUNT] = { }, }; -const struct usb_mux usb_muxes[CONFIG_USB_PD_PORT_MAX_COUNT] = { { - .driver = &mock_usb_mux_driver, +const struct usb_mux_chain usb_muxes[CONFIG_USB_PD_PORT_MAX_COUNT] = { { + .mux = + &(const struct usb_mux){ + .driver = &mock_usb_mux_driver, + }, } }; void before_test(void) diff --git a/test/usb_pe_drp_noextended.c b/test/usb_pe_drp_noextended.c index 3a1d411633..6108458c9c 100644 --- a/test/usb_pe_drp_noextended.c +++ b/test/usb_pe_drp_noextended.c @@ -24,8 +24,11 @@ const struct tcpc_config_t tcpc_config[CONFIG_USB_PD_PORT_MAX_COUNT] = { }, }; -const struct usb_mux usb_muxes[CONFIG_USB_PD_PORT_MAX_COUNT] = { { - .driver = &mock_usb_mux_driver, +const struct usb_mux_chain usb_muxes[CONFIG_USB_PD_PORT_MAX_COUNT] = { { + .mux = + &(const struct usb_mux){ + .driver = &mock_usb_mux_driver, + }, } }; void before_test(void) diff --git a/test/usb_pe_drp_old.c b/test/usb_pe_drp_old.c index 92ca655eb3..0985a4cae9 100644 --- a/test/usb_pe_drp_old.c +++ b/test/usb_pe_drp_old.c @@ -35,7 +35,7 @@ const struct svdm_response svdm_rsp = { }; const struct tcpc_config_t tcpc_config[CONFIG_USB_PD_PORT_MAX_COUNT]; -const struct usb_mux usb_muxes[CONFIG_USB_PD_PORT_MAX_COUNT]; +const struct usb_mux_chain usb_muxes[CONFIG_USB_PD_PORT_MAX_COUNT]; static bool prl_is_busy_flag; diff --git a/test/usb_pe_drp_old_noextended.c b/test/usb_pe_drp_old_noextended.c index 4c8355bf4e..43df6375b0 100644 --- a/test/usb_pe_drp_old_noextended.c +++ b/test/usb_pe_drp_old_noextended.c @@ -27,7 +27,7 @@ const struct svdm_response svdm_rsp = { }; const struct tcpc_config_t tcpc_config[CONFIG_USB_PD_PORT_MAX_COUNT]; -const struct usb_mux usb_muxes[CONFIG_USB_PD_PORT_MAX_COUNT]; +const struct usb_mux_chain usb_muxes[CONFIG_USB_PD_PORT_MAX_COUNT]; int board_vbus_source_enabled(int port) { diff --git a/test/usb_tcpmv2_compliance.h b/test/usb_tcpmv2_compliance.h index bf61e45458..0ca4717173 100644 --- a/test/usb_tcpmv2_compliance.h +++ b/test/usb_tcpmv2_compliance.h @@ -26,7 +26,7 @@ extern uint32_t rdo; extern uint32_t pdo; extern const struct tcpc_config_t tcpc_config[]; -extern const struct usb_mux usb_muxes[]; +extern const struct usb_mux_chain usb_muxes[]; void mock_set_cc(enum mock_connect_result cr, enum mock_cc_state cc1, enum mock_cc_state cc2); diff --git a/test/usb_tcpmv2_compliance_common.c b/test/usb_tcpmv2_compliance_common.c index 1e43a2ec86..9f839ecf1c 100644 --- a/test/usb_tcpmv2_compliance_common.c +++ b/test/usb_tcpmv2_compliance_common.c @@ -30,8 +30,11 @@ const struct tcpc_config_t tcpc_config[CONFIG_USB_PD_PORT_MAX_COUNT] = { }, }; -const struct usb_mux usb_muxes[CONFIG_USB_PD_PORT_MAX_COUNT] = { { - .driver = &mock_usb_mux_driver, +const struct usb_mux_chain usb_muxes[CONFIG_USB_PD_PORT_MAX_COUNT] = { { + .mux = + &(const struct usb_mux){ + .driver = &mock_usb_mux_driver, + }, } }; void mock_set_cc(enum mock_connect_result cr, enum mock_cc_state cc1, diff --git a/test/usb_typec_drp_acc_trysrc.c b/test/usb_typec_drp_acc_trysrc.c index c59eb3c3df..28da84e228 100644 --- a/test/usb_typec_drp_acc_trysrc.c +++ b/test/usb_typec_drp_acc_trysrc.c @@ -34,8 +34,11 @@ const struct tcpc_config_t tcpc_config[CONFIG_USB_PD_PORT_MAX_COUNT] = { }, }; -const struct usb_mux usb_muxes[CONFIG_USB_PD_PORT_MAX_COUNT] = { { - .driver = &mock_usb_mux_driver, +const struct usb_mux_chain usb_muxes[CONFIG_USB_PD_PORT_MAX_COUNT] = { { + .mux = + &(const struct usb_mux){ + .driver = &mock_usb_mux_driver, + }, } }; void charge_manager_set_ceil(int port, enum ceil_requestor requestor, int ceil) |