summaryrefslogtreecommitdiff
path: root/util
diff options
context:
space:
mode:
authorAlec Berg <alecaberg@chromium.org>2014-10-31 10:10:55 -0700
committerchrome-internal-fetch <chrome-internal-fetch@google.com>2014-10-31 22:32:54 +0000
commit3a4f718f224d3def71d269f99c9092f4ea23d715 (patch)
treec1f16ae09bcad9ac16f58a0b7951aaf6531ee131 /util
parent86c7e2e90a7fd86b5f5b9e422fdbe968d30670da (diff)
downloadchrome-ec-3a4f718f224d3def71d269f99c9092f4ea23d715.tar.gz
samus_pd: add dual-role port flag to power info host commandstabilize-6436.B
Add flag for whether or not device plugged into a given port is a dual-role PD device. For now, the dual-role flag is always 0, but need to add the flag to the host command now for compatibility in the future. BUG=chrome-os-partner:32650 BRANCH=samus TEST=load onto samus, run ectool --name=cros_pd usbpdpower and verify that for anything plugged in it says "dedicated charger" Change-Id: I2d3c8c149802492f27a87a47aaa68fbf505ee7a9 Signed-off-by: Alec Berg <alecaberg@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/226820 Reviewed-by: Sameer Nanda <snanda@chromium.org>
Diffstat (limited to 'util')
-rw-r--r--util/ectool.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/util/ectool.c b/util/ectool.c
index e9f0195077..062ffafedb 100644
--- a/util/ectool.c
+++ b/util/ectool.c
@@ -2921,6 +2921,11 @@ int cmd_usb_pd_power(int argc, char *argv[])
printf("Unknown\n");
}
+ if (r->role != USB_PD_PORT_POWER_DISCONNECTED) {
+ printf(" %s\n", r->dualrole ?
+ "Dual-role device" : "Dedicated charger");
+ }
+
printf(" Charger type: ");
switch (r->type) {
case USB_CHG_TYPE_PD: