diff options
author | Vic Yang <victoryang@chromium.org> | 2013-05-19 15:28:35 +0800 |
---|---|---|
committer | Vic Yang <victoryang@chromium.org> | 2013-06-04 20:05:05 -0700 |
commit | e307ffb4d24235ef72064b4e2c08b4f9741e7934 (patch) | |
tree | 372ea4f25c7619491e4646fe718b53c377a0b321 | |
parent | 0a45fa17086d4556b7cb4ea0a9f53894197bc897 (diff) | |
download | chrome-ec-e307ffb4d24235ef72064b4e2c08b4f9741e7934.tar.gz |
Show power number in 'ectool powerinfo' outputtoolchainBstabilize-spring-4100.53.Brelease-R28-4100.B
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>
Previous-Reviewed-on: https://gerrit.chromium.org/gerrit/55641
(cherry picked from commit 70ada0603c88d0fc2e074768f99abc6e3fcf0fe1)
Reviewed-on: https://gerrit.chromium.org/gerrit/57559
-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 0315b6dbb1..31821f63a9 100644 --- a/util/ectool.c +++ b/util/ectool.c @@ -1515,6 +1515,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; |