From 3a4f718f224d3def71d269f99c9092f4ea23d715 Mon Sep 17 00:00:00 2001 From: Alec Berg Date: Fri, 31 Oct 2014 10:10:55 -0700 Subject: samus_pd: add dual-role port flag to power info host command 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 Reviewed-on: https://chromium-review.googlesource.com/226820 Reviewed-by: Sameer Nanda --- util/ectool.c | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'util') 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: -- cgit v1.2.1