• Home
  • Raw
  • Download

Lines Matching +full:1 +full:- +full:to +full:- +full:1

4 The libsensors library offers an interface to the raw sensors data
5 through the sysfs interface. Since lm-sensors 3.0.0, libsensors is
6 completely chip-independent. It assumes that all the kernel drivers
9 libsensors, and applications using it, do not need to be modified.
10 This is a major improvement compared to lm-sensors 2.
12 Note that motherboards vary widely in the connections to sensor chips.
14 temperature sensor is connected to the CPU, or that the second fan is on
19 can change from motherboard to motherboard, the conversions cannot be
20 hard coded into the driver and have to be done in user space.
22 For this reason, even if we aim at a chip-independent libsensors, it will
26 An alternative method that some programs use is to access the sysfs
30 will have to implement conversion, labeling and hiding of inputs. For
31 this reason, it is still not recommended to bypass the library.
33 Each chip gets its own directory in the sysfs /sys/devices tree. To
34 find all sensor chips, it is easier to follow the device symlinks from
37 Up to lm-sensors 3.0.0, libsensors looks for hardware monitoring attributes
38 in the "physical" device directory. Since lm-sensors 3.0.1, attributes found
40 (e.g. drivers for multifunction chips) may want to use this possibility to
50 threshold, "min" (low threshold). Numbering usually starts from 1,
54 specific chip. Other files do not refer to a specific element, so
58 make comparisons of readings to thresholds. This allows violations
59 between readings to be caught and alarmed. The exact definition of an
61 to cause an alarm) is chip-dependent.
69 ----------------
76 -------------------------------------------------------------------------
79 `[0-*]` denotes any positive number starting from 0
80 `[1-*]` denotes any positive number starting from 1
86 Read/write values may be read-only for some chips, depending on the
92 See Documentation/ABI/testing/sysfs-class-hwmon for a complete description
103 A descriptive label that allows to uniquely identify a device
114 `in[0-*]_min`
117 `in[0-*]_lcrit`
120 `in[0-*]_max`
123 `in[0-*]_crit`
126 `in[0-*]_input`
129 `in[0-*]_average`
132 `in[0-*]_lowest`
135 `in[0-*]_highest`
138 `in[0-*]_reset_history`
144 `in[0-*]_label`
147 `in[0-*]_enable`
150 `cpu[0-*]_vid`
156 `in[0-*]_rated_min`
159 `in[0-*]_rated_max`
169 `fan[1-*]_min`
172 `fan[1-*]_max`
175 `fan[1-*]_input`
178 `fan[1-*]_div`
181 `fan[1-*]_pulses`
184 `fan[1-*]_target`
187 `fan[1-*]_label`
190 `fan[1-*]_enable`
200 `pwm[1-*]`
203 `pwm[1-*]_enable`
206 `pwm[1-*]_mode`
207 direct current or pulse-width modulation.
209 `pwm[1-*]_freq`
212 `pwm[1-*]_auto_channels_temp`
216 `pwm[1-*]_auto_point[1-*]_pwm` / `pwm[1-*]_auto_point[1-*]_temp` / `pwm[1-*]_auto_point[1-*]_temp_h…
219 `temp[1-*]_auto_point[1-*]_pwm` / `temp[1-*]_auto_point[1-*]_temp` / `temp[1-*]_auto_point[1-*]_tem…
222 There is a third case where trip points are associated to both PWM output
223 channels and temperature channels: the PWM values are associated to PWM
224 output channels while the temperature values are associated to temperature
227 mapped to a given PWM output, this leads to several candidate PWM values.
228 The actual result is up to the chip, but in general the highest candidate
236 `temp[1-*]_type`
239 `temp[1-*]_max`
242 `temp[1-*]_min`
245 `temp[1-*]_max_hyst`
248 `temp[1-*]_min_hyst`
251 `temp[1-*]_input`
254 `temp[1-*]_crit`
258 `temp[1-*]_crit_hyst`
261 `temp[1-*]_emergency`
265 `temp[1-*]_emergency_hyst`
268 `temp[1-*]_lcrit`
272 `temp[1-*]_lcrit_hyst`
275 `temp[1-*]_offset`
276 Temperature offset which is added to the temperature reading
279 `temp[1-*]_label`
282 `temp[1-*]_lowest`
285 `temp[1-*]_highest`
288 `temp[1-*]_reset_history`
294 `temp[1-*]_enable`
297 `temp[1-*]_rated_min`
300 `temp[1-*]_rated_max`
305 back to a temperature (or the other way around for limits) requires
319 `curr[1-*]_max`
322 `curr[1-*]_min`
325 `curr[1-*]_lcrit`
328 `curr[1-*]_crit`
331 `curr[1-*]_input`
334 `curr[1-*]_average`
337 `curr[1-*]_lowest`
340 `curr[1-*]_highest`
343 `curr[1-*]_reset_history`
351 `curr[1-*]_enable`
354 `curr[1-*]_rated_min`
357 `curr[1-*]_rated_max`
366 `power[1-*]_average`
369 `power[1-*]_average_interval`
372 `power[1-*]_average_interval_max`
375 `power[1-*]_average_interval_min`
378 `power[1-*]_average_highest`
381 `power[1-*]_average_lowest`
384 `power[1-*]_average_max`
385 A poll notification is sent to `power[1-*]_average` when
388 `power[1-*]_average_min`
389 A poll notification is sent to `power[1-*]_average` when
392 `power[1-*]_input`
395 `power[1-*]_input_highest`
398 `power[1-*]_input_lowest`
401 `power[1-*]_reset_history`
405 `power[1-*]_accuracy`
408 `power[1-*]_cap`
410 system should take action to reduce power use.
412 `power[1-*]_cap_hyst`
415 `power[1-*]_cap_max`
418 `power[1-*]_cap_min`
421 `power[1-*]_max`
424 `power[1-*]_crit`
427 If power rises to or above this limit, the
428 system is expected take drastic action to reduce
436 `power[1-*]_enable`
440 -ENODATA.
442 - 1: Enable
443 - 0: Disable
447 `power[1-*]_rated_min`
454 `power[1-*]_rated_max`
467 `energy[1-*]_input`
474 `energy[1-*]_enable`
478 -ENODATA.
480 - 1: Enable
481 - 0: Disable
489 `humidity[1-*]_input`
492 `humidity[1-*]_enable`
495 `humidity[1-*]_rated_min`
498 `humidity[1-*]_rated_max`
506 boolean value. 1 means than an alarm condition exists, 0 means no alarm.
508 Usually a given chip will either use channel-related alarms, or
509 limit-related alarms, not both. The driver should just reflect the hardware
512 +-------------------------------+-----------------------+
513 | **`in[0-*]_alarm`, | Channel alarm |
514 | `curr[1-*]_alarm`, | |
515 | `power[1-*]_alarm`, | - 0: no alarm |
516 | `fan[1-*]_alarm`, | - 1: alarm |
517 | `temp[1-*]_alarm`** | |
519 +-------------------------------+-----------------------+
523 +-------------------------------+-----------------------+
524 | **`in[0-*]_min_alarm`, | Limit alarm |
525 | `in[0-*]_max_alarm`, | |
526 | `in[0-*]_lcrit_alarm`, | - 0: no alarm |
527 | `in[0-*]_crit_alarm`, | - 1: alarm |
528 | `curr[1-*]_min_alarm`, | |
529 | `curr[1-*]_max_alarm`, | RO |
530 | `curr[1-*]_lcrit_alarm`, | |
531 | `curr[1-*]_crit_alarm`, | |
532 | `power[1-*]_cap_alarm`, | |
533 | `power[1-*]_max_alarm`, | |
534 | `power[1-*]_crit_alarm`, | |
535 | `fan[1-*]_min_alarm`, | |
536 | `fan[1-*]_max_alarm`, | |
537 | `temp[1-*]_min_alarm`, | |
538 | `temp[1-*]_max_alarm`, | |
539 | `temp[1-*]_lcrit_alarm`, | |
540 | `temp[1-*]_crit_alarm`, | |
541 | `temp[1-*]_emergency_alarm`** | |
542 +-------------------------------+-----------------------+
545 to notify open diodes, unconnected fans etc. where the hardware
546 supports it. When this boolean has value 1, the measurement for that
549 `fan[1-*]_fault` / `temp[1-*]_fault`
552 Some chips also offer the possibility to get beeped when an alarm occurs:
557 `in[0-*]_beep`, `curr[1-*]_beep`, `fan[1-*]_beep`, `temp[1-*]_beep`,
560 In theory, a chip could provide per-limit beep masking, but no such chip
563 Old drivers provided a different, non-standard interface to alarms and
578 `intrusion[0-*]_alarm`
581 `intrusion[0-*]_beep`
589 attributes for controlling number of samples used to compute average.
591 +--------------+---------------------------------------------------------------+
595 +--------------+---------------------------------------------------------------+
599 | temp_samples | Note that on some devices it won't be possible to set all of |
600 | | them to different values so changing one might also change |
604 +--------------+---------------------------------------------------------------+
607 -------------------------------------
609 hwmon sysfs attributes always contain numbers, so the first thing to do is to
610 convert the input to a number, there are 2 ways todo this depending whether
620 code to the kernel.
622 Notice that it is important to always store the converted value in an
626 After the input string is converted to an (unsigned) long, the value should be
632 What to do if a value is found to be invalid, depends on the type of the
634 tempX_max or inX_max attribute, then the value should be clamped to its
637 -EINVAL should be returned.
639 Example1, temp1_max, register is a signed 8 bit value (-128 - 127 degrees)::
642 v = clamp_val(v, -128, 127);
643 /* write v to register */
650 case 2: v = 1; break;
654 return -EINVAL;
656 /* write v to register */