diff mbox series

[v2,3/7] ABI: sysfs-class-hwmon: add a description for tempY_crit_alarm

Message ID a14f98e1b23ea14cf14da3c3169955343ec28bbe.1632994837.git.mchehab+huawei@kernel.org (mailing list archive)
State Changes Requested
Headers show
Series ABI: add additional sysfs docs and update some other ABI files | expand

Commit Message

Mauro Carvalho Chehab Sept. 30, 2021, 9:44 a.m. UTC
Such ABI symbol is currently not described. Document it.

Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
---

See [PATCH v2 0/7] at: https://lore.kernel.org/all/cover.1632994837.git.mchehab+huawei@kernel.org/

 Documentation/ABI/testing/sysfs-class-hwmon | 14 ++++++++++++++
 1 file changed, 14 insertions(+)

Comments

Guenter Roeck Oct. 8, 2021, 2:53 p.m. UTC | #1
On 9/30/21 2:44 AM, Mauro Carvalho Chehab wrote:
> Such ABI symbol is currently not described. Document it.
> 
> Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
> ---
> 
> See [PATCH v2 0/7] at: https://lore.kernel.org/all/cover.1632994837.git.mchehab+huawei@kernel.org/
> 
>   Documentation/ABI/testing/sysfs-class-hwmon | 14 ++++++++++++++
>   1 file changed, 14 insertions(+)
> 
> diff --git a/Documentation/ABI/testing/sysfs-class-hwmon b/Documentation/ABI/testing/sysfs-class-hwmon
> index ea5a129ae082..1f20687def44 100644
> --- a/Documentation/ABI/testing/sysfs-class-hwmon
> +++ b/Documentation/ABI/testing/sysfs-class-hwmon
> @@ -410,6 +410,20 @@ Description:
>   
>   		RW
>   
> +What:		/sys/class/hwmon/hwmonX/tempY_crit_alarm
> +Description:
> +		Critical high temperature alarm flag.
> +
> +		- 0: OK
> +		- 1: temperature has reached tempY_crit
> +
> +		RW
> +
> +		Contrary to regular alarm flags which clear themselves
> +		automatically when read, this one sticks until cleared by
> +		the user. This is done by writing 0 to the file. Writing
> +		other values is unsupported.
> +

That is not really correct. It _may_ be current implementation for some drivers,
but such an implementation would not be correct. The proper implementation would
be to auto-clear the flag after it was read unless the condition persists.

>   What:		/sys/class/hwmon/hwmonX/tempY_crit_hyst
>   Description:
>   		Temperature hysteresis value for critical limit.
> 

This should be documented as part of the previous patch, together with
all other alarm attributes.

Guenter
diff mbox series

Patch

diff --git a/Documentation/ABI/testing/sysfs-class-hwmon b/Documentation/ABI/testing/sysfs-class-hwmon
index ea5a129ae082..1f20687def44 100644
--- a/Documentation/ABI/testing/sysfs-class-hwmon
+++ b/Documentation/ABI/testing/sysfs-class-hwmon
@@ -410,6 +410,20 @@  Description:
 
 		RW
 
+What:		/sys/class/hwmon/hwmonX/tempY_crit_alarm
+Description:
+		Critical high temperature alarm flag.
+
+		- 0: OK
+		- 1: temperature has reached tempY_crit
+
+		RW
+
+		Contrary to regular alarm flags which clear themselves
+		automatically when read, this one sticks until cleared by
+		the user. This is done by writing 0 to the file. Writing
+		other values is unsupported.
+
 What:		/sys/class/hwmon/hwmonX/tempY_crit_hyst
 Description:
 		Temperature hysteresis value for critical limit.