public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: James Seo <james@equiv.tech>
To: Jean Delvare <jdelvare@suse.com>,
	Guenter Roeck <linux@roeck-us.net>,
	Jonathan Corbet <corbet@lwn.net>
Cc: James Seo <james@equiv.tech>,
	linux-hwmon@vger.kernel.org, linux-doc@vger.kernel.org,
	linux-kernel@vger.kernel.org
Subject: [RFC 11/11] ABI: sysfs-class-hwmon: Add missing hwmon standard attributes
Date: Thu,  4 May 2023 00:57:52 -0700	[thread overview]
Message-ID: <20230504075752.1320967-12-james@equiv.tech> (raw)
In-Reply-To: <20230504075752.1320967-1-james@equiv.tech>

Add definitions for the following non-deprecated standard
attributes implemented in the API and mentioned in the sysfs
interface spec but not found in the ABI documentation.

Alarm attributes:
* inY_alarm, inY_min_alarm, inY_max_alarm,
  inY_lcrit_alarm, inY_crit_alarm
* currY_alarm, currY_min_alarm, currY_max_alarm,
  currY_lcrit_alarm, currY_crit_alarm
* powerY_alarm, powerY_cap_alarm,
  powerY_max_alarm, powerY_crit_alarm
* fanY_alarm, fanY_min_alarm, fanY_max_alarm
* tempY_alarm, tempY_min_alarm, tempY_max_alarm,
  tempY_lcrit_alarm, tempY_emergency_alarm
  (tempY_crit_alarm already existed)

Beep attributes:
beep_enable, inY_beep, currY_beep, fanY_beep, tempY_beep

Sample average attributes:
samples, in_samples, power_samples, temp_samples, curr_samples

Fault attributes:
tempY_fault (fanY_fault already existed)

Signed-off-by: James Seo <james@equiv.tech>
---
 Documentation/ABI/testing/sysfs-class-hwmon | 358 +++++++++++++++++++-
 1 file changed, 344 insertions(+), 14 deletions(-)

diff --git a/Documentation/ABI/testing/sysfs-class-hwmon b/Documentation/ABI/testing/sysfs-class-hwmon
index 7fc914bc70e2..2f6884874812 100644
--- a/Documentation/ABI/testing/sysfs-class-hwmon
+++ b/Documentation/ABI/testing/sysfs-class-hwmon
@@ -33,6 +33,23 @@ Description:
 
 		RW
 
+What:		/sys/class/hwmon/hwmonX/beep_enable
+Description:
+		Enable or disable beeps.
+
+		- 0: No beeps
+		- 1: Beeps
+
+		RW
+
+What:		/sys/class/hwmon/hwmonX/samples
+Description:
+		Samples in calculated average.
+
+		Applies to all types of channels.
+
+		RW
+
 What:		/sys/class/hwmon/hwmonX/inY_min
 Description:
 		Voltage min value.
@@ -194,6 +211,76 @@ Description:
 
 		RO
 
+What:		/sys/class/hwmon/hwmonX/inY_alarm
+Description:
+		Voltage channel alarm indicator.
+
+		Clears itself when read.
+
+		- 0: No alarm
+		- 1: Alarm
+
+		RO
+
+What:		/sys/class/hwmon/hwmonX/inY_min_alarm
+Description:
+		Voltage min alarm indicator.
+
+		Clears itself when read.
+
+		- 0: No alarm
+		- 1: Alarm
+
+		RO
+
+What:		/sys/class/hwmon/hwmonX/inY_max_alarm
+Description:
+		Voltage max alarm indicator.
+
+		Clears itself when read.
+
+		- 0: No alarm
+		- 1: Alarm
+
+		RO
+
+What:		/sys/class/hwmon/hwmonX/inY_lcrit_alarm
+Description:
+		Voltage critical min alarm indicator.
+
+		Clears itself when read.
+
+		- 0: No alarm
+		- 1: Alarm
+
+		RO
+
+What:		/sys/class/hwmon/hwmonX/inY_crit_alarm
+Description:
+		Voltage critical max alarm indicator.
+
+		Clears itself when read.
+
+		- 0: No alarm
+		- 1: Alarm
+
+		RO
+
+What:		/sys/class/hwmon/hwmonX/inY_beep
+Description:
+		Voltage channel beep.
+
+		- 0: Disable
+		- 1: Enable
+
+		RW
+
+What:		/sys/class/hwmon/hwmonX/in_samples
+Description:
+		Voltage samples in calculated average.
+
+		RW
+
 What:		/sys/class/hwmon/hwmonX/fanY_min
 Description:
 		Fan minimum value.
@@ -283,6 +370,48 @@ Description:
 
 		RW
 
