Lines Matching +full:in +full:- +full:and +full:- +full:around
1 Naming and data format standards for sysfs files
5 through the sysfs interface. Since lm-sensors 3.0.0, libsensors is
6 completely chip-independent. It assumes that all the kernel drivers
7 implement the standard sysfs interface described in this document.
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.
17 voltages between 0 and +4V. Other voltages are scaled back into that
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
24 values conversion, labeling of inputs and hiding of unused inputs.
28 drivers follow, so that an application program can scan for entries and
29 access this data in a simple and consistent way. That said, such programs
30 will have to implement conversion, labeling and hiding of inputs. For
33 Each chip gets its own directory in the sysfs /sys/devices tree. To
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
39 in the hwmon "class" device directory are also supported. Complex drivers
42 libsensors won't support the driver in question.
48 types for sensor chips are "in" (voltage), "temp" (temperature) and
55 they have a simple name, and no number.
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
89 All entries (except name) are optional, and should only be created in a
92 See Documentation/ABI/testing/sysfs-class-hwmon for a complete description
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`
139 Reset inX_lowest and inX_highest
142 Reset inX_lowest and inX_highest for all sensors
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`
210 Base PWM frequency in Hz.
212 `pwm[1-*]_auto_channels_temp`
213 Select which temperature channels affect this PWM output in
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…
223 channels and temperature channels: the PWM values are associated to PWM
225 channels. In that case, the result is determined by the mapping between
226 temperature inputs and PWM outputs. When several temperature inputs are
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`
279 `temp[1-*]_label`
282 `temp[1-*]_lowest`
285 `temp[1-*]_highest`
288 `temp[1-*]_reset_history`
289 Reset temp_lowest and temp_highest
292 Reset temp_lowest and temp_highest for all sensors
294 `temp[1-*]_enable`
297 `temp[1-*]_rated_min`
300 `temp[1-*]_rated_max`
303 Some chips measure temperature using external thermistors and an ADC, and
305 back to a temperature (or the other way around for limits) requires
306 mathematical functions not available in the kernel, so the conversion
307 must occur in user space. For these chips, all temp* files described
308 above should contain values expressed in millivolt instead of millidegree
309 Celsius. In other words, such temperature channels are handled as voltage
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`
344 Reset currX_lowest and currX_highest
349 Reset currX_lowest and currX_highest for all sensors.
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`
402 Reset input_highest, input_lowest, average_highest and
405 `power[1-*]_accuracy`
408 `power[1-*]_cap`
412 `power[1-*]_cap_hyst`
413 Margin of hysteresis built around capping and notification.
415 `power[1-*]_cap_max`
418 `power[1-*]_cap_min`
421 `power[1-*]_max`
424 `power[1-*]_crit`
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`
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 +-------------------------------+-----------------------+
549 `fan[1-*]_fault` / `temp[1-*]_fault`
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
564 beeps. These interface files are deprecated, but will be kept around
578 `intrusion[0-*]_alarm`
581 `intrusion[0-*]_beep`
588 Devices allowing for reading {in,power,curr,temp}_average values may export
591 +--------------+---------------------------------------------------------------+
595 +--------------+---------------------------------------------------------------+
604 +--------------+---------------------------------------------------------------+
607 -------------------------------------
617 Notice that we do not use the second argument of strto[u]l, and thus cannot
622 Notice that it is important to always store the converted value in an
623 unsigned long or long, so that no wrap around can happen before any further
629 around before the check. For example do not multiply the result, and only
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);
645 Example2, fan divider setting, valid values 2, 4 and 8::
654 return -EINVAL;