diff options
author | Alec Berg <alecaberg@chromium.org> | 2015-01-06 17:36:16 -0800 |
---|---|---|
committer | ChromeOS Commit Bot <chromeos-commit-bot@chromium.org> | 2015-01-07 05:12:58 +0000 |
commit | b10629ea35ccfc39b9d591e5ccc47ef1e269e132 (patch) | |
tree | c37b32b69adde47356741c03e0c84ce6b80a29d7 /common | |
parent | e95f24ce520db5d7f5b31cdc2dbf310a07ecfdfd (diff) | |
download | chrome-ec-b10629ea35ccfc39b9d591e5ccc47ef1e269e132.tar.gz |
pd: add flags to pd state console command
Add PD flags to pd <port> state console command
BUG=none
BRANCH=samus
TEST=load on samus and call pd <port> state.
Change-Id: I490c7c5ae942a0f4e3f64c24e22ef3470edec641
Signed-off-by: Alec Berg <alecaberg@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/238962
Reviewed-by: Vincent Palatin <vpalatin@chromium.org>
Diffstat (limited to 'common')
-rw-r--r-- | common/usb_pd_protocol.c | 9 |
1 files changed, 2 insertions, 7 deletions
diff --git a/common/usb_pd_protocol.c b/common/usb_pd_protocol.c index bc9ecf98e6..6915ff2f5c 100644 --- a/common/usb_pd_protocol.c +++ b/common/usb_pd_protocol.c @@ -2871,17 +2871,12 @@ static int command_pd(int argc, char **argv) }; BUILD_ASSERT(ARRAY_SIZE(state_names) == PD_STATE_COUNT); ccprintf("Port C%d, %s - Role: %s-%s Polarity: CC%d " - "Contract: %s, Partner: %s%s, State: %s\n", + "Flags: 0x%04x, State: %s\n", port, pd_comm_enabled ? "Ena" : "Dis", pd[port].power_role == PD_ROLE_SOURCE ? "SRC" : "SNK", pd[port].data_role == PD_ROLE_DFP ? "DFP" : "UFP", pd[port].polarity + 1, - pd[port].flags & PD_FLAGS_EXPLICIT_CONTRACT ? - "Yes" : "No", - (pd[port].flags & PD_FLAGS_PARTNER_DR_POWER) ? - "PR_SWAP," : "", - (pd[port].flags & PD_FLAGS_PARTNER_DR_DATA) ? - "DR_SWAP" : "", + pd[port].flags, state_names[pd[port].task_state]); } else { return EC_ERROR_PARAM1; |