diff options
author | Abe Levkoy <alevkoy@chromium.org> | 2021-08-18 11:43:25 -0600 |
---|---|---|
committer | Commit Bot <commit-bot@chromium.org> | 2021-08-18 23:04:51 +0000 |
commit | 59e395027ab03c0ca2b5263193b30dff1c063c44 (patch) | |
tree | 7965d55bbc96f1515bdd2ca063fe5d48b69f1bd4 /test | |
parent | fb89306a92228081e4203a33725357dd9754b6c8 (diff) | |
download | chrome-ec-59e395027ab03c0ca2b5263193b30dff1c063c44.tar.gz |
TCPM: Rename enum tcpm_transmit_type
Rename tcpm_transmit_type to tcpm_sop_type to reflect that it can be
used for Rx as well. Describe it in comments. This prepares to
consolidate enum pd_msg_type into this enum.
BUG=b:155476419
TEST=make buildall
BRANCH=none
Signed-off-by: Abe Levkoy <alevkoy@chromium.org>
Change-Id: Ife97d4ad51c48f2e832b94e007954919e236a309
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3104290
Reviewed-by: Keith Short <keithshort@chromium.org>
Diffstat (limited to 'test')
-rw-r--r-- | test/fake_usbc.c | 7 | ||||
-rw-r--r-- | test/usb_prl_old.c | 11 |
2 files changed, 10 insertions, 8 deletions
diff --git a/test/fake_usbc.c b/test/fake_usbc.c index dc27c0e941..e60bd16898 100644 --- a/test/fake_usbc.c +++ b/test/fake_usbc.c @@ -7,6 +7,7 @@ #include "common.h" #include "usb_tc_sm.h" #include "usb_pd.h" +#include "usb_pd_tcpm.h" __overridable int pd_is_vbus_present(int port) { @@ -56,7 +57,7 @@ __overridable enum pd_cable_plug tc_get_cable_plug(int port) return PD_PLUG_FROM_DFP_UFP; } -__overridable int pd_get_rev(int port, enum tcpm_transmit_type type) +__overridable int pd_get_rev(int port, enum tcpm_sop_type type) { return IS_ENABLED(CONFIG_USB_PD_REV30) ? PD_REV30 : PD_REV20; } @@ -258,12 +259,12 @@ void dpm_init(int port) { } -void dpm_vdm_acked(int port, enum tcpm_transmit_type type, int vdo_count, +void dpm_vdm_acked(int port, enum tcpm_sop_type type, int vdo_count, uint32_t *vdm) { } -void dpm_vdm_naked(int port, enum tcpm_transmit_type type, uint16_t svid, +void dpm_vdm_naked(int port, enum tcpm_sop_type type, uint16_t svid, uint8_t vdm_cmd) { } diff --git a/test/usb_prl_old.c b/test/usb_prl_old.c index b3e39b3b30..4cd4b3bbaf 100644 --- a/test/usb_prl_old.c +++ b/test/usb_prl_old.c @@ -13,6 +13,7 @@ #include "usb_emsg.h" #include "usb_pd_test_util.h" #include "usb_pd.h" +#include "usb_pd_tcpm.h" #include "usb_pe_sm.h" #include "usb_prl_sm.h" #include "usb_sm_checks.h" @@ -114,7 +115,7 @@ static struct pd_prl { enum pd_data_role data_role; int msg_tx_id; int msg_rx_id; - enum tcpm_transmit_type sop; + enum tcpm_sop_type sop; int mock_pe_message_sent; int mock_pe_error; @@ -505,7 +506,7 @@ static int verify_ctrl_msg_transmission(int port, } static int simulate_send_ctrl_msg_request_from_pe(int port, - enum tcpm_transmit_type type, enum pd_ctrl_msg_type msg_type) + enum tcpm_sop_type type, enum pd_ctrl_msg_type msg_type) { pd_port[port].mock_got_soft_reset = 0; pd_port[port].mock_pe_error = -1; @@ -564,7 +565,7 @@ static int verify_data_msg_transmission(int port, } static int simulate_send_data_msg_request_from_pe(int port, - enum tcpm_transmit_type type, enum pd_ctrl_msg_type msg_type, int len) + enum tcpm_sop_type type, enum pd_ctrl_msg_type msg_type, int len) { int i; uint8_t *buf = tx_emsg[port].buf; @@ -699,7 +700,7 @@ static int verify_extended_data_msg_transmission(int port, } static int simulate_send_extended_data_msg(int port, - enum tcpm_transmit_type type, enum pd_ctrl_msg_type msg_type, + enum tcpm_sop_type type, enum pd_ctrl_msg_type msg_type, int len) { int i; @@ -757,7 +758,7 @@ enum pd_cable_plug tc_get_cable_plug(int port) return PD_PLUG_FROM_DFP_UFP; } -void pe_report_error(int port, enum pe_error e, enum tcpm_transmit_type type) +void pe_report_error(int port, enum pe_error e, enum tcpm_sop_type type) { pd_port[port].mock_pe_error = e; pd_port[port].sop = type; |