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>
This commit is contained in:
Vic Yang
2013-05-19 15:28:35 +08:00
committed by ChromeBot
parent 67c4f4e6f2
commit 70ada0603c

View File

@@ -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;