From: Shilpasri G Bhat <shilpa.bhat@linux.vnet.ibm.com>
To: linux@roeck-us.net, mpe@ellerman.id.au,
linuxppc-dev@lists.ozlabs.org, linux-hwmon@vger.kernel.org,
linux-kernel@vger.kernel.org, ego@linux.vnet.ibm.com
Cc: Shilpasri G Bhat <shilpa.bhat@linux.vnet.ibm.com>
Subject: [PATCH v3 3/3] hwmon: Document the sensor enable attribute and update ibmpowernv
Date: Thu, 5 Jul 2018 19:21:29 +0530 [thread overview]
Message-ID: <1530798689-27742-4-git-send-email-shilpa.bhat@linux.vnet.ibm.com> (raw)
In-Reply-To: <1530798689-27742-1-git-send-email-shilpa.bhat@linux.vnet.ibm.com>
Signed-off-by: Shilpasri G Bhat <shilpa.bhat@linux.vnet.ibm.com>
---
Documentation/hwmon/ibmpowernv | 35 +++++++++++++++-
Documentation/hwmon/sysfs-interface | 82 +++++++++++++++++++++++++++++++++++++
2 files changed, 115 insertions(+), 2 deletions(-)
diff --git a/Documentation/hwmon/ibmpowernv b/Documentation/hwmon/ibmpowernv
index 8826ba2..77ddba7 100644
--- a/Documentation/hwmon/ibmpowernv
+++ b/Documentation/hwmon/ibmpowernv
@@ -33,9 +33,40 @@ fanX_input Measured RPM value.
fanX_min Threshold RPM for alert generation.
fanX_fault 0: No fail condition
1: Failing fan
+
tempX_input Measured ambient temperature.
tempX_max Threshold ambient temperature for alert generation.
-inX_input Measured power supply voltage
+tempX_highest Historical maximum temperature
+tempX_lowest Historical minimum temperature
+temp1_enable Enable/disable all temperature sensors
+ 1: Enable
+ 0: Disable
+temp[2-N]_enable State of the sensor (enabled/disabled)
+
+inX_input Measured power supply voltage (millivolt)
inX_fault 0: No fail condition.
1: Failing power supply.
-power1_input System power consumption (microWatt)
+inX_highest Historical maximum voltage
+inX_lowest Historical minimum voltage
+in1_enable Enable/disable all voltage sensors
+ 1: Enable
+ 0: Disable
+in[2-N]_enable State of the sensor (enabled/disabled)
+
+powerX_input Power consumption (microWatt)
+powerX_input_highest Historical maximum power
+powerX_input_lowest Historical minimum power
+power1_enable Enable/disable all power sensors
+ 1: Enable
+ 0: Disable
+power[2-N]_enable State of the sensor (enabled/disabled)
+
+currX_input Measured current (milliampere)
+currX_highest Historical maximum current
+currX_lowest Historical minimum current
+curr1_enable Enable/disable all current sensors
+ 1: Enable
+ 0: Disable
+curr[2-N]_enable State of the sensor (enabled/disabled)
+
+energyX_input Cumulative energy (microJoule)
diff --git a/Documentation/hwmon/sysfs-interface b/Documentation/hwmon/sysfs-interface
index fc337c3..d81109c 100644
--- a/Documentation/hwmon/sysfs-interface
+++ b/Documentation/hwmon/sysfs-interface
@@ -171,6 +171,17 @@ in[0-*]_label Suggested voltage channel label.
user-space.
RO
+in[0-*]_enable
+ Enable or disable the sensor.
+ When disabled the sensor read will return -ENODATA. For chips
+ which do not have the capability to disable/enable single sensor
+ but have support for sensor-group disable/enable, will only have
+ the first attribute with write permission. In such cases write
+ to the first attribute will affect all the sensors of this type.
+ 1: Enable
+ 0: Disable
+ RW/RO
+
cpu[0-*]_vid CPU core reference voltage.
Unit: millivolt
RO
@@ -236,6 +247,17 @@ fan[1-*]_label Suggested fan channel label.
In all other cases, the label is provided by user-space.
RO
+fan[1-*]_enable
+ Enable or disable the sensor.
+ When disabled the sensor read will return -ENODATA. For chips
+ which do not have the capability to disable/enable single sensor
+ but have support for sensor-group disable/enable, will only have
+ the first attribute with write permission. In such cases write
+ to the first attribute will affect all the sensors of this type.
+ 1: Enable
+ 0: Disable
+ RW/RO
+
Also see the Alarms section for status flags associated with fans.
@@ -409,6 +431,17 @@ temp_reset_history
Reset temp_lowest and temp_highest for all sensors
WO
+temp[1-*]_enable
+ Enable or disable the sensor.
+ When disabled the sensor read will return -ENODATA. For chips
+ which do not have the capability to disable/enable single sensor
+ but have support for sensor-group disable/enable, will only have
+ the first attribute with write permission. In such cases write
+ to the first attribute will affect all the sensors of this type.
+ 1: Enable
+ 0: Disable
+ RW/RO
+
Some chips measure temperature using external thermistors and an ADC, and
report the temperature measurement as a voltage. Converting this voltage
back to a temperature (or the other way around for limits) requires
@@ -468,6 +501,17 @@ curr_reset_history
Reset currX_lowest and currX_highest for all sensors
WO
+curr[1-*]_enable
+ Enable or disable the sensor.
+ When disabled the sensor read will return -ENODATA. For chips
+ which do not have the capability to disable/enable single sensor
+ but have support for sensor-group disable/enable, will only have
+ the first attribute with write permission. In such cases write
+ to the first attribute will affect all the sensors of this type.
+ 1: Enable
+ 0: Disable
+ RW/RO
+
Also see the Alarms section for status flags associated with currents.
*********
@@ -566,6 +610,19 @@ power[1-*]_crit Critical maximum power.
Unit: microWatt
RW
+power[1-*]_enable Enable or disable the sensor.
+ When disabled the sensor read will return
+ -ENODATA. For chips which do not have the
+ capability to disable/enable single sensor but
+ have support for sensor-group disable/enable,
+ will only have the first attribute with write
+ permission. In such cases write to the first
+ attribute will affect all the sensors of this
+ type.
+ 1: Enable
+ 0: Disable
+ RW/RO
+
Also see the Alarms section for status flags associated with power readings.
**********
@@ -576,6 +633,18 @@ energy[1-*]_input Cumulative energy use
Unit: microJoule
RO
+energy[1-*]_enable Enable or disable the sensor.
+ When disabled the sensor read will return
+ -ENODATA. For chips which do not have the
+ capability to disable/enable single sensor but
+ have support for sensor-group disable/enable,
+ will only have the first attribute with write
+ permission. In such cases write to the first
+ attribute will affect all the sensors of this
+ type.
+ 1: Enable
+ 0: Disable
+ RW/RO
************
* Humidity *
@@ -586,6 +655,19 @@ humidity[1-*]_input Humidity
RO
+humidity[1-*]_enable Enable or disable the sensor.
+ When disabled the sensor read will return
+ -ENODATA. For chips which do not have the
+ capability to disable/enable single sensor but
+ have support for sensor-group disable/enable,
+ will only have the first attribute with write
+ permission. In such cases write to the first
+ attribute will affect all the sensors of this
+ type.
+ 1: Enable
+ 0: Disable
+ RW/RO
+
**********
* Alarms *
**********
--
1.8.3.1
next prev parent reply other threads:[~2018-07-05 13:51 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-07-05 13:51 [PATCH v3 0/3] hwmon: Add attributes to enable/disable sensors Shilpasri G Bhat
2018-07-05 13:51 ` [PATCH v3 1/3] powernv:opal-sensor-groups: Add support to enable sensor groups Shilpasri G Bhat
2018-07-05 13:51 ` [PATCH v3 2/3] hwmon: ibmpowernv: Add attributes to enable/disable " Shilpasri G Bhat
2018-07-05 15:37 ` Guenter Roeck
2018-07-05 17:35 ` Shilpasri G Bhat
2018-07-05 13:51 ` Shilpasri G Bhat [this message]
2018-07-05 15:31 ` [PATCH v3 3/3] hwmon: Document the sensor enable attribute and update ibmpowernv Guenter Roeck
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=1530798689-27742-4-git-send-email-shilpa.bhat@linux.vnet.ibm.com \
--to=shilpa.bhat@linux.vnet.ibm.com \
--cc=ego@linux.vnet.ibm.com \
--cc=linux-hwmon@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux@roeck-us.net \
--cc=linuxppc-dev@lists.ozlabs.org \
--cc=mpe@ellerman.id.au \
/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;
as well as URLs for NNTP newsgroup(s).