diff options
author | Nicolas Boichat <drinkcat@chromium.org> | 2018-01-03 08:55:06 +0800 |
---|---|---|
committer | chrome-bot <chrome-bot@chromium.org> | 2018-01-10 06:02:13 -0800 |
commit | 1caa2788c5198f3a89e022a559191b27b93adada (patch) | |
tree | a3e2880eb8f394ca776c4813150bfb95b1068629 /board/reef/board.h | |
parent | b167a193e66e3c05ad61d997994072e36cb73773 (diff) | |
download | chrome-ec-1caa2788c5198f3a89e022a559191b27b93adada.tar.gz |
charger/isl923x: Implement charger_get_system_power from PSYS
On ISL923x, PSYS output is always enabled when the AP is on
(provided CONFIG_CHARGER_PSYS is enabled).
We add support for charger_get_system_power function, reading PSYS
value, when CONFIG_CHARGER_PSYS_READ is defined. This will be used
by the charging algorithm on lux.
We also rename CONFIG_CMD_CHARGER_PSYS to CONFIG_CHARGER_PSYS_READ
as CONFIG_CHARGER_PSYS_READ provides both "psys" console command
and the new function. We also cleanup unneeded undefs in board
files.
Note that this does not implement the function on bd9995x, but this
could be done without too much effort.
BRANCH=none
BUG=b:71520677
TEST=On lux, without AC connected, check that "psys" output roughly
matches the output current from the battery.
Signed-off-by: Nicolas Boichat <drinkcat@chromium.org>
Change-Id: Ie1ce8e0ac103daacc5a08b8ccae604d1d83551b8
Reviewed-on: https://chromium-review.googlesource.com/848487
Commit-Ready: Nicolas Boichat <drinkcat@chromium.org>
Tested-by: Nicolas Boichat <drinkcat@chromium.org>
Reviewed-by: Randall Spangler <rspangler@chromium.org>
Diffstat (limited to 'board/reef/board.h')
-rw-r--r-- | board/reef/board.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/board/reef/board.h b/board/reef/board.h index f67994c2b8..9d6b3f31d7 100644 --- a/board/reef/board.h +++ b/board/reef/board.h @@ -27,7 +27,7 @@ #define BD9995X_IOUT_GAIN_SELECT \ BD9995X_CMD_PMON_IOUT_CTRL_SET_IOUT_GAIN_SET_20V -#define CONFIG_CMD_CHARGER_PSYS +#define CONFIG_CHARGER_PSYS_READ #define BD9995X_PSYS_GAIN_SELECT \ BD9995X_CMD_PMON_IOUT_CTRL_SET_PMON_GAIN_SET_02UAW |