diff options
author | Philip Chen <philipchen@google.com> | 2018-03-22 16:39:39 -0700 |
---|---|---|
committer | chrome-bot <chrome-bot@chromium.org> | 2018-03-23 17:29:48 -0700 |
commit | f59290878e5fcd99add71aec74baea7d1e3f0297 (patch) | |
tree | 95aa89e943a3ad7e8bd0c09ab1e5f97170849f73 /driver/battery | |
parent | 8ea61bf52a492b7361ce80e1df1e0f61b41498fe (diff) | |
download | chrome-ec-f59290878e5fcd99add71aec74baea7d1e3f0297.tar.gz |
battery/max17055: Report the raw measured current
BUG=b:74321682
BRANCH=scarlet
TEST=battery command shows current change instantaneously when
AC charger is plugged/unplugged
Change-Id: Ic47efbdfc861355325ee2c69be09fbcfa1394654
Signed-off-by: Philip Chen <philipchen@google.com>
Reviewed-on: https://chromium-review.googlesource.com/977022
Commit-Ready: Philip Chen <philipchen@chromium.org>
Tested-by: Philip Chen <philipchen@chromium.org>
Reviewed-by: Aseda Aboagye <aaboagye@chromium.org>
Diffstat (limited to 'driver/battery')
-rw-r--r-- | driver/battery/max17055.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/driver/battery/max17055.c b/driver/battery/max17055.c index e02a4aaa42..05a6d7a5ae 100644 --- a/driver/battery/max17055.c +++ b/driver/battery/max17055.c @@ -252,7 +252,7 @@ void battery_get_params(struct batt_params *batt) batt->voltage = VOLTAGE_CONV(reg); - if (max17055_read(REG_AVERAGE_CURRENT, ®)) + if (max17055_read(REG_CURRENT, ®)) batt->flags |= BATT_FLAG_BAD_CURRENT; batt->current = CURRENT_CONV((int16_t)reg); |