Skip to contentSkip to conversation

hwmon: Add unspecified temperature

RFC PATCH In review Guenter Roeck 2 participants 2 messages Sep 18, 2011 – Sep 19, 2011

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

RFC PATCH 1/1 hwmon: Add unspecified temperature

Some recent temperature sensor chips provide thresholds which are not associated with lower or upper limits. The use of those thresholds is application specific.

Provide sysfs ABI attributes to support such thresholds.

---
Something like that ?

Question is if the first threshold should be numbered 0 or 1. I started with 1 for now since tempX also starts with 1.

 Documentation/hwmon/sysfs-interface |   12 ++++++++++++
 1 files changed, 12 insertions(+), 0 deletions(-)
Documentation/hwmon/sysfs-interface +12 -0
index a4aa8f6..e65e7e8 100644
@@ -394,6 +394,18 @@ temp_reset_history
 		Reset temp_lowest and temp_highest for all sensors
 		WO
 
+temp[1-*]_threshold[1-*]
+		Unspecified threshold. Use if the chip provides temperature
+		thresholds which are not associated with lower or upper limits.
+		RW
+		Unit: millidegree Celsius
+
+temp[1-*]_threshold[1-*]_triggered
+		Channel trigger information.
+		0: Temperature is below threshold.
+		1: Temperature is at or above threshold.
+		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
Signature · 7 lines
1.7.3.1


_______________________________________________
lm-sensors mailing list
[email protected]
http://lists.lm-sensors.org/mailman/listinfo/lm-sensors
Reviewed-by on v1 1/1
#1 lore raw

Hi Guenter,

Patch looks fine for me. Feel free to add,

Reviewed-by [email protected]
Quoted 6 lines

---
Something like that ?

Question is if the first threshold should be numbered 0 or 1. I started with 1 for now since tempX also starts with 1.

I agree with you, for the very same reason.

[snip..]

Thanks,
Durga

_______________________________________________
lm-sensors mailing list
[email protected]
http://lists.lm-sensors.org/mailman/listinfo/lm-sensors