summaryrefslogtreecommitdiff
path: root/util
diff options
context:
space:
mode:
authorVijay Hiremath <vijay.p.hiremath@intel.com>2019-08-16 16:09:18 -0700
committerCommit Bot <commit-bot@chromium.org>2019-08-22 20:49:22 +0000
commit456d7da2c104fd5783a380e8bb6616de0d07e08c (patch)
treed040ba44fc56b2989f3fa3f713eae5bc566a816d /util
parente09f9e5fcd202ec13087135f897be34a987e3cbe (diff)
downloadchrome-ec-456d7da2c104fd5783a380e8bb6616de0d07e08c.tar.gz
ectool: Update usbpdmuxinfo to latest changes
BUG=b:139140865 BRANCH=none TEST=Manually tested on intelrvp, "ectool usbpdmuxinfo" command shows correct SS mux info Change-Id: Id9dc616f62cb88600c3bcb631c08423661cc32c8 Signed-off-by: Vijay Hiremath <vijay.p.hiremath@intel.com> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/1759279 Reviewed-by: Jett Rink <jettrink@chromium.org>
Diffstat (limited to 'util')
-rw-r--r--util/ectool.c18
1 files changed, 7 insertions, 11 deletions
diff --git a/util/ectool.c b/util/ectool.c
index 0107f5c020..86cc368eb9 100644
--- a/util/ectool.c
+++ b/util/ectool.c
@@ -5605,17 +5605,13 @@ int cmd_usb_pd_mux_info(int argc, char *argv[])
return rv;
printf("Port %d: ", i);
- if (r.flags & USB_PD_MUX_USB_ENABLED)
- printf("USB ");
- if (r.flags & USB_PD_MUX_DP_ENABLED)
- printf("DP ");
- if (!(r.flags & (USB_PD_MUX_DP_ENABLED |
- USB_PD_MUX_USB_ENABLED)))
- printf("OPEN ");
- if (r.flags & USB_PD_MUX_POLARITY_INVERTED)
- printf("INV ");
- if (r.flags & USB_PD_MUX_HPD_IRQ)
- printf("HPD_IRQ ");
+ printf("USB=%d ", !!(r.flags & USB_PD_MUX_USB_ENABLED));
+ printf("DP=%d ", !!(r.flags & USB_PD_MUX_DP_ENABLED));
+ printf("POLARITY=%s ", r.flags & USB_PD_MUX_POLARITY_INVERTED ?
+ "INVERTED" : "NORMAL");
+ printf("HPD_IRQ=%d ", !!(r.flags & USB_PD_MUX_HPD_IRQ));
+ printf("HPD_LVL=%d ", !!(r.flags & USB_PD_MUX_HPD_LVL));
+ printf("SAFE=%d ", !!(r.flags & USB_PD_MUX_SAFE_MODE));
printf("\n");
}