From 5635d7649c44e2da54974362ea01db342c58d05b Mon Sep 17 00:00:00 2001 From: Ken Tsou Date: Sun, 23 Feb 2020 22:56:44 +0800 Subject: [PATCH] ANDROID: GKI: power_supply: add more soc properties cutoff_soc, sys_soc, batt_soc for battery history collection Bug: 151994696 Change-Id: Ie564f89799d866e809c62ffe7a4875332d3ce032 Signed-off-by: Ken Tsou (cherry picked from commit 304f7a3744b14910ffaa0dfe1c61b938d04a7921) (cherry picked from commit 7f340dc74b737f300625e0278c97d343fcaa9084) (cherry picked from commit 9741511073c137120ac6cc66aa7c31f645b1d61d) Signed-off-by: Mark Salyzyn Bug: 150789066 --- drivers/power/supply/power_supply_sysfs.c | 3 +++ include/linux/power_supply.h | 3 +++ 2 files changed, 6 insertions(+) diff --git a/drivers/power/supply/power_supply_sysfs.c b/drivers/power/supply/power_supply_sysfs.c index 77b1a8dc9e11..6caa3fe23cb6 100644 --- a/drivers/power/supply/power_supply_sysfs.c +++ b/drivers/power/supply/power_supply_sysfs.c @@ -478,6 +478,9 @@ static struct device_attribute power_supply_attrs[] = { POWER_SUPPLY_ATTR(operating_freq), POWER_SUPPLY_ATTR(aicl_delay), POWER_SUPPLY_ATTR(aicl_icl), + POWER_SUPPLY_ATTR(cutoff_soc), + POWER_SUPPLY_ATTR(sys_soc), + POWER_SUPPLY_ATTR(batt_soc), /* Capacity Estimation */ POWER_SUPPLY_ATTR(batt_ce_ctrl), POWER_SUPPLY_ATTR(batt_ce_full), diff --git a/include/linux/power_supply.h b/include/linux/power_supply.h index 15577c764a5a..697d8566e29b 100644 --- a/include/linux/power_supply.h +++ b/include/linux/power_supply.h @@ -359,6 +359,9 @@ enum power_supply_property { POWER_SUPPLY_PROP_OPERATING_FREQ, POWER_SUPPLY_PROP_AICL_DELAY, POWER_SUPPLY_PROP_AICL_ICL, + POWER_SUPPLY_PROP_CUTOFF_SOC, + POWER_SUPPLY_PROP_SYS_SOC, + POWER_SUPPLY_PROP_BATT_SOC, /* Capacity Estimation */ POWER_SUPPLY_PROP_BATT_CE_CTRL, POWER_SUPPLY_PROP_CHARGE_FULL_ESTIMATE,