summaryrefslogtreecommitdiff
path: root/common/usbc/usb_tc_ctvpd_sm.c
diff options
context:
space:
mode:
authorJett Rink <jettrink@chromium.org>2019-09-25 07:50:15 -0600
committerCommit Bot <commit-bot@chromium.org>2019-09-26 05:58:44 +0000
commit068b917ef17383c1cf8987d070b27fea30a72d75 (patch)
tree1c036c36ef0f7d0b6c44b4eb437ccc11edd9d994 /common/usbc/usb_tc_ctvpd_sm.c
parent881d05951d94345c7c5bdea909cf5d393bd66a57 (diff)
downloadchrome-ec-068b917ef17383c1cf8987d070b27fea30a72d75.tar.gz
cleanup: remove copy of pd_cc_state enum
The EC command interface created a separate copy of the enum pd_cc_state. Remove the EC command version and move the pd_cc_state definition to the command interface. Also remove PD_CC_NO_UFP option as there is no difference between that value and PD_CC_NONE. Split PD_CC_DEBUG_ACC into separate UFP and DFP values for clarity. BRANCH=none BUG=none TEST=builds Change-Id: Ic8c4c5ac4dd340b1e605100e35acb147c226a455 Signed-off-by: Jett Rink <jettrink@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/1825503 Reviewed-by: Denis Brockus <dbrockus@chromium.org> Reviewed-by: Sam Hurst <shurst@google.com>
Diffstat (limited to 'common/usbc/usb_tc_ctvpd_sm.c')
-rw-r--r--common/usbc/usb_tc_ctvpd_sm.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/common/usbc/usb_tc_ctvpd_sm.c b/common/usbc/usb_tc_ctvpd_sm.c
index 46be033514..9aeb7742b0 100644
--- a/common/usbc/usb_tc_ctvpd_sm.c
+++ b/common/usbc/usb_tc_ctvpd_sm.c
@@ -1009,9 +1009,9 @@ static void tc_ct_attach_wait_unsupported_run(const int port)
vpd_ct_get_cc(&cc1, &cc2);
if (cc_is_at_least_one_rd(cc1, cc2))
- new_cc_state = PD_CC_DFP_ATTACHED;
+ new_cc_state = PD_CC_UFP_ATTACHED;
else if (cc_is_audio_acc(cc1, cc2))
- new_cc_state = PD_CC_AUDIO_ACC;
+ new_cc_state = PD_CC_UFP_AUDIO_ACC;
else /* (cc1 == TYPEC_CC_VOLT_OPEN or cc2 == TYPEC_CC_VOLT_OPEN */
new_cc_state = PD_CC_NONE;
@@ -1047,7 +1047,7 @@ static void tc_ct_attach_wait_unsupported_run(const int port)
*/
if (new_cc_state == PD_CC_NONE)
set_state_tc(port, TC_CT_UNATTACHED_VPD);
- else /* PD_CC_DFP_ATTACHED or PD_CC_AUDIO_ACC */
+ else /* PD_CC_UFP_ATTACHED or PD_CC_UFP_AUDIO_ACC */
set_state_tc(port, TC_CT_TRY_SNK);
}