diff options
| author | Nicholas Troast <ntroast@codeaurora.org> | 2016-07-28 13:42:49 -0700 |
|---|---|---|
| committer | Nicholas Troast <ntroast@codeaurora.org> | 2016-08-01 10:29:26 -0700 |
| commit | 5bd071c6475e47ad835b3bc3980c3b5a3aabe9c4 (patch) | |
| tree | 7cb8b361f6e44e0fd738dc09eb691b85a4927f41 | |
| parent | 2566204c8d1d65bac5df79262a6a22c40a5b0b0f (diff) | |
power_supply: add CHARGER_TEMP and CHARGER_TEMP_MAX properties
CHARGER_TEMP reflects the temperature of the charging chip, and
CHARGER_TEMP_MAX reflects the temperature threshold at which the
hardware will take action to reduce the temperature of the charger.
Change-Id: I9cba8e370c753ac5aa33252fce0ea446f061b4c0
Signed-off-by: Nicholas Troast <ntroast@codeaurora.org>
| -rw-r--r-- | drivers/power/power_supply_sysfs.c | 2 | ||||
| -rw-r--r-- | include/linux/power_supply.h | 2 |
2 files changed, 4 insertions, 0 deletions
diff --git a/drivers/power/power_supply_sysfs.c b/drivers/power/power_supply_sysfs.c index 61f611296ad6..a45a5d103040 100644 --- a/drivers/power/power_supply_sysfs.c +++ b/drivers/power/power_supply_sysfs.c @@ -265,6 +265,8 @@ static struct device_attribute power_supply_attrs[] = { POWER_SUPPLY_ATTR(typec_power_role), POWER_SUPPLY_ATTR(pd_allowed), POWER_SUPPLY_ATTR(pd_active), + POWER_SUPPLY_ATTR(charger_temp), + POWER_SUPPLY_ATTR(charger_temp_max), /* Local extensions of type int64_t */ POWER_SUPPLY_ATTR(charge_counter_ext), /* Properties of type `const char *' */ diff --git a/include/linux/power_supply.h b/include/linux/power_supply.h index b081a56e250f..7d1e374e176c 100644 --- a/include/linux/power_supply.h +++ b/include/linux/power_supply.h @@ -214,6 +214,8 @@ enum power_supply_property { POWER_SUPPLY_PROP_TYPEC_POWER_ROLE, POWER_SUPPLY_PROP_PD_ALLOWED, POWER_SUPPLY_PROP_PD_ACTIVE, + POWER_SUPPLY_PROP_CHARGER_TEMP, + POWER_SUPPLY_PROP_CHARGER_TEMP_MAX, /* Local extensions of type int64_t */ POWER_SUPPLY_PROP_CHARGE_COUNTER_EXT, /* Properties of type `const char *' */ |
