diff options
author | Hans de Goede <hdegoede@redhat.com> | 2009-01-07 10:37:29 -0500 |
---|---|---|
committer | Jean Delvare <khali@linux-fr.org> | 2009-01-07 10:37:29 -0500 |
commit | 754a5907b01687089382e362753dcceaca58ee66 (patch) | |
tree | 453ae0a63773396550a085c070f0867146f159d8 /drivers/hwmon/f71882fg.c | |
parent | 12d66e840b605265d6adf4b800cc3fc5fb410903 (diff) |
hwmon: (f71882fg) Separate max and crit alarm and beep
While studying the datasheets for adding F8000 support, I noticed that the
F718x2 has separate alarms (and beep control) for its max and crit limits.
We keep the temp#_alarm attributes as they are, even though it would be more
logical to rename them to temp#_max_alarm. Because lm_sensors v2 depends
on them.
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Jean Delvare <khali@linux-fr.org>
Diffstat (limited to 'drivers/hwmon/f71882fg.c')
-rw-r--r-- | drivers/hwmon/f71882fg.c | 32 |
1 files changed, 23 insertions, 9 deletions
diff --git a/drivers/hwmon/f71882fg.c b/drivers/hwmon/f71882fg.c index 03a4f84b4e5c..95a279f70264 100644 --- a/drivers/hwmon/f71882fg.c +++ b/drivers/hwmon/f71882fg.c | |||
@@ -270,42 +270,56 @@ static struct sensor_device_attribute_2 f718x2fg_in_temp_attr[] = { | |||
270 | store_temp_max, 0, 1), | 270 | store_temp_max, 0, 1), |
271 | SENSOR_ATTR_2(temp1_max_hyst, S_IRUGO|S_IWUSR, show_temp_max_hyst, | 271 | SENSOR_ATTR_2(temp1_max_hyst, S_IRUGO|S_IWUSR, show_temp_max_hyst, |
272 | store_temp_max_hyst, 0, 1), | 272 | store_temp_max_hyst, 0, 1), |
273 | /* Should really be temp1_max_alarm, but older versions did not handle | ||
274 | the max and crit alarms separately and lm_sensors v2 depends on the | ||
275 | presence of temp#_alarm files. The same goes for temp2/3 _alarm. */ | ||
276 | SENSOR_ATTR_2(temp1_alarm, S_IRUGO, show_temp_alarm, NULL, 0, 1), | ||
277 | SENSOR_ATTR_2(temp1_max_beep, S_IRUGO|S_IWUSR, show_temp_beep, | ||
278 | store_temp_beep, 0, 1), | ||
273 | SENSOR_ATTR_2(temp1_crit, S_IRUGO|S_IWUSR, show_temp_crit, | 279 | SENSOR_ATTR_2(temp1_crit, S_IRUGO|S_IWUSR, show_temp_crit, |
274 | store_temp_crit, 0, 1), | 280 | store_temp_crit, 0, 1), |
275 | SENSOR_ATTR_2(temp1_crit_hyst, S_IRUGO, show_temp_crit_hyst, NULL, | 281 | SENSOR_ATTR_2(temp1_crit_hyst, S_IRUGO, show_temp_crit_hyst, NULL, |
276 | 0, 1), | 282 | 0, 1), |
283 | SENSOR_ATTR_2(temp1_crit_alarm, S_IRUGO, show_temp_alarm, NULL, 0, 5), | ||
284 | SENSOR_ATTR_2(temp1_crit_beep, S_IRUGO|S_IWUSR, show_temp_beep, | ||
285 | store_temp_beep, 0, 5), | ||
277 | SENSOR_ATTR_2(temp1_type, S_IRUGO, show_temp_type, NULL, 0, 1), | 286 | SENSOR_ATTR_2(temp1_type, S_IRUGO, show_temp_type, NULL, 0, 1), |
278 | SENSOR_ATTR_2(temp1_beep, S_IRUGO|S_IWUSR, show_temp_beep, | ||
279 | store_temp_beep, 0, 1), | ||
280 | SENSOR_ATTR_2(temp1_alarm, S_IRUGO, show_temp_alarm, NULL, 0, 1), | ||
281 | SENSOR_ATTR_2(temp1_fault, S_IRUGO, show_temp_fault, NULL, 0, 1), | 287 | SENSOR_ATTR_2(temp1_fault, S_IRUGO, show_temp_fault, NULL, 0, 1), |
282 | SENSOR_ATTR_2(temp2_input, S_IRUGO, show_temp, NULL, 0, 2), | 288 | SENSOR_ATTR_2(temp2_input, S_IRUGO, show_temp, NULL, 0, 2), |
283 | SENSOR_ATTR_2(temp2_max, S_IRUGO|S_IWUSR, show_temp_max, | 289 | SENSOR_ATTR_2(temp2_max, S_IRUGO|S_IWUSR, show_temp_max, |
284 | store_temp_max, 0, 2), | 290 | store_temp_max, 0, 2), |
285 | SENSOR_ATTR_2(temp2_max_hyst, S_IRUGO|S_IWUSR, show_temp_max_hyst, | 291 | SENSOR_ATTR_2(temp2_max_hyst, S_IRUGO|S_IWUSR, show_temp_max_hyst, |
286 | store_temp_max_hyst, 0, 2), | 292 | store_temp_max_hyst, 0, 2), |
293 | /* Should be temp2_max_alarm, see temp1_alarm note */ | ||
294 | SENSOR_ATTR_2(temp2_alarm, S_IRUGO, show_temp_alarm, NULL, 0, 2), | ||
295 | SENSOR_ATTR_2(temp2_max_beep, S_IRUGO|S_IWUSR, show_temp_beep, | ||
296 | store_temp_beep, 0, 2), | ||
287 | SENSOR_ATTR_2(temp2_crit, S_IRUGO|S_IWUSR, show_temp_crit, | 297 | SENSOR_ATTR_2(temp2_crit, S_IRUGO|S_IWUSR, show_temp_crit, |
288 | store_temp_crit, 0, 2), | 298 | store_temp_crit, 0, 2), |
289 | SENSOR_ATTR_2(temp2_crit_hyst, S_IRUGO, show_temp_crit_hyst, NULL, | 299 | SENSOR_ATTR_2(temp2_crit_hyst, S_IRUGO, show_temp_crit_hyst, NULL, |
290 | 0, 2), | 300 | 0, 2), |
301 | SENSOR_ATTR_2(temp2_crit_alarm, S_IRUGO, show_temp_alarm, NULL, 0, 6), | ||
302 | SENSOR_ATTR_2(temp2_crit_beep, S_IRUGO|S_IWUSR, show_temp_beep, | ||
303 | store_temp_beep, 0, 6), | ||
291 | SENSOR_ATTR_2(temp2_type, S_IRUGO, show_temp_type, NULL, 0, 2), | 304 | SENSOR_ATTR_2(temp2_type, S_IRUGO, show_temp_type, NULL, 0, 2), |
292 | SENSOR_ATTR_2(temp2_beep, S_IRUGO|S_IWUSR, show_temp_beep, | ||
293 | store_temp_beep, 0, 2), | ||
294 | SENSOR_ATTR_2(temp2_alarm, S_IRUGO, show_temp_alarm, NULL, 0, 2), | ||
295 | SENSOR_ATTR_2(temp2_fault, S_IRUGO, show_temp_fault, NULL, 0, 2), | 305 | SENSOR_ATTR_2(temp2_fault, S_IRUGO, show_temp_fault, NULL, 0, 2), |
296 | SENSOR_ATTR_2(temp3_input, S_IRUGO, show_temp, NULL, 0, 3), | 306 | SENSOR_ATTR_2(temp3_input, S_IRUGO, show_temp, NULL, 0, 3), |
297 | SENSOR_ATTR_2(temp3_max, S_IRUGO|S_IWUSR, show_temp_max, | 307 | SENSOR_ATTR_2(temp3_max, S_IRUGO|S_IWUSR, show_temp_max, |
298 | store_temp_max, 0, 3), | 308 | store_temp_max, 0, 3), |
299 | SENSOR_ATTR_2(temp3_max_hyst, S_IRUGO|S_IWUSR, show_temp_max_hyst, | 309 | SENSOR_ATTR_2(temp3_max_hyst, S_IRUGO|S_IWUSR, show_temp_max_hyst, |
300 | store_temp_max_hyst, 0, 3), | 310 | store_temp_max_hyst, 0, 3), |
311 | /* Should be temp3_max_alarm, see temp1_alarm note */ | ||
312 | SENSOR_ATTR_2(temp3_alarm, S_IRUGO, show_temp_alarm, NULL, 0, 3), | ||
313 | SENSOR_ATTR_2(temp3_max_beep, S_IRUGO|S_IWUSR, show_temp_beep, | ||
314 | store_temp_beep, 0, 3), | ||
301 | SENSOR_ATTR_2(temp3_crit, S_IRUGO|S_IWUSR, show_temp_crit, | 315 | SENSOR_ATTR_2(temp3_crit, S_IRUGO|S_IWUSR, show_temp_crit, |
302 | store_temp_crit, 0, 3), | 316 | store_temp_crit, 0, 3), |
303 | SENSOR_ATTR_2(temp3_crit_hyst, S_IRUGO, show_temp_crit_hyst, NULL, | 317 | SENSOR_ATTR_2(temp3_crit_hyst, S_IRUGO, show_temp_crit_hyst, NULL, |
304 | 0, 3), | 318 | 0, 3), |
319 | SENSOR_ATTR_2(temp3_crit_alarm, S_IRUGO, show_temp_alarm, NULL, 0, 7), | ||
320 | SENSOR_ATTR_2(temp3_crit_beep, S_IRUGO|S_IWUSR, show_temp_beep, | ||
321 | store_temp_beep, 0, 7), | ||
305 | SENSOR_ATTR_2(temp3_type, S_IRUGO, show_temp_type, NULL, 0, 3), | 322 | SENSOR_ATTR_2(temp3_type, S_IRUGO, show_temp_type, NULL, 0, 3), |
306 | SENSOR_ATTR_2(temp3_beep, S_IRUGO|S_IWUSR, show_temp_beep, | ||
307 | store_temp_beep, 0, 3), | ||
308 | SENSOR_ATTR_2(temp3_alarm, S_IRUGO, show_temp_alarm, NULL, 0, 3), | ||
309 | SENSOR_ATTR_2(temp3_fault, S_IRUGO, show_temp_fault, NULL, 0, 3), | 323 | SENSOR_ATTR_2(temp3_fault, S_IRUGO, show_temp_fault, NULL, 0, 3), |
310 | }; | 324 | }; |
311 | 325 | ||