diff options
author | Jean Delvare <khali@linux-fr.org> | 2006-03-23 10:46:47 -0500 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2006-06-22 14:10:32 -0400 |
commit | 400b48ecd95a7fac6b126042d37b7efe0202b582 (patch) | |
tree | f0fe5c22b7f2198a952ec75b476ac7a33c515248 | |
parent | 568825c8ed3c902981ce908ed5693abb3c9ddf59 (diff) |
[PATCH] hwmon: Add sysfs interface for individual alarm files
Extend the sysfs interface of hardware monitoring chips, by adding
individual alarm and beep files. Contrary to the old aggregated "alarms"
and "beeps" files, individual files constitute a standard way to access
the status information, making it finally possible to implement a
chip-independant hardware monitoring chip access library (once all
drivers have been added this new interface, that is.)
If future drivers need more individual files, the interface will be
extended as needed at the same time these drivers are merged into the
kernel tree.
Signed-off-by: Jean Delvare <khali@linux-fr.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
-rw-r--r-- | Documentation/hwmon/sysfs-interface | 98 |
1 files changed, 73 insertions, 25 deletions
diff --git a/Documentation/hwmon/sysfs-interface b/Documentation/hwmon/sysfs-interface index 2d16e1e4017d..eeb912254db4 100644 --- a/Documentation/hwmon/sysfs-interface +++ b/Documentation/hwmon/sysfs-interface | |||
@@ -252,9 +252,68 @@ curr[1-n]_input Current input value | |||
252 | Read only. | 252 | Read only. |
253 | 253 | ||
254 | 254 | ||
255 | ********* | 255 | ********** |
256 | * Other * | 256 | * Alarms * |
257 | ********* | 257 | ********** |
258 | |||
259 | Each channel or limit may have an associated alarm file, containing a | ||
260 | boolean value. 1 means than an alarm condition exists, 0 means no alarm. | ||
261 | |||
262 | Usually a given chip will either use channel-related alarms, or | ||
263 | limit-related alarms, not both. The driver should just reflect the hardware | ||
264 | implementation. | ||
265 | |||
266 | in[0-n]_alarm | ||
267 | fan[1-n]_alarm | ||
268 | temp[1-n]_alarm | ||
269 | Channel alarm | ||
270 | Boolean | ||
271 | Read-only | ||
272 | |||
273 | OR | ||
274 | |||
275 | in[0-n]_min_alarm | ||
276 | in[0-n]_max_alarm | ||
277 | fan[1-n]_min_alarm | ||
278 | temp[1-n]_min_alarm | ||
279 | temp[1-n]_max_alarm | ||
280 | temp[1-n]_crit_alarm | ||
281 | Limit alarm | ||
282 | Boolean | ||
283 | Read-only | ||
284 | |||
285 | Each input channel may have an associated fault file. This can be used | ||
286 | to notify open diodes, unconnected fans etc. where the hardware | ||
287 | supports it. When this boolean has value 1, the measurement for that | ||
288 | channel should not be trusted. | ||
289 | |||
290 | in[0-n]_input_fault | ||
291 | fan[1-n]_input_fault | ||
292 | temp[1-n]_input_fault | ||
293 | Input fault condition | ||
294 | Boolean | ||
295 | Read-only | ||
296 | |||
297 | Some chips also offer the possibility to get beeped when an alarm occurs: | ||
298 | |||
299 | beep_enable Master beep enable | ||
300 | Boolean | ||
301 | Read/Write | ||
302 | |||
303 | in[0-n]_beep | ||
304 | fan[1-n]_beep | ||
305 | temp[1-n]_beep | ||
306 | Channel beep | ||
307 | 0 to disable. | ||
308 | 1 to enable. | ||
309 | Read/write | ||
310 | |||
311 | In theory, a chip could provide per-limit beep masking, but no such chip | ||
312 | was seen so far. | ||
313 | |||
314 | Old drivers provided a different, non-standard interface to alarms and | ||
315 | beeps. These interface files are deprecated, but will be kept around | ||
316 | for compatibility reasons: | ||
258 | 317 | ||
259 | alarms Alarm bitmask. | 318 | alarms Alarm bitmask. |
260 | Read only. | 319 | Read only. |
@@ -265,33 +324,22 @@ alarms Alarm bitmask. | |||
265 | if it is still valid. | 324 | if it is still valid. |
266 | Generally a direct representation of a chip's internal | 325 | Generally a direct representation of a chip's internal |
267 | alarm registers; there is no standard for the position | 326 | alarm registers; there is no standard for the position |
268 | of individual bits. | 327 | of individual bits. For this reason, the use of this |
328 | interface file for new drivers is discouraged. Use | ||
329 | individual *_alarm and *_fault files instead. | ||
269 | Bits are defined in kernel/include/sensors.h. | 330 | Bits are defined in kernel/include/sensors.h. |
270 | 331 | ||
271 | alarms_in Alarm bitmask relative to in (voltage) channels | ||
272 | Read only | ||
273 | A '1' bit means an alarm, LSB corresponds to in0 and so on | ||
274 | Prefered to 'alarms' for newer chips | ||
275 | |||
276 | alarms_fan Alarm bitmask relative to fan channels | ||
277 | Read only | ||
278 | A '1' bit means an alarm, LSB corresponds to fan1 and so on | ||
279 | Prefered to 'alarms' for newer chips | ||
280 | |||
281 | alarms_temp Alarm bitmask relative to temp (temperature) channels | ||
282 | Read only | ||
283 | A '1' bit means an alarm, LSB corresponds to temp1 and so on | ||
284 | Prefered to 'alarms' for newer chips | ||
285 | |||
286 | beep_enable Beep/interrupt enable | ||
287 | 0 to disable. | ||
288 | 1 to enable. | ||
289 | Read/Write | ||
290 | |||
291 | beep_mask Bitmask for beep. | 332 | beep_mask Bitmask for beep. |
292 | Same format as 'alarms' with the same bit locations. | 333 | Same format as 'alarms' with the same bit locations, |
334 | use discouraged for the same reason. Use individual | ||
335 | *_beep files instead. | ||
293 | Read/Write | 336 | Read/Write |
294 | 337 | ||
338 | |||
339 | ********* | ||
340 | * Other * | ||
341 | ********* | ||
342 | |||
295 | eeprom Raw EEPROM data in binary form. | 343 | eeprom Raw EEPROM data in binary form. |
296 | Read only. | 344 | Read only. |
297 | 345 | ||