diff options
author | Ikjoon Jang <ikjn@chromium.org> | 2021-03-11 14:46:51 +0800 |
---|---|---|
committer | Commit Bot <commit-bot@chromium.org> | 2021-03-15 11:09:37 +0000 |
commit | ffbc67dcac2d03bc5967627ebd9dba37e7013e5a (patch) | |
tree | 730b4ba290df687a74842d20565e9193f8b0064b /include/battery.h | |
parent | fd9ea2bfe6a9b0dbf40ad3aa36409063db15ce06 (diff) | |
download | chrome-ec-ffbc67dcac2d03bc5967627ebd9dba37e7013e5a.tar.gz |
virtual_battery: bug fix in reading SB_AVERAGE_CURRENT
Fix a bug from CL:2747559, virtual battery returns an error
for SB_AVERAGE_CURRENT. virtual battery handler should call
battery_get_avg_current(), not battery_get_avg_voltage().
BRANCH=none
BUG=b:170921599
TEST=read current_avg knob in kukui
Signed-off-by: Ikjoon Jang <ikjn@chromium.org>
Change-Id: I90c26a8e1d4fa6faccc0166b9f7b63fca9baef51
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2751320
Reviewed-by: Ting Shen <phoenixshen@chromium.org>
Diffstat (limited to 'include/battery.h')
-rw-r--r-- | include/battery.h | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/include/battery.h b/include/battery.h index aed1e1c5cf..9df702cadf 100644 --- a/include/battery.h +++ b/include/battery.h @@ -120,8 +120,9 @@ int battery_get_avg_voltage(void); /* in mV */ #define BATT_FLAG_BAD_FULL_CAPACITY 0x00000200 #define BATT_FLAG_BAD_STATUS 0x00000400 #define BATT_FLAG_IMBALANCED_CELL 0x00000800 +#define BATT_FLAG_BAD_AVERAGE_CURRENT 0x00001000 /* All of the above BATT_FLAG_BAD_* bits */ -#define BATT_FLAG_BAD_ANY 0x000007fc +#define BATT_FLAG_BAD_ANY 0x000017fc /* Battery constants */ struct battery_info { |