+What:		/sys/class/hwmon/hwmonX/fanY_alarm
+Description:
+		Fan channel alarm indicator.
+
+		Clears itself when read.
+
+		- 0: No alarm
+		- 1: Alarm
+
+		RO
+
+What:		/sys/class/hwmon/hwmonX/fanY_min_alarm
+Description:
+		Fan min alarm indicator.
+
+		Clears itself when read.
+
+		- 0: No alarm
+		- 1: Alarm
+
+		RO
+
+What:		/sys/class/hwmon/hwmonX/fanY_max_alarm
+Description:
+		Fan max alarm indicator.
+
+		Clears itself when read.
+
+		- 0: No alarm
+		- 1: Alarm
+
+		RO
+
+What:		/sys/class/hwmon/hwmonX/fanY_beep
+Description:
+		Fan channel beep.
+
+		- 0: Disable
+		- 1: Enable
+
+		RW
+
 What:		/sys/class/hwmon/hwmonX/fanY_fault
 Description:
 		Fan channel fault indicator.
@@ -468,20 +597,6 @@ Description:
 
 		RW
 
-What:		/sys/class/hwmon/hwmonX/tempY_crit_alarm
-Description:
-		Temperature critical max alarm indicator.
-
-		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.
-
-		- 0: No alarm
-		- 1: Alarm
-
-		RW
-
 What:		/sys/class/hwmon/hwmonX/tempY_crit_hyst
 Description:
 		Temperature hysteresis value for critical limit.
@@ -645,6 +760,101 @@ Description:
 
 		RO
 
+What:		/sys/class/hwmon/hwmonX/tempY_alarm
+Description:
+		Temperature channel alarm indicator.
+
+		Clears itself when read.
+
+		- 0: No alarm
+		- 1: Alarm
+
+		RO
+
+What:		/sys/class/hwmon/hwmonX/tempY_min_alarm
+Description:
+		Temperature min alarm indicator.
+
+		Clears itself when read.
+
+		- 0: No alarm
+		- 1: Alarm
+
+		RO
+
+What:		/sys/class/hwmon/hwmonX/tempY_max_alarm
+Description:
+		Temperature max alarm indicator.
+
+		Clears itself when read.
+
+		- 0: No alarm
+		- 1: Alarm
+
+		RO
+
+What:		/sys/class/hwmon/hwmonX/tempY_lcrit_alarm
+Description:
+		Temperature critical min alarm indicator.
+
+		Clears itself when read.
+
+		- 0: No alarm
+		- 1: Alarm
+
+		RO
+
+What:		/sys/class/hwmon/hwmonX/tempY_crit_alarm
+Description:
+		Temperature critical max alarm indicator.
+
+		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.
+
+		- 0: No alarm
+		- 1: Alarm
+
+		RW
+
+What:		/sys/class/hwmon/hwmonX/tempY_emergency_alarm
+Description:
+		Temperature emergency max alarm indicator.
+
+		Clears itself when read.
+
+		- 0: No alarm
+		- 1: Alarm
+
+		RO
+
+What:		/sys/class/hwmon/hwmonX/tempY_beep
+Description:
+		Temperature channel beep.
+
+		- 0: Disable
+		- 1: Enable
+
+		RW
+
+What:		/sys/class/hwmon/hwmonX/tempY_fault
+Description:
+		Temperature channel fault indicator.
+
+		Indicates whether a temperature sensor has reported failure.
+
+		- 0: OK
+		- 1: Failed
+
+		RO
+
+What:		/sys/class/hwmon/hwmonX/temp_samples
+Description:
+		Temperature samples in calculated average.
+
+		RW
+
 What:		/sys/class/hwmon/hwmonX/currY_max
 Description:
 		Current max value.
@@ -748,6 +958,76 @@ Description:
 
 		RO
 
+What:		/sys/class/hwmon/hwmonX/currY_alarm
+Description:
+		Current channel alarm indicator.
+
+		Clears itself when read.
+
+		- 0: No alarm
+		- 1: Alarm
+
+		RO
+
+What:		/sys/class/hwmon/hwmonX/currY_min_alarm
+Description:
+		Current min alarm indicator.
+
+		Clears itself when read.
+
+		- 0: No alarm
+		- 1: Alarm
+
+		RO
+
+What:		/sys/class/hwmon/hwmonX/currY_max_alarm
+Description:
+		Current max alarm indicator.
+
+		Clears itself when read.
+
+		- 0: No alarm
+		- 1: Alarm
+
+		RO
+
+What:		/sys/class/hwmon/hwmonX/currY_lcrit_alarm
+Description:
+		Current critical min alarm indicator.
+
+		Clears itself when read.
+
+		- 0: No alarm
+		- 1: Alarm
+
+		RO
+
+What:		/sys/class/hwmon/hwmonX/currY_crit_alarm
+Description:
+		Current critical max alarm indicator.
+
+		Clears itself when read.
+
+		- 0: No alarm
+		- 1: Alarm
+
+		RO
+
+What:		/sys/class/hwmon/hwmonX/currY_beep
+Description:
+		Current channel beep.
+
+		- 0: Disable
+		- 1: Enable
+
+		RW
+
+What:		/sys/class/hwmon/hwmonX/curr_samples
+Description:
+		Current samples in calculated average.
+
+		RW
+
 What:		/sys/class/hwmon/hwmonX/powerY_average
 Description:
 		Average power use.
