mirror of
https://github.com/Telecominfraproject/OpenCellular.git
synced 2025-12-29 01:50:53 +00:00
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>
This commit is contained in:
committed by
ChromeOS Commit Bot
parent
e95f24ce52
commit
b10629ea35
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user