Skip to contentSkip to conversation

sensors: Add support for temp[1-*]_min_hyst and temp[1-*]_lcrit_hyst

PATCH In review Jean Delvare 2 participants 2 messages Apr 20, 2014

lore
Share & tools
lore
#0 lore raw

PATCH 2/2 sensors: Add support for temp[1-*]_min_hyst and temp[1-*]_lcrit_hyst

Add support for sysfs attributes temp[1-*]_min_hyst and temp[1-*]_lcrit_hyst.

---
 prog/sensors/chips.c |   14 ++++++++++++--
 1 file changed, 12 insertions(+), 2 deletions(-)
prog/sensors/chips.c +12 -2
@@ -237,6 +237,16 @@ static void get_sensor_limit_data(const
 	}
 }
 
+static const struct sensor_subfeature_list temp_min_sensors[] = {
+	{ SENSORS_SUBFEATURE_TEMP_MIN_HYST, NULL, 0, hyst_str },
+	{ -1, NULL, 0, NULL }
+};
+
+static const struct sensor_subfeature_list temp_lcrit_sensors[] = {
+	{ SENSORS_SUBFEATURE_TEMP_LCRIT_HYST, NULL, 0, hyst_str },
+	{ -1, NULL, 0, NULL }
+};
+
 static const struct sensor_subfeature_list temp_max_sensors[] = {
 	{ SENSORS_SUBFEATURE_TEMP_MAX_HYST, NULL, 0, hyst_str },
 	{ -1, NULL, 0, NULL }
@@ -260,9 +270,9 @@ static const struct sensor_subfeature_li
 	{ SENSORS_SUBFEATURE_TEMP_MAX_ALARM, NULL, 1, "HIGH" },
 	{ SENSORS_SUBFEATURE_TEMP_CRIT_ALARM, NULL, 1, "CRIT" },
 	{ SENSORS_SUBFEATURE_TEMP_EMERGENCY_ALARM, NULL, 1, "EMERGENCY" },
-	{ SENSORS_SUBFEATURE_TEMP_MIN, NULL, 0, "low" },
+	{ SENSORS_SUBFEATURE_TEMP_MIN, temp_min_sensors, 0, "low" },
 	{ SENSORS_SUBFEATURE_TEMP_MAX, temp_max_sensors, 0, "high" },
-	{ SENSORS_SUBFEATURE_TEMP_LCRIT, NULL, 0, "crit low" },
+	{ SENSORS_SUBFEATURE_TEMP_LCRIT, temp_lcrit_sensors, 0, "crit low" },
 	{ SENSORS_SUBFEATURE_TEMP_CRIT, temp_crit_sensors, 0, "crit" },
 	{ SENSORS_SUBFEATURE_TEMP_EMERGENCY, temp_emergency_sensors, 0,
 	    "emerg" },
Signature · 7 lines
Jean Delvare
SUSE L3 Support

_______________________________________________
lm-sensors mailing list
[email protected]
http://lists.lm-sensors.org/mailman/listinfo/lm-sensors
#1 lore raw
Quoted 3 lines · Jean Delvare

Add support for sysfs attributes temp[1-*]_min_hyst and temp[1-*]_lcrit_hyst.
---

Test results with lm77:

lm77-i2c-9-49
Adapter: i2c-diolan-u2c at bus 003 device 013
temp1: +22.5°C (low = +10.0°C, hyst = +12.0°C)

                        (high = +64.0°C, hyst = +62.0°C)
                        (crit = +80.0°C, hyst = +78.0°C)

Looks good ...

Guenter

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