diff options
author | Diana Z <dzigterman@chromium.org> | 2020-03-28 22:15:44 -0600 |
---|---|---|
committer | Commit Bot <commit-bot@chromium.org> | 2020-04-07 01:22:01 +0000 |
commit | 2e268611ee4a42d202492df59584c5b08567ad22 (patch) | |
tree | e88bb8264e622cfae026ac3daf1b292fa0d06866 /common/usb_pd_console_cmd.c | |
parent | 8f13313b8b0b8787e01f5604cc6b812155c2a6ac (diff) | |
download | chrome-ec-2e268611ee4a42d202492df59584c5b08567ad22.tar.gz |
PD: Rename pd_policy to pd_discovery
Rename struct pd_policy to struct pd_discovery to more
accurately reflect what the structure contains.
BRANCH=None
BUG=b:152417977
TEST=make -j buildall
Signed-off-by: Diana Z <dzigterman@chromium.org>
Change-Id: I51de48103053aa60b3cdb15cf9fbf15dd75d727a
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2130473
Reviewed-by: Abe Levkoy <alevkoy@chromium.org>
Diffstat (limited to 'common/usb_pd_console_cmd.c')
-rw-r--r-- | common/usb_pd_console_cmd.c | 29 |
1 files changed, 15 insertions, 14 deletions
diff --git a/common/usb_pd_console_cmd.c b/common/usb_pd_console_cmd.c index 86e430344f..4e66414584 100644 --- a/common/usb_pd_console_cmd.c +++ b/common/usb_pd_console_cmd.c @@ -16,43 +16,44 @@ static void dump_pe(int port) int i, j, idh_ptype; struct svdm_amode_data *modep; uint32_t mode_caps; - struct pd_policy *pe = pd_get_am_policy(port); + struct pd_discovery *disc = pd_get_am_discovery(port); const char * const idh_ptype_names[] = { "UNDEF", "Hub", "Periph", "PCable", "ACable", "AMA", "RSV6", "RSV7"}; - if (pe->identity[0] == 0) { + if (disc->identity[0] == 0) { ccprintf("No identity discovered yet.\n"); return; } - idh_ptype = PD_IDH_PTYPE(pe->identity[0]); + idh_ptype = PD_IDH_PTYPE(disc->identity[0]); ccprintf("IDENT:\n"); ccprintf("\t[ID Header] %08x :: %s, VID:%04x\n", - pe->identity[0], + disc->identity[0], idh_ptype_names[idh_ptype], pd_get_identity_vid(port)); - ccprintf("\t[Cert Stat] %08x\n", pe->identity[1]); - for (i = 2; i < ARRAY_SIZE(pe->identity); i++) { + ccprintf("\t[Cert Stat] %08x\n", disc->identity[1]); + for (i = 2; i < ARRAY_SIZE(disc->identity); i++) { ccprintf("\t"); - if (pe->identity[i]) - ccprintf("[%d] %08x ", i, pe->identity[i]); + if (disc->identity[i]) + ccprintf("[%d] %08x ", i, disc->identity[i]); } ccprintf("\n"); - if (pe->svid_cnt < 1) { + if (disc->svid_cnt < 1) { ccprintf("No SVIDS discovered yet.\n"); return; } - for (i = 0; i < pe->svid_cnt; i++) { - ccprintf("SVID[%d]: %04x MODES:", i, pe->svids[i].svid); - for (j = 0; j < pe->svids[j].mode_cnt; j++) - ccprintf(" [%d] %08x", j + 1, pe->svids[i].mode_vdo[j]); + for (i = 0; i < disc->svid_cnt; i++) { + ccprintf("SVID[%d]: %04x MODES:", i, disc->svids[i].svid); + for (j = 0; j < disc->svids[j].mode_cnt; j++) + ccprintf(" [%d] %08x", j + 1, + disc->svids[i].mode_vdo[j]); ccprintf("\n"); - modep = pd_get_amode_data(port, pe->svids[i].svid); + modep = pd_get_amode_data(port, disc->svids[i].svid); if (modep) { mode_caps = modep->data->mode_vdo[modep->opos - 1]; ccprintf("MODE[%d]: svid:%04x caps:%08x\n", modep->opos, |