diff mbox series

[1/3] power_supply: Add additional health properties to the header

Message ID 20190930143137.21624-1-dmurphy@ti.com (mailing list archive)
State Not Applicable, archived
Headers show
Series [1/3] power_supply: Add additional health properties to the header | expand

Commit Message

Dan Murphy Sept. 30, 2019, 2:31 p.m. UTC
Add HEALTH_WARM, HEALTH_COOL and HEALTH_HOT to the health enum.

Signed-off-by: Dan Murphy <dmurphy@ti.com>
---
 include/linux/power_supply.h | 3 +++
 1 file changed, 3 insertions(+)

Comments

Sebastian Reichel Oct. 20, 2019, 12:25 p.m. UTC | #1
Hi,

On Mon, Sep 30, 2019 at 09:31:35AM -0500, Dan Murphy wrote:
> Add HEALTH_WARM, HEALTH_COOL and HEALTH_HOT to the health enum.

You used OVERHEAT instead of HOT in the implementation,
which makes sense to me, so please drop HOT here. Also
this needs to be documented in the ABI documentation:

Documentation/ABI/testing/sysfs-class-power

-- Sebastian

> Signed-off-by: Dan Murphy <dmurphy@ti.com>
> ---
>  include/linux/power_supply.h | 3 +++
>  1 file changed, 3 insertions(+)
> 
> diff --git a/include/linux/power_supply.h b/include/linux/power_supply.h
> index 28413f737e7d..bd0d3225f245 100644
> --- a/include/linux/power_supply.h
> +++ b/include/linux/power_supply.h
> @@ -61,6 +61,9 @@ enum {
>  	POWER_SUPPLY_HEALTH_WATCHDOG_TIMER_EXPIRE,
>  	POWER_SUPPLY_HEALTH_SAFETY_TIMER_EXPIRE,
>  	POWER_SUPPLY_HEALTH_OVERCURRENT,
> +	POWER_SUPPLY_HEALTH_WARM,
> +	POWER_SUPPLY_HEALTH_COOL,
> +	POWER_SUPPLY_HEALTH_HOT,
>  };
>  
>  enum {
> -- 
> 2.22.0.214.g8dca754b1e
>
Dan Murphy Oct. 21, 2019, 7:35 p.m. UTC | #2
Sebastian

On 10/20/19 7:25 AM, Sebastian Reichel wrote:
> Hi,
>
> On Mon, Sep 30, 2019 at 09:31:35AM -0500, Dan Murphy wrote:
>> Add HEALTH_WARM, HEALTH_COOL and HEALTH_HOT to the health enum.
> You used OVERHEAT instead of HOT in the implementation,
> which makes sense to me, so please drop HOT here. Also
> this needs to be documented in the ABI documentation:

Hmm.  To me OVERHEAT and HOT can mean two different things.  I will 
check the implementation but I would

prefer to use HOT.

If a battery or charger is HOT that may be expected to be within the 
heat limits of the device being monitored but that it is hot.

Overheating means the device is above the expected upper thermal limit.  
Or over the heat limit.

The user may want to take action within the hot range to cool the device 
or may expect the device to run hot without over heating.


> Documentation/ABI/testing/sysfs-class-power

ACK

Dan
diff mbox series

Patch

diff --git a/include/linux/power_supply.h b/include/linux/power_supply.h
index 28413f737e7d..bd0d3225f245 100644
--- a/include/linux/power_supply.h
+++ b/include/linux/power_supply.h
@@ -61,6 +61,9 @@  enum {
 	POWER_SUPPLY_HEALTH_WATCHDOG_TIMER_EXPIRE,
 	POWER_SUPPLY_HEALTH_SAFETY_TIMER_EXPIRE,
 	POWER_SUPPLY_HEALTH_OVERCURRENT,
+	POWER_SUPPLY_HEALTH_WARM,
+	POWER_SUPPLY_HEALTH_COOL,
+	POWER_SUPPLY_HEALTH_HOT,
 };
 
 enum {