From 70ada0603c88d0fc2e074768f99abc6e3fcf0fe1 Mon Sep 17 00:00:00 2001 From: Vic Yang Date: Sun, 19 May 2013 15:28:35 +0800 Subject: [PATCH] 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 Reviewed-on: https://gerrit.chromium.org/gerrit/55641 Reviewed-by: Vincent Palatin --- util/ectool.c | 2 ++ 1 file changed, 2 insertions(+) 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;