@@ -950,6 +1230,56 @@ Description:
 
 		RO
 
+What:		/sys/class/hwmon/hwmonX/powerY_alarm
+Description:
+		Power channel alarm indicator.
+
+		Clears itself when read.
+
+		- 0: No alarm
+		- 1: Alarm
+
+		RO
+
+What:		/sys/class/hwmon/hwmonX/powerY_cap_alarm
+Description:
+		Power reduction alarm indicator.
+
+		Clears itself when read.
+
+		- 0: No alarm
+		- 1: Alarm
+
+		RO
+
+What:		/sys/class/hwmon/hwmonX/powerY_max_alarm
+Description:
+		Power max alarm indicator.
+
+		Clears itself when read.
+
+		- 0: No alarm
+		- 1: Alarm
+
+		RO
+
+What:		/sys/class/hwmon/hwmonX/powerY_crit_alarm
+Description:
+		Power critical reduction alarm indicator.
+
+		Clears itself when read.
+
+		- 0: No alarm
+		- 1: Alarm
+
+		RO
+
+What:		/sys/class/hwmon/hwmonX/power_samples
+Description:
+		Power samples in calculated average.
+
+		RW
+
 What:		/sys/class/hwmon/hwmonX/energyY_input
 Description:
 		Cumulative energy use.
-- 
2.34.1


      parent reply	other threads:[~2023-05-04  8:55 UTC|newest]

Thread overview: 35+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-05-04  7:57 [RFC 00/11] hwmon: Modernize documentation James Seo
2023-05-04  7:57 ` [RFC 01/11] Documentation/hwmon: Move misplaced entry in hwmon docs index James Seo
2023-05-05  4:58   ` Bagas Sanjaya
2023-05-06 13:43   ` Guenter Roeck
2023-05-04  7:57 ` [RFC 02/11] hwmon: (core) Rename last parameter of devm_hwmon_register_with_info() James Seo
2023-05-04 15:29   ` Guenter Roeck
2023-05-05 13:15     ` James Seo
2023-05-05 13:30       ` Guenter Roeck
2023-05-05 14:39         ` James Seo
2023-05-04  7:57 ` [RFC 03/11] hwmon: (core) Revise kerneldoc comments James Seo
2023-07-25 23:51   ` Russell Haley
2023-05-04  7:57 ` [RFC 04/11] Documentation/hwmon: Revise hwmon kernel API reference James Seo
2023-05-05  4:12   ` Bagas Sanjaya
2023-05-05  4:20   ` Bagas Sanjaya
2023-05-05 13:29     ` James Seo
2023-05-06 13:52   ` Guenter Roeck
2023-05-07 14:40     ` James Seo
2023-05-04  7:57 ` [RFC 05/11] Documentation/hwmon: Revise PMBus core documentation James Seo
2023-05-05  4:27   ` Bagas Sanjaya
2023-05-05  4:32     ` Guenter Roeck
2023-05-05 13:35     ` James Seo
2023-05-04  7:57 ` [RFC 06/11] Documentation/hwmon: Revise patch submission checklist James Seo
2023-05-05  4:34   ` Bagas Sanjaya
2023-05-05 14:50     ` James Seo
2023-05-04  7:57 ` [RFC 07/11] Documentation/hwmon: Revise sysfs interface specification James Seo
2023-05-05  4:51   ` Bagas Sanjaya
2023-05-05 15:01     ` James Seo
2023-05-05 15:10       ` Jonathan Corbet
2023-05-04  7:57 ` [RFC 08/11] Documentation/hwmon: Revise userspace tools documentation James Seo
2023-05-05  5:03   ` Bagas Sanjaya
2023-05-05 15:12     ` James Seo
2023-05-05 21:10       ` Guenter Roeck
2023-05-04  7:57 ` [RFC 09/11] ABI: sysfs-class-hwmon: Revise hwmon ABI documentation James Seo
2023-05-04  7:57 ` [RFC 10/11] hwmon: (core) Add missing beep-related standard attributes James Seo
2023-05-04  7:57 ` James Seo [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20230504075752.1320967-12-james@equiv.tech \
    --to=james@equiv.tech \
    --cc=corbet@lwn.net \
    --cc=jdelvare@suse.com \
    --cc=linux-doc@vger.kernel.org \
    --cc=linux-hwmon@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux@roeck-us.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox