diff options
author | Vic Yang <victoryang@chromium.org> | 2013-05-19 15:28:35 +0800 |
---|---|---|
committer | ChromeBot <chrome-bot@google.com> | 2013-05-20 10:11:03 -0700 |
commit | 70ada0603c88d0fc2e074768f99abc6e3fcf0fe1 (patch) | |
tree | 168a1682132c21f8151409f22dfb882238936752 /util | |
parent | 67c4f4e6f2090285a136a895d06782256322ea0a (diff) | |
download | chrome-ec-70ada0603c88d0fc2e074768f99abc6e3fcf0fe1.tar.gz |
Show power number in 'ectool powerinfo' output
This is just a simple V*I value so that we don't need to do the math all
the time.
BUG=None
TEST=None
BRANCH=None
Change-Id: I6317720d196d4bc2392adefb540be14bc34b5978
Signed-off-by: Vic Yang <victoryang@chromium.org>
Reviewed-on: https://gerrit.chromium.org/gerrit/55641
Reviewed-by: Vincent Palatin <vpalatin@chromium.org>
Diffstat (limited to 'util')
-rw-r--r-- | util/ectool.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/util/ectool.c b/util/ectool.c index 52b4df94d1..97d9a4a3a0 100644 --- a/util/ectool.c +++ b/util/ectool.c @@ -1517,6 +1517,8 @@ int cmd_power_info(int argc, char *argv[]) printf("AC Voltage: %d mV\n", r.voltage_ac); printf("System Voltage: %d mV\n", r.voltage_system); printf("System Current: %d mA\n", r.current_system); + printf("System Power: %d mW\n", + r.voltage_system * r.current_system / 1000); printf("USB Device Type: 0x%x\n", r.usb_dev_type); printf("USB Current Limit: %d mA\n", r.usb_current_limit); return 0; |