From 1caa2788c5198f3a89e022a559191b27b93adada Mon Sep 17 00:00:00 2001 From: Nicolas Boichat Date: Wed, 3 Jan 2018 08:55:06 +0800 Subject: 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 Change-Id: Ie1ce8e0ac103daacc5a08b8ccae604d1d83551b8 Reviewed-on: https://chromium-review.googlesource.com/848487 Commit-Ready: Nicolas Boichat Tested-by: Nicolas Boichat Reviewed-by: Randall Spangler --- board/reef_it8320/board.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'board/reef_it8320') diff --git a/board/reef_it8320/board.h b/board/reef_it8320/board.h index a7983e03b2..099cfe273d 100644 --- a/board/reef_it8320/board.h +++ b/board/reef_it8320/board.h @@ -24,7 +24,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 -- cgit v1.2.1