From 554dd9d90660c0644b90a952eede3196397b4632 Mon Sep 17 00:00:00 2001 From: Sahil Chandna Date: Mon, 22 Jul 2019 15:12:02 +0530 Subject: [PATCH] ANDROID: GKI: power: power_supply: Add property to display skin thermal status Add power supply property POWER_SUPPLY_PROP_SKIN_HEALTH to indicate skin thermal status. Signed-off-by: Sahil Chandna (cherry picked from commit 4c6c4e79ded2fde0e11eb9c66da737de8018d575) Signed-off-by: Mark Salyzyn Bug: 150789066 Change-Id: Ib04d93cd0a74f39b23591c29c696c5a35c70291a --- drivers/power/supply/power_supply_sysfs.c | 2 ++ include/linux/power_supply.h | 1 + 2 files changed, 3 insertions(+) diff --git a/drivers/power/supply/power_supply_sysfs.c b/drivers/power/supply/power_supply_sysfs.c index 6028674487be..775de75a096e 100644 --- a/drivers/power/supply/power_supply_sysfs.c +++ b/drivers/power/supply/power_supply_sysfs.c @@ -207,6 +207,7 @@ static ssize_t power_supply_show_property(struct device *dev, power_supply_typec_src_rp_text[value.intval]); break; case POWER_SUPPLY_PROP_DIE_HEALTH: + case POWER_SUPPLY_PROP_SKIN_HEALTH: case POWER_SUPPLY_PROP_CONNECTOR_HEALTH: ret = sprintf(buf, "%s\n", power_supply_health_text[value.intval]); @@ -462,6 +463,7 @@ static struct device_attribute power_supply_attrs[] = { POWER_SUPPLY_ATTR(force_main_fcc), POWER_SUPPLY_ATTR(comp_clamp_level), POWER_SUPPLY_ATTR(adapter_cc_mode), + POWER_SUPPLY_ATTR(skin_health), /* 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 30c49b7dfdea..a85d86387352 100644 --- a/include/linux/power_supply.h +++ b/include/linux/power_supply.h @@ -334,6 +334,7 @@ enum power_supply_property { POWER_SUPPLY_PROP_FORCE_MAIN_FCC, POWER_SUPPLY_PROP_COMP_CLAMP_LEVEL, POWER_SUPPLY_PROP_ADAPTER_CC_MODE, + POWER_SUPPLY_PROP_SKIN_HEALTH, /* Charge pump properties */ POWER_SUPPLY_PROP_CP_STATUS1, POWER_SUPPLY_PROP_CP_STATUS2,