summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--fuzz/usb_tcpm_v2_rev20_fuzz.c12
-rw-r--r--test/usb_pd_int.c7
-rw-r--r--test/usb_pe_drp.c7
-rw-r--r--test/usb_pe_drp_noextended.c7
-rw-r--r--test/usb_pe_drp_old.c2
-rw-r--r--test/usb_pe_drp_old_noextended.c2
-rw-r--r--test/usb_tcpmv2_compliance.h2
-rw-r--r--test/usb_tcpmv2_compliance_common.c7
-rw-r--r--test/usb_typec_drp_acc_trysrc.c7
9 files changed, 37 insertions, 16 deletions
diff --git a/fuzz/usb_tcpm_v2_rev20_fuzz.c b/fuzz/usb_tcpm_v2_rev20_fuzz.c
index 9806c9228b..c4f57432ad 100644
--- a/fuzz/usb_tcpm_v2_rev20_fuzz.c
+++ b/fuzz/usb_tcpm_v2_rev20_fuzz.c
@@ -16,12 +16,18 @@ const struct svdm_response svdm_rsp = {
};
/* USB mux configuration */
-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] = {
{
- .driver = &mock_usb_mux_driver,
+ .mux =
+ &(const struct usb_mux){
+ .driver = &mock_usb_mux_driver,
+ },
},
{
- .driver = &mock_usb_mux_driver,
+ .mux =
+ &(const struct usb_mux){
+ .driver = &mock_usb_mux_driver,
+ },
}
};
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)