From 2f436f4cc9bd026ed83511401ab17d68f5f8e5a3 Mon Sep 17 00:00:00 2001 From: Harry Pan Date: Thu, 1 Jun 2017 23:01:11 +0800 Subject: [PATCH] isl9238: Enable system power monitor function The system power monitor function, aka. PSYS, of the ISL9238 chip is disabled by default, this patch enables PSYS monitor in the EC driver. BUG=b:62041842 BRANCH=none TEST=Able to read non-zero value at the MSR of MSR_PLATFORM_ENERGY_STATUS (0x64D) by iotools; Also, kernel powercap driver probes PSYS domain correctly; Such that the kernel exports the sysfs node of intel-rapl:1 Change-Id: I7a533032815e873ae74dca42ec07041be0d0f975 Signed-off-by: Harry Pan Reviewed-on: https://chromium-review.googlesource.com/520549 Tested-by: Kane Chen Reviewed-by: Nicolas Boichat --- board/fizz/board.h | 1 + board/poppy/board.h | 1 + 2 files changed, 2 insertions(+) diff --git a/board/fizz/board.h b/board/fizz/board.h index ffa5bb2e58..25f213637a 100644 --- a/board/fizz/board.h +++ b/board/fizz/board.h @@ -61,6 +61,7 @@ #define CONFIG_CHARGER_ISL9238 #define CONFIG_CHARGER_INPUT_CURRENT 512 +#define CONFIG_CHARGER_PSYS #define CONFIG_CHARGER_SENSE_RESISTOR 10 #define CONFIG_CHARGER_SENSE_RESISTOR_AC 20 #define CONFIG_CMD_CHARGER_ADC_AMON_BMON diff --git a/board/poppy/board.h b/board/poppy/board.h index bbaa65a233..587b35f9c1 100644 --- a/board/poppy/board.h +++ b/board/poppy/board.h @@ -86,6 +86,7 @@ #define CONFIG_CHARGER_MIN_BAT_PCT_FOR_POWER_ON 1 #define CONFIG_CHARGER_NARROW_VDC #define CONFIG_CHARGER_PROFILE_OVERRIDE +#define CONFIG_CHARGER_PSYS #define CONFIG_CHARGER_SENSE_RESISTOR 10 #define CONFIG_CHARGER_SENSE_RESISTOR_AC 20 #define CONFIG_CMD_CHARGER_ADC_AMON_BMON