diff options
author | Vic Yang <victoryang@chromium.org> | 2013-09-05 10:55:01 +0800 |
---|---|---|
committer | chrome-internal-fetch <chrome-internal-fetch@google.com> | 2013-09-10 18:24:07 +0000 |
commit | c2e8372b418610f2095ea79be214f3352fed2b44 (patch) | |
tree | 3e78a7955f9c5d1a276d3900c76f7297254a41ff | |
parent | 8d921815bf0d3424fec28dc13be0294fae3978d1 (diff) | |
download | chrome-ec-c2e8372b418610f2095ea79be214f3352fed2b44.tar.gz |
Show charging allowed info for 'battery' command
This will help us debug battery charging.
BUG=chrome-os-partner:22055
TEST=On Kirby, type 'battery' and check the output.
BRANCH=None
Change-Id: Id510ca7816f359e64072837df6464a412eb7739f
Signed-off-by: Vic Yang <victoryang@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/168181
-rw-r--r-- | common/battery.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/common/battery.c b/common/battery.c index 0aaeb3ef79..f61c2585ef 100644 --- a/common/battery.c +++ b/common/battery.c @@ -91,6 +91,10 @@ static int print_battery_info(void) battery_is_in_10mw_mode(&value); unit = value ? "0 mW" : " mAh"; + print_item_name("Charging:"); + if (check_print_error(battery_charging_allowed(&value))) + ccprintf("%sAllowed\n", value ? "" : "Not "); + print_item_name("Charge:"); if (check_print_error(battery_state_of_charge(&value))) ccprintf("%d %%\n", value); |