diff options
author | Jean Delvare <khali@linux-fr.org> | 2007-06-09 10:11:16 -0400 |
---|---|---|
committer | Mark M. Hoffman <mhoffman@lightlink.com> | 2007-07-19 14:22:12 -0400 |
commit | 7817a39e65f04abe136d94a65fa26b7fe3334a1f (patch) | |
tree | 4c7170fe690a8e66e1db341e32e28e7108e46435 | |
parent | 32c82a934759b2c9939c9e25865c2d7d1204b9e8 (diff) |
hwmon: Fault files naming convention
We have the following naming convention documented in
Documentation/hwmon/sysfs-interface for fault files:
in[0-*]_input_fault
fan[1-*]_input_fault
temp[1-*]_input_fault
Some drivers follow this convention (lm63, lm83, lm90, smsc47m192).
However some drivers omit the "input" part and create files named
fan1_fault (pc87427) or temp1_fault (dme1737). And the new "generic"
libsensors follows this second (non-standard) convention, so it fails
to report fault conditions for drivers which follow the standard.
We want a single naming scheme, and everyone seems to prefer the
shorter variant, so let's go for it.
Signed-off-by: Jean Delvare <khali@linux-fr.org>
-rw-r--r-- | Documentation/hwmon/sysfs-interface | 6 | ||||
-rw-r--r-- | drivers/hwmon/lm63.c | 4 | ||||
-rw-r--r-- | drivers/hwmon/lm83.c | 12 | ||||
-rw-r--r-- | drivers/hwmon/lm90.c | 4 | ||||
-rw-r--r-- | drivers/hwmon/smsc47m192.c | 8 |
5 files changed, 17 insertions, 17 deletions
diff --git a/Documentation/hwmon/sysfs-interface b/Documentation/hwmon/sysfs-interface index a9a18ad0d17a..d131a56e52f8 100644 --- a/Documentation/hwmon/sysfs-interface +++ b/Documentation/hwmon/sysfs-interface | |||
@@ -343,9 +343,9 @@ to notify open diodes, unconnected fans etc. where the hardware | |||
343 | supports it. When this boolean has value 1, the measurement for that | 343 | supports it. When this boolean has value 1, the measurement for that |
344 | channel should not be trusted. | 344 | channel should not be trusted. |
345 | 345 | ||
346 | in[0-*]_input_fault | 346 | in[0-*]_fault |
347 | fan[1-*]_input_fault | 347 | fan[1-*]_fault |
348 | temp[1-*]_input_fault | 348 | temp[1-*]_fault |
349 | Input fault condition | 349 | Input fault condition |
350 | 0: no fault occured | 350 | 0: no fault occured |
351 | 1: fault condition | 351 | 1: fault condition |
diff --git a/drivers/hwmon/lm63.c b/drivers/hwmon/lm63.c index d69f3cf07122..2162d69a8c06 100644 --- a/drivers/hwmon/lm63.c +++ b/drivers/hwmon/lm63.c | |||
@@ -364,7 +364,7 @@ static DEVICE_ATTR(temp2_crit_hyst, S_IWUSR | S_IRUGO, show_temp2_crit_hyst, | |||
364 | /* Individual alarm files */ | 364 | /* Individual alarm files */ |
365 | static SENSOR_DEVICE_ATTR(fan1_min_alarm, S_IRUGO, show_alarm, NULL, 0); | 365 | static SENSOR_DEVICE_ATTR(fan1_min_alarm, S_IRUGO, show_alarm, NULL, 0); |
366 | static SENSOR_DEVICE_ATTR(temp2_crit_alarm, S_IRUGO, show_alarm, NULL, 1); | 366 | static SENSOR_DEVICE_ATTR(temp2_crit_alarm, S_IRUGO, show_alarm, NULL, 1); |
367 | static SENSOR_DEVICE_ATTR(temp2_input_fault, S_IRUGO, show_alarm, NULL, 2); | 367 | static SENSOR_DEVICE_ATTR(temp2_fault, S_IRUGO, show_alarm, NULL, 2); |
368 | static SENSOR_DEVICE_ATTR(temp2_min_alarm, S_IRUGO, show_alarm, NULL, 3); | 368 | static SENSOR_DEVICE_ATTR(temp2_min_alarm, S_IRUGO, show_alarm, NULL, 3); |
369 | static SENSOR_DEVICE_ATTR(temp2_max_alarm, S_IRUGO, show_alarm, NULL, 4); | 369 | static SENSOR_DEVICE_ATTR(temp2_max_alarm, S_IRUGO, show_alarm, NULL, 4); |
370 | static SENSOR_DEVICE_ATTR(temp1_max_alarm, S_IRUGO, show_alarm, NULL, 6); | 370 | static SENSOR_DEVICE_ATTR(temp1_max_alarm, S_IRUGO, show_alarm, NULL, 6); |
@@ -383,7 +383,7 @@ static struct attribute *lm63_attributes[] = { | |||
383 | &dev_attr_temp2_crit_hyst.attr, | 383 | &dev_attr_temp2_crit_hyst.attr, |
384 | 384 | ||
385 | &sensor_dev_attr_temp2_crit_alarm.dev_attr.attr, | 385 | &sensor_dev_attr_temp2_crit_alarm.dev_attr.attr, |
386 | &sensor_dev_attr_temp2_input_fault.dev_attr.attr, | 386 | &sensor_dev_attr_temp2_fault.dev_attr.attr, |
387 | &sensor_dev_attr_temp2_min_alarm.dev_attr.attr, | 387 | &sensor_dev_attr_temp2_min_alarm.dev_attr.attr, |
388 | &sensor_dev_attr_temp2_max_alarm.dev_attr.attr, | 388 | &sensor_dev_attr_temp2_max_alarm.dev_attr.attr, |
389 | &sensor_dev_attr_temp1_max_alarm.dev_attr.attr, | 389 | &sensor_dev_attr_temp1_max_alarm.dev_attr.attr, |
diff --git a/drivers/hwmon/lm83.c b/drivers/hwmon/lm83.c index feb87b41e986..654c0f73464d 100644 --- a/drivers/hwmon/lm83.c +++ b/drivers/hwmon/lm83.c | |||
@@ -223,14 +223,14 @@ static SENSOR_DEVICE_ATTR(temp4_crit, S_IRUGO, show_temp, NULL, 8); | |||
223 | /* Individual alarm files */ | 223 | /* Individual alarm files */ |
224 | static SENSOR_DEVICE_ATTR(temp1_crit_alarm, S_IRUGO, show_alarm, NULL, 0); | 224 | static SENSOR_DEVICE_ATTR(temp1_crit_alarm, S_IRUGO, show_alarm, NULL, 0); |
225 | static SENSOR_DEVICE_ATTR(temp3_crit_alarm, S_IRUGO, show_alarm, NULL, 1); | 225 | static SENSOR_DEVICE_ATTR(temp3_crit_alarm, S_IRUGO, show_alarm, NULL, 1); |
226 | static SENSOR_DEVICE_ATTR(temp3_input_fault, S_IRUGO, show_alarm, NULL, 2); | 226 | static SENSOR_DEVICE_ATTR(temp3_fault, S_IRUGO, show_alarm, NULL, 2); |
227 | static SENSOR_DEVICE_ATTR(temp3_max_alarm, S_IRUGO, show_alarm, NULL, 4); | 227 | static SENSOR_DEVICE_ATTR(temp3_max_alarm, S_IRUGO, show_alarm, NULL, 4); |
228 | static SENSOR_DEVICE_ATTR(temp1_max_alarm, S_IRUGO, show_alarm, NULL, 6); | 228 | static SENSOR_DEVICE_ATTR(temp1_max_alarm, S_IRUGO, show_alarm, NULL, 6); |
229 | static SENSOR_DEVICE_ATTR(temp2_crit_alarm, S_IRUGO, show_alarm, NULL, 8); | 229 | static SENSOR_DEVICE_ATTR(temp2_crit_alarm, S_IRUGO, show_alarm, NULL, 8); |
230 | static SENSOR_DEVICE_ATTR(temp4_crit_alarm, S_IRUGO, show_alarm, NULL, 9); | 230 | static SENSOR_DEVICE_ATTR(temp4_crit_alarm, S_IRUGO, show_alarm, NULL, 9); |
231 | static SENSOR_DEVICE_ATTR(temp4_input_fault, S_IRUGO, show_alarm, NULL, 10); | 231 | static SENSOR_DEVICE_ATTR(temp4_fault, S_IRUGO, show_alarm, NULL, 10); |
232 | static SENSOR_DEVICE_ATTR(temp4_max_alarm, S_IRUGO, show_alarm, NULL, 12); | 232 | static SENSOR_DEVICE_ATTR(temp4_max_alarm, S_IRUGO, show_alarm, NULL, 12); |
233 | static SENSOR_DEVICE_ATTR(temp2_input_fault, S_IRUGO, show_alarm, NULL, 13); | 233 | static SENSOR_DEVICE_ATTR(temp2_fault, S_IRUGO, show_alarm, NULL, 13); |
234 | static SENSOR_DEVICE_ATTR(temp2_max_alarm, S_IRUGO, show_alarm, NULL, 15); | 234 | static SENSOR_DEVICE_ATTR(temp2_max_alarm, S_IRUGO, show_alarm, NULL, 15); |
235 | /* Raw alarm file for compatibility */ | 235 | /* Raw alarm file for compatibility */ |
236 | static DEVICE_ATTR(alarms, S_IRUGO, show_alarms, NULL); | 236 | static DEVICE_ATTR(alarms, S_IRUGO, show_alarms, NULL); |
@@ -245,7 +245,7 @@ static struct attribute *lm83_attributes[] = { | |||
245 | 245 | ||
246 | &sensor_dev_attr_temp1_crit_alarm.dev_attr.attr, | 246 | &sensor_dev_attr_temp1_crit_alarm.dev_attr.attr, |
247 | &sensor_dev_attr_temp3_crit_alarm.dev_attr.attr, | 247 | &sensor_dev_attr_temp3_crit_alarm.dev_attr.attr, |
248 | &sensor_dev_attr_temp3_input_fault.dev_attr.attr, | 248 | &sensor_dev_attr_temp3_fault.dev_attr.attr, |
249 | &sensor_dev_attr_temp3_max_alarm.dev_attr.attr, | 249 | &sensor_dev_attr_temp3_max_alarm.dev_attr.attr, |
250 | &sensor_dev_attr_temp1_max_alarm.dev_attr.attr, | 250 | &sensor_dev_attr_temp1_max_alarm.dev_attr.attr, |
251 | &dev_attr_alarms.attr, | 251 | &dev_attr_alarms.attr, |
@@ -266,9 +266,9 @@ static struct attribute *lm83_attributes_opt[] = { | |||
266 | 266 | ||
267 | &sensor_dev_attr_temp2_crit_alarm.dev_attr.attr, | 267 | &sensor_dev_attr_temp2_crit_alarm.dev_attr.attr, |
268 | &sensor_dev_attr_temp4_crit_alarm.dev_attr.attr, | 268 | &sensor_dev_attr_temp4_crit_alarm.dev_attr.attr, |
269 | &sensor_dev_attr_temp4_input_fault.dev_attr.attr, | 269 | &sensor_dev_attr_temp4_fault.dev_attr.attr, |
270 | &sensor_dev_attr_temp4_max_alarm.dev_attr.attr, | 270 | &sensor_dev_attr_temp4_max_alarm.dev_attr.attr, |
271 | &sensor_dev_attr_temp2_input_fault.dev_attr.attr, | 271 | &sensor_dev_attr_temp2_fault.dev_attr.attr, |
272 | &sensor_dev_attr_temp2_max_alarm.dev_attr.attr, | 272 | &sensor_dev_attr_temp2_max_alarm.dev_attr.attr, |
273 | NULL | 273 | NULL |
274 | }; | 274 | }; |
diff --git a/drivers/hwmon/lm90.c b/drivers/hwmon/lm90.c index 5771130f51ff..48833fff4920 100644 --- a/drivers/hwmon/lm90.c +++ b/drivers/hwmon/lm90.c | |||
@@ -371,7 +371,7 @@ static SENSOR_DEVICE_ATTR(temp2_crit_hyst, S_IRUGO, show_temphyst, NULL, 4); | |||
371 | /* Individual alarm files */ | 371 | /* Individual alarm files */ |
372 | static SENSOR_DEVICE_ATTR(temp1_crit_alarm, S_IRUGO, show_alarm, NULL, 0); | 372 | static SENSOR_DEVICE_ATTR(temp1_crit_alarm, S_IRUGO, show_alarm, NULL, 0); |
373 | static SENSOR_DEVICE_ATTR(temp2_crit_alarm, S_IRUGO, show_alarm, NULL, 1); | 373 | static SENSOR_DEVICE_ATTR(temp2_crit_alarm, S_IRUGO, show_alarm, NULL, 1); |
374 | static SENSOR_DEVICE_ATTR(temp2_input_fault, S_IRUGO, show_alarm, NULL, 2); | 374 | static SENSOR_DEVICE_ATTR(temp2_fault, S_IRUGO, show_alarm, NULL, 2); |
375 | static SENSOR_DEVICE_ATTR(temp2_min_alarm, S_IRUGO, show_alarm, NULL, 3); | 375 | static SENSOR_DEVICE_ATTR(temp2_min_alarm, S_IRUGO, show_alarm, NULL, 3); |
376 | static SENSOR_DEVICE_ATTR(temp2_max_alarm, S_IRUGO, show_alarm, NULL, 4); | 376 | static SENSOR_DEVICE_ATTR(temp2_max_alarm, S_IRUGO, show_alarm, NULL, 4); |
377 | static SENSOR_DEVICE_ATTR(temp1_min_alarm, S_IRUGO, show_alarm, NULL, 5); | 377 | static SENSOR_DEVICE_ATTR(temp1_min_alarm, S_IRUGO, show_alarm, NULL, 5); |
@@ -393,7 +393,7 @@ static struct attribute *lm90_attributes[] = { | |||
393 | 393 | ||
394 | &sensor_dev_attr_temp1_crit_alarm.dev_attr.attr, | 394 | &sensor_dev_attr_temp1_crit_alarm.dev_attr.attr, |
395 | &sensor_dev_attr_temp2_crit_alarm.dev_attr.attr, | 395 | &sensor_dev_attr_temp2_crit_alarm.dev_attr.attr, |
396 | &sensor_dev_attr_temp2_input_fault.dev_attr.attr, | 396 | &sensor_dev_attr_temp2_fault.dev_attr.attr, |
397 | &sensor_dev_attr_temp2_min_alarm.dev_attr.attr, | 397 | &sensor_dev_attr_temp2_min_alarm.dev_attr.attr, |
398 | &sensor_dev_attr_temp2_max_alarm.dev_attr.attr, | 398 | &sensor_dev_attr_temp2_max_alarm.dev_attr.attr, |
399 | &sensor_dev_attr_temp1_min_alarm.dev_attr.attr, | 399 | &sensor_dev_attr_temp1_min_alarm.dev_attr.attr, |
diff --git a/drivers/hwmon/smsc47m192.c b/drivers/hwmon/smsc47m192.c index 7c5cfa24d0c4..d3a3ba04cb0f 100644 --- a/drivers/hwmon/smsc47m192.c +++ b/drivers/hwmon/smsc47m192.c | |||
@@ -361,8 +361,8 @@ static ssize_t show_alarm(struct device *dev, struct device_attribute *attr, | |||
361 | static SENSOR_DEVICE_ATTR(temp1_alarm, S_IRUGO, show_alarm, NULL, 0x0010); | 361 | static SENSOR_DEVICE_ATTR(temp1_alarm, S_IRUGO, show_alarm, NULL, 0x0010); |
362 | static SENSOR_DEVICE_ATTR(temp2_alarm, S_IRUGO, show_alarm, NULL, 0x0020); | 362 | static SENSOR_DEVICE_ATTR(temp2_alarm, S_IRUGO, show_alarm, NULL, 0x0020); |
363 | static SENSOR_DEVICE_ATTR(temp3_alarm, S_IRUGO, show_alarm, NULL, 0x0040); | 363 | static SENSOR_DEVICE_ATTR(temp3_alarm, S_IRUGO, show_alarm, NULL, 0x0040); |
364 | static SENSOR_DEVICE_ATTR(temp2_input_fault, S_IRUGO, show_alarm, NULL, 0x4000); | 364 | static SENSOR_DEVICE_ATTR(temp2_fault, S_IRUGO, show_alarm, NULL, 0x4000); |
365 | static SENSOR_DEVICE_ATTR(temp3_input_fault, S_IRUGO, show_alarm, NULL, 0x8000); | 365 | static SENSOR_DEVICE_ATTR(temp3_fault, S_IRUGO, show_alarm, NULL, 0x8000); |
366 | static SENSOR_DEVICE_ATTR(in0_alarm, S_IRUGO, show_alarm, NULL, 0x0001); | 366 | static SENSOR_DEVICE_ATTR(in0_alarm, S_IRUGO, show_alarm, NULL, 0x0001); |
367 | static SENSOR_DEVICE_ATTR(in1_alarm, S_IRUGO, show_alarm, NULL, 0x0002); | 367 | static SENSOR_DEVICE_ATTR(in1_alarm, S_IRUGO, show_alarm, NULL, 0x0002); |
368 | static SENSOR_DEVICE_ATTR(in2_alarm, S_IRUGO, show_alarm, NULL, 0x0004); | 368 | static SENSOR_DEVICE_ATTR(in2_alarm, S_IRUGO, show_alarm, NULL, 0x0004); |
@@ -412,13 +412,13 @@ static struct attribute *smsc47m192_attributes[] = { | |||
412 | &sensor_dev_attr_temp2_min.dev_attr.attr, | 412 | &sensor_dev_attr_temp2_min.dev_attr.attr, |
413 | &sensor_dev_attr_temp2_offset.dev_attr.attr, | 413 | &sensor_dev_attr_temp2_offset.dev_attr.attr, |
414 | &sensor_dev_attr_temp2_alarm.dev_attr.attr, | 414 | &sensor_dev_attr_temp2_alarm.dev_attr.attr, |
415 | &sensor_dev_attr_temp2_input_fault.dev_attr.attr, | 415 | &sensor_dev_attr_temp2_fault.dev_attr.attr, |
416 | &sensor_dev_attr_temp3_input.dev_attr.attr, | 416 | &sensor_dev_attr_temp3_input.dev_attr.attr, |
417 | &sensor_dev_attr_temp3_max.dev_attr.attr, | 417 | &sensor_dev_attr_temp3_max.dev_attr.attr, |
418 | &sensor_dev_attr_temp3_min.dev_attr.attr, | 418 | &sensor_dev_attr_temp3_min.dev_attr.attr, |
419 | &sensor_dev_attr_temp3_offset.dev_attr.attr, | 419 | &sensor_dev_attr_temp3_offset.dev_attr.attr, |
420 | &sensor_dev_attr_temp3_alarm.dev_attr.attr, | 420 | &sensor_dev_attr_temp3_alarm.dev_attr.attr, |
421 | &sensor_dev_attr_temp3_input_fault.dev_attr.attr, | 421 | &sensor_dev_attr_temp3_fault.dev_attr.attr, |
422 | 422 | ||
423 | &dev_attr_cpu0_vid.attr, | 423 | &dev_attr_cpu0_vid.attr, |
424 | &dev_attr_vrm.attr, | 424 | &dev_attr_vrm.attr, |