diff options
author | Jett Rink <jettrink@chromium.org> | 2019-09-25 07:50:15 -0600 |
---|---|---|
committer | Commit Bot <commit-bot@chromium.org> | 2019-09-26 05:58:44 +0000 |
commit | 068b917ef17383c1cf8987d070b27fea30a72d75 (patch) | |
tree | 1c036c36ef0f7d0b6c44b4eb437ccc11edd9d994 /util | |
parent | 881d05951d94345c7c5bdea909cf5d393bd66a57 (diff) | |
download | chrome-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 'util')
-rw-r--r-- | util/ectool.c | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/util/ectool.c b/util/ectool.c index fc366918d4..6ca7cfcf8f 100644 --- a/util/ectool.c +++ b/util/ectool.c @@ -5464,17 +5464,17 @@ int cmd_usb_pd(int argc, char *argv[]) if (cmdver == 2) { printf("CC State:"); - if (r_v2->cc_state == USBC_PD_CC_NONE) + if (r_v2->cc_state == PD_CC_NONE) printf("None"); - else if (r_v2->cc_state == USBC_PD_CC_NO_UFP) - printf("No UFP"); - else if (r_v2->cc_state == USBC_PD_CC_AUDIO_ACC) - printf("Audio accessory"); - else if (r_v2->cc_state == USBC_PD_CC_DEBUG_ACC) - printf("Debug accessory"); - else if (r_v2->cc_state == USBC_PD_CC_UFP_ATTACHED) + else if (r_v2->cc_state == PD_CC_UFP_AUDIO_ACC) + printf("UFP Audio accessory"); + else if (r_v2->cc_state == PD_CC_UFP_DEBUG_ACC) + printf("UFP Debug accessory"); + else if (r_v2->cc_state == PD_CC_UFP_ATTACHED) printf("UFP attached"); - else if (r_v2->cc_state == USBC_PD_CC_DFP_ATTACHED) + else if (r_v2->cc_state == PD_CC_DFP_DEBUG_ACC) + printf("DFP Debug accessory"); + else if (r_v2->cc_state == PD_CC_DFP_ATTACHED) printf("DFP attached"); else printf("UNKNOWN"); |