diff options
author | Daisuke Nojiri <dnojiri@chromium.org> | 2023-04-19 10:57:57 -0700 |
---|---|---|
committer | Chromeos LUCI <chromeos-scoped@luci-project-accounts.iam.gserviceaccount.com> | 2023-04-20 17:43:52 +0000 |
commit | 5320de037e67eb119f11c1cbb7a62faa089909c6 (patch) | |
tree | 941557457dfd5fbf1fc7b399ceab318970edb909 /common/charger.c | |
parent | 41cfe457af4c63c7b982be1d5255a4ae38306a0d (diff) | |
download | chrome-ec-5320de037e67eb119f11c1cbb7a62faa089909c6.tar.gz |
charger: Disambiguate charger command output
The values of the charger console command output are not clearly
explained. This CL reformats the output as follows:
Name: ISL9241
Option: (0x2830004)
Man id: 0x0049
Dev id: 0x000e
I_dptf: disabled
Limits ( min max step)
chg_voltage: 8760 mV ( 64 - 18304, 8)
chg_current: 4336 mA ( 8 - 12280, 8)
input_current: 4512 mA ( 8 - 12280, 8)
BUG=b:278898714
BRANCH=None
TEST=See above (on Vell).
Signed-off-by: Daisuke Nojiri <dnojiri@chromium.org>
Change-Id: Ide4b448d15b5066c43cec9e8aadf1ffdb1afe7f4
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/4447187
Reviewed-by: Eric Yilun Lin <yllin@google.com>
Diffstat (limited to 'common/charger.c')
-rw-r--r-- | common/charger.c | 32 |
1 files changed, 18 insertions, 14 deletions
diff --git a/common/charger.c b/common/charger.c index 3c0dbb6226..a9cee0decf 100644 --- a/common/charger.c +++ b/common/charger.c @@ -163,30 +163,34 @@ void print_charger_debug(int chgnum) if (check_print_error(charger_device_id(&d))) ccprintf("0x%04x\n", d); + /* dptf current limit */ + print_item_name("I_dptf:"); + if (dptf_limit_ma >= 0) + ccprintf("%5d\n", dptf_limit_ma); + else + ccputs("disabled\n"); + + /* Limits */ + ccprintf("Limits\t\t\t ( min max step)\n"); + /* charge voltage limit */ - print_item_name("V_batt:"); + print_item_name("chg_voltage:"); if (check_print_error(charger_get_voltage(chgnum, &d))) - ccprintf("%5d (%4d - %5d, %3d)\n", d, info->voltage_min, + ccprintf("\t%5d mV (%4d - %5d, %3d)\n", d, info->voltage_min, info->voltage_max, info->voltage_step); /* charge current limit */ - print_item_name("I_batt:"); + print_item_name("chg_current:"); if (check_print_error(charger_get_current(chgnum, &d))) - ccprintf("%5d (%4d - %5d, %3d)\n", d, info->current_min, + ccprintf("\t%5d mA (%4d - %5d, %3d)\n", d, info->current_min, info->current_max, info->current_step); /* input current limit */ - print_item_name("I_in:"); + print_item_name("input_current:"); if (check_print_error(charger_get_input_current_limit(chgnum, &d))) - ccprintf("%5d (%4d - %5d, %3d)\n", d, info->input_current_min, - info->input_current_max, info->input_current_step); - - /* dptf current limit */ - print_item_name("I_dptf:"); - if (dptf_limit_ma >= 0) - ccprintf("%5d\n", dptf_limit_ma); - else - ccputs("disabled\n"); + ccprintf("\t%5d mA (%4d - %5d, %3d)\n", d, + info->input_current_min, info->input_current_max, + info->input_current_step); } void print_charger_prochot(int chgnum) |