From e58a053453641e4b1b6c84ad3f91bed2a8ebd259 Mon Sep 17 00:00:00 2001 From: Subbaraman Narayanamurthy Date: Tue, 18 Dec 2018 20:16:06 -0800 Subject: [PATCH] ANDROID: GKI: power_supply: add batt_age_level property Add batt_age_level property to support loading multiple profiles based on the battery age level specified by the user. Signed-off-by: Subbaraman Narayanamurthy (cherry picked from commit 0fe2e0aadcff78083a7f85f74c6e931a7c74dcc1) Signed-off-by: Mark Salyzyn Bug: 150789066 Change-Id: I41e61c615f2d1df988a0de83e4e2dbddd7a36441 --- drivers/power/supply/power_supply_sysfs.c | 1 + include/linux/power_supply.h | 1 + 2 files changed, 2 insertions(+) diff --git a/drivers/power/supply/power_supply_sysfs.c b/drivers/power/supply/power_supply_sysfs.c index 091ac2fcfdc1..4af318a5f8ed 100644 --- a/drivers/power/supply/power_supply_sysfs.c +++ b/drivers/power/supply/power_supply_sysfs.c @@ -450,6 +450,7 @@ static struct device_attribute power_supply_attrs[] = { POWER_SUPPLY_ATTR(fg_reset), POWER_SUPPLY_ATTR(qc_opti_disable), POWER_SUPPLY_ATTR(cc_soc), + POWER_SUPPLY_ATTR(batt_age_level), /* Charge pump properties */ POWER_SUPPLY_ATTR(cp_status1), POWER_SUPPLY_ATTR(cp_status2), diff --git a/include/linux/power_supply.h b/include/linux/power_supply.h index be6a807af43f..0a276d4b5b0e 100644 --- a/include/linux/power_supply.h +++ b/include/linux/power_supply.h @@ -322,6 +322,7 @@ enum power_supply_property { POWER_SUPPLY_PROP_FG_RESET, POWER_SUPPLY_PROP_QC_OPTI_DISABLE, POWER_SUPPLY_PROP_CC_SOC, + POWER_SUPPLY_PROP_BATT_AGE_LEVEL, /* Charge pump properties */ POWER_SUPPLY_PROP_CP_STATUS1, POWER_SUPPLY_PROP_CP_STATUS2,