summaryrefslogtreecommitdiff
path: root/util
diff options
context:
space:
mode:
authorShawn Nematbakhsh <shawnn@chromium.org>2015-01-02 12:41:34 -0800
committerChromeOS Commit Bot <chromeos-commit-bot@chromium.org>2015-01-07 17:48:09 +0000
commit35ea0a968caacc73e6ece2bd68db465cc21f07c2 (patch)
treeeeb27d9e81b9df879b3c15f4a0b3a78ad9d63131 /util
parentc0933f00b15d63a0a50e4faeed43fb3a60d48390 (diff)
downloadchrome-ec-35ea0a968caacc73e6ece2bd68db465cc21f07c2.tar.gz
charge_manager: Bug fixes for power_info host commands
- Correctly identify certain source ports (ex. c-plug to empty a-receptacle) - Correct ectool power unit print (mV * mA != mW). BUG=chrome-os-partner:33248 TEST=Manual on Samus. Connect c-plug to empty a-receptacle, run "ectool --name usbpdpower", verify that port power role is identified as source. Also, verify that 5000 mV @ 500mA port correctly prints 2500mW total power. BRANCH=Samus Signed-off-by: Shawn Nematbakhsh <shawnn@chromium.org> Change-Id: Icf0850afc570a1056578df9f1a647079a00229b3 Reviewed-on: https://chromium-review.googlesource.com/238235 Reviewed-by: Alec Berg <alecaberg@chromium.org> Commit-Queue: Alec Berg <alecaberg@chromium.org>
Diffstat (limited to 'util')
-rw-r--r--util/ectool.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/util/ectool.c b/util/ectool.c
index 7486580c0c..4e03a90f62 100644
--- a/util/ectool.c
+++ b/util/ectool.c
@@ -2999,7 +2999,7 @@ int cmd_usb_pd_power(int argc, char *argv[])
printf(" Max input current: %dmA\n",
r->current_max);
printf(" Max input power: %dmW\n",
- r->max_power);
+ r->max_power / 1000);
printf("\n");
}