From 1dbd6b406d44ad8b89af06db33055c27fa0c3851 Mon Sep 17 00:00:00 2001 From: Ashay Jaiswal Date: Sun, 10 Feb 2019 21:13:27 +0530 Subject: [PATCH] ANDROID: GKI: power_supply: Add "THERM_ICL_LIMIT" property Add "THERM_ICL_LIMIT" property to allow userspace thermal throttling algorithm to control input current limit of charger. Signed-off-by: Ashay Jaiswal Signed-off-by: Guru Das Srinagesh (cherry picked from commit d859ce8eb9a40f7b371a657428245d833a756610) Signed-off-by: Mark Salyzyn Bug: 150789066 Change-Id: Ib527712b3dc5cde3555813c26f1a4b3a10b23cc1 --- 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 fe829cdd2022..e0f7a1ed3791 100644 --- a/drivers/power/supply/power_supply_sysfs.c +++ b/drivers/power/supply/power_supply_sysfs.c @@ -454,6 +454,7 @@ static struct device_attribute power_supply_attrs[] = { POWER_SUPPLY_ATTR(scale_mode_en), POWER_SUPPLY_ATTR(voltage_vph), POWER_SUPPLY_ATTR(chip_version), + POWER_SUPPLY_ATTR(therm_icl_limit), /* 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 11cb8e8be231..95b471b09c53 100644 --- a/include/linux/power_supply.h +++ b/include/linux/power_supply.h @@ -326,6 +326,7 @@ enum power_supply_property { POWER_SUPPLY_PROP_SCALE_MODE_EN, POWER_SUPPLY_PROP_VOLTAGE_VPH, POWER_SUPPLY_PROP_CHIP_VERSION, + POWER_SUPPLY_PROP_THERM_ICL_LIMIT, /* Charge pump properties */ POWER_SUPPLY_PROP_CP_STATUS1, POWER_SUPPLY_PROP_CP_STATUS2,