summaryrefslogtreecommitdiff
path: root/common/usbc/usb_prl_sm.c
diff options
context:
space:
mode:
authorAbe Levkoy <alevkoy@chromium.org>2021-08-18 11:43:25 -0600
committerCommit Bot <commit-bot@chromium.org>2021-08-18 23:04:51 +0000
commit59e395027ab03c0ca2b5263193b30dff1c063c44 (patch)
tree7965d55bbc96f1515bdd2ca063fe5d48b69f1bd4 /common/usbc/usb_prl_sm.c
parentfb89306a92228081e4203a33725357dd9754b6c8 (diff)
downloadchrome-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 'common/usbc/usb_prl_sm.c')
-rw-r--r--common/usbc/usb_prl_sm.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/common/usbc/usb_prl_sm.c b/common/usbc/usb_prl_sm.c
index 1d77de1aa4..c09854bb46 100644
--- a/common/usbc/usb_prl_sm.c
+++ b/common/usbc/usb_prl_sm.c
@@ -312,7 +312,7 @@ static struct tx_chunked {
/* Message Reception State Machine Object */
static struct protocol_layer_rx {
/* received message type */
- enum tcpm_transmit_type sop;
+ enum tcpm_sop_type sop;
/* message ids for all valid port partners */
int msg_id[NUM_SOP_STAR_TYPES];
} prl_rx[CONFIG_USB_PD_PORT_MAX_COUNT];
@@ -324,7 +324,7 @@ static struct protocol_layer_tx {
/* state machine flags */
uint32_t flags;
/* last message type we transmitted */
- enum tcpm_transmit_type last_xmit_type;
+ enum tcpm_sop_type last_xmit_type;
/* message id counters for all 6 port partners */
uint32_t msg_id_counter[NUM_SOP_STAR_TYPES];
/* transmit status */
@@ -344,7 +344,7 @@ static struct pd_message {
/* message status flags */
uint32_t flags;
/* SOP* */
- enum tcpm_transmit_type xmit_type;
+ enum tcpm_sop_type xmit_type;
/* type of message */
uint8_t msg_type;
/* PD revision */
@@ -627,7 +627,7 @@ void prl_hard_reset_complete(int port)
}
void prl_send_ctrl_msg(int port,
- enum tcpm_transmit_type type,
+ enum tcpm_sop_type type,
enum pd_ctrl_msg_type msg)
{
pdmsg[port].xmit_type = type;
@@ -647,7 +647,7 @@ void prl_send_ctrl_msg(int port,
}
void prl_send_data_msg(int port,
- enum tcpm_transmit_type type,
+ enum tcpm_sop_type type,
enum pd_data_msg_type msg)
{
pdmsg[port].xmit_type = type;
@@ -667,7 +667,7 @@ void prl_send_data_msg(int port,
#ifdef CONFIG_USB_PD_EXTENDED_MESSAGES
void prl_send_ext_data_msg(int port,
- enum tcpm_transmit_type type,
+ enum tcpm_sop_type type,
enum pd_ext_msg_type msg)
{
pdmsg[port].xmit_type = type;
@@ -772,7 +772,7 @@ void prl_run(int port, int evt, int en)
}
}
-void prl_set_rev(int port, enum tcpm_transmit_type type,
+void prl_set_rev(int port, enum tcpm_sop_type type,
enum pd_rev_type rev)
{
/* We only store revisions for SOP* types. */
@@ -781,7 +781,7 @@ void prl_set_rev(int port, enum tcpm_transmit_type type,
pdmsg[port].rev[type] = rev;
}
-enum pd_rev_type prl_get_rev(int port, enum tcpm_transmit_type type)
+enum pd_rev_type prl_get_rev(int port, enum tcpm_sop_type type)
{
/* We only store revisions for SOP* types. */
ASSERT(type < NUM_SOP_STAR_TYPES);