From 59e395027ab03c0ca2b5263193b30dff1c063c44 Mon Sep 17 00:00:00 2001 From: Abe Levkoy Date: Wed, 18 Aug 2021 11:43:25 -0600 Subject: 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 Change-Id: Ife97d4ad51c48f2e832b94e007954919e236a309 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3104290 Reviewed-by: Keith Short --- chip/stm32/ucpd-stm32gx.c | 12 ++++++------ chip/stm32/ucpd-stm32gx.h | 4 ++-- 2 files changed, 8 insertions(+), 8 deletions(-) (limited to 'chip') diff --git a/chip/stm32/ucpd-stm32gx.c b/chip/stm32/ucpd-stm32gx.c index 94f7ed6eba..84726d55be 100644 --- a/chip/stm32/ucpd-stm32gx.c +++ b/chip/stm32/ucpd-stm32gx.c @@ -105,7 +105,7 @@ union buffer { }; struct ucpd_tx_desc { - enum tcpm_transmit_type type; + enum tcpm_sop_type type; int msg_len; int msg_index; union buffer data; @@ -719,7 +719,7 @@ int stm32gx_ucpd_get_chip_info(int port, int live, static int stm32gx_ucpd_start_transmit(int port, enum ucpd_tx_msg msg_type) { - enum tcpm_transmit_type type; + enum tcpm_sop_type type; /* Select the correct tx desciptor */ ucpd_tx_active_buffer = &ucpd_tx_buffers[msg_type]; @@ -1130,7 +1130,7 @@ static void ucpd_send_good_crc(int port, uint16_t rx_header) int msg_id; int rev_id; uint16_t tx_header; - enum tcpm_transmit_type tx_type; + enum tcpm_sop_type tx_type; enum pd_power_role pr = 0; enum pd_data_role dr = 0; @@ -1146,7 +1146,7 @@ static void ucpd_send_good_crc(int port, uint16_t rx_header) /* * Get the rx ordered set code just detected. SOP -> SOP''_Debug are in - * the same order as enum tcpm_transmit_type and so can be used + * the same order as enum tcpm_sop_type and so can be used * directly. */ tx_type = STM32_UCPD_RX_ORDSETR(port) & STM32_UCPD_RXORDSETR_MASK; @@ -1180,7 +1180,7 @@ static void ucpd_send_good_crc(int port, uint16_t rx_header) } int stm32gx_ucpd_transmit(int port, - enum tcpm_transmit_type type, + enum tcpm_sop_type type, uint16_t header, const uint32_t *data) { @@ -1319,7 +1319,7 @@ void stm32gx_ucpd1_irq(void) /* Check for errors */ if (!(sr & STM32_UCPD_SR_RXERR)) { uint16_t *rx_header = (uint16_t *)ucpd_rx_buffer; - enum tcpm_transmit_type type; + enum tcpm_sop_type type; int good_crc = 0; type = STM32_UCPD_RX_ORDSETR(port) & diff --git a/chip/stm32/ucpd-stm32gx.h b/chip/stm32/ucpd-stm32gx.h index 0ffb8ffcd8..f7021136ad 100644 --- a/chip/stm32/ucpd-stm32gx.h +++ b/chip/stm32/ucpd-stm32gx.h @@ -51,7 +51,7 @@ #define UCPD_RST2 0x19u #define UCPD_EOP 0x0Du -/* This order of this enum matches tcpm_transmit_type */ +/* This order of this enum matches tcpm_sop_type */ enum ucpd_tx_ordset { TX_ORDERSET_SOP = (UCPD_SYNC1 | (UCPD_SYNC1<<5u) | @@ -173,7 +173,7 @@ int stm32gx_ucpd_set_msg_header(int port, int power_role, int data_role); * @return EC_SUCCESS */ int stm32gx_ucpd_transmit(int port, - enum tcpm_transmit_type type, + enum tcpm_sop_type type, uint16_t header, const uint32_t *data); -- cgit v1.2.1