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 /driver | |
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 'driver')
-rw-r--r-- | driver/tcpm/anx74xx.c | 3 | ||||
-rw-r--r-- | driver/tcpm/fusb302.c | 3 | ||||
-rw-r--r-- | driver/tcpm/it83xx.c | 6 | ||||
-rw-r--r-- | driver/tcpm/it8xxx2.c | 4 | ||||
-rw-r--r-- | driver/tcpm/ps8xxx.c | 2 | ||||
-rw-r--r-- | driver/tcpm/stm32gx.c | 2 | ||||
-rw-r--r-- | driver/tcpm/stub.c | 2 | ||||
-rw-r--r-- | driver/tcpm/tcpci.c | 3 |
8 files changed, 14 insertions, 11 deletions
diff --git a/driver/tcpm/anx74xx.c b/driver/tcpm/anx74xx.c index 8916fac17d..3653866673 100644 --- a/driver/tcpm/anx74xx.c +++ b/driver/tcpm/anx74xx.c @@ -17,6 +17,7 @@ #include "usb_mux.h" #include "usb_pd.h" #include "usb_pd_tcpc.h" +#include "usb_pd_tcpm.h" #include "util.h" #if !defined(CONFIG_USB_PD_TCPM_TCPCI) @@ -909,7 +910,7 @@ static int anx74xx_tcpm_get_message_raw(int port, uint32_t *payload, int *head) return anx74xx_read_pd_obj(port, (uint8_t *)payload, len); } -static int anx74xx_tcpm_transmit(int port, enum tcpm_transmit_type type, +static int anx74xx_tcpm_transmit(int port, enum tcpm_sop_type type, uint16_t header, const uint32_t *data) { diff --git a/driver/tcpm/fusb302.c b/driver/tcpm/fusb302.c index 93c9435a0d..370e10b713 100644 --- a/driver/tcpm/fusb302.c +++ b/driver/tcpm/fusb302.c @@ -17,6 +17,7 @@ #include "usb_charge.h" #include "usb_pd.h" #include "usb_pd_tcpc.h" +#include "usb_pd_tcpm.h" #include "util.h" #if defined(CONFIG_USB_PD_DUAL_ROLE_AUTO_TOGGLE) || \ @@ -844,7 +845,7 @@ static int fusb302_tcpm_get_message_raw(int port, uint32_t *payload, int *head) return rv; } -static int fusb302_tcpm_transmit(int port, enum tcpm_transmit_type type, +static int fusb302_tcpm_transmit(int port, enum tcpm_sop_type type, uint16_t header, const uint32_t *data) { /* diff --git a/driver/tcpm/it83xx.c b/driver/tcpm/it83xx.c index 8c45b0e6b3..6c9092613b 100644 --- a/driver/tcpm/it83xx.c +++ b/driver/tcpm/it83xx.c @@ -178,7 +178,7 @@ static int it83xx_tcpm_get_message_raw(int port, uint32_t *buf, int *head) static enum tcpc_transmit_complete it83xx_tx_data( enum usbpd_port port, - enum tcpm_transmit_type type, + enum tcpm_sop_type type, uint16_t header, const uint32_t *buf) { @@ -247,7 +247,7 @@ static enum tcpc_transmit_complete it83xx_tx_data( } static enum tcpc_transmit_complete it83xx_send_hw_reset(enum usbpd_port port, - enum tcpm_transmit_type reset_type) + enum tcpm_sop_type reset_type) { if (reset_type == TCPC_TX_CABLE_RESET) IT83XX_USBPD_MTSR0(port) |= USBPD_REG_MASK_CABLE_ENABLE; @@ -678,7 +678,7 @@ static int it83xx_tcpm_set_rx_enable(int port, int enable) } static int it83xx_tcpm_transmit(int port, - enum tcpm_transmit_type type, + enum tcpm_sop_type type, uint16_t header, const uint32_t *data) { diff --git a/driver/tcpm/it8xxx2.c b/driver/tcpm/it8xxx2.c index 246075207f..9f34442bd9 100644 --- a/driver/tcpm/it8xxx2.c +++ b/driver/tcpm/it8xxx2.c @@ -197,7 +197,7 @@ void it8xxx2_get_tx_error_status(enum usbpd_port port) } static enum tcpc_transmit_complete it8xxx2_tx_data(enum usbpd_port port, - enum tcpm_transmit_type type, + enum tcpm_sop_type type, uint16_t header, const uint32_t *buf) { @@ -595,7 +595,7 @@ static int it8xxx2_tcpm_set_rx_enable(int port, int enable) } static int it8xxx2_tcpm_transmit(int port, - enum tcpm_transmit_type type, + enum tcpm_sop_type type, uint16_t header, const uint32_t *data) { diff --git a/driver/tcpm/ps8xxx.c b/driver/tcpm/ps8xxx.c index cab795ef09..51b6c4c412 100644 --- a/driver/tcpm/ps8xxx.c +++ b/driver/tcpm/ps8xxx.c @@ -414,7 +414,7 @@ static int ps8xxx_tcpc_bist_mode_2(int port) return rv; } -static int ps8xxx_tcpm_transmit(int port, enum tcpm_transmit_type type, +static int ps8xxx_tcpm_transmit(int port, enum tcpm_sop_type type, uint16_t header, const uint32_t *data) { if (type == TCPC_TX_BIST_MODE_2) diff --git a/driver/tcpm/stm32gx.c b/driver/tcpm/stm32gx.c index 654bf73652..4b33f32209 100644 --- a/driver/tcpm/stm32gx.c +++ b/driver/tcpm/stm32gx.c @@ -103,7 +103,7 @@ static int stm32gx_tcpm_set_rx_enable(int port, int enable) } static int stm32gx_tcpm_transmit(int port, - enum tcpm_transmit_type type, + enum tcpm_sop_type type, uint16_t header, const uint32_t *data) { diff --git a/driver/tcpm/stub.c b/driver/tcpm/stub.c index 352124e5dc..48c0c51da9 100644 --- a/driver/tcpm/stub.c +++ b/driver/tcpm/stub.c @@ -113,7 +113,7 @@ void tcpm_clear_pending_messages(int port) rx_buf_clear(port); } -int tcpm_transmit(int port, enum tcpm_transmit_type type, uint16_t header, +int tcpm_transmit(int port, enum tcpm_sop_type type, uint16_t header, const uint32_t *data) { return tcpc_transmit(port, type, header, data); diff --git a/driver/tcpm/tcpci.c b/driver/tcpm/tcpci.c index d113d876ea..6674b67c02 100644 --- a/driver/tcpm/tcpci.c +++ b/driver/tcpm/tcpci.c @@ -22,6 +22,7 @@ #include "usb_mux.h" #include "usb_pd.h" #include "usb_pd_tcpc.h" +#include "usb_pd_tcpm.h" #include "util.h" #define CPRINTF(format, args...) cprintf(CC_USBPD, format, ## args) @@ -943,7 +944,7 @@ void tcpm_clear_pending_messages(int port) q->tail = q->head; } -int tcpci_tcpm_transmit(int port, enum tcpm_transmit_type type, +int tcpci_tcpm_transmit(int port, enum tcpm_sop_type type, uint16_t header, const uint32_t *data) { int reg = TCPC_REG_TX_DATA; |