Lines Matching +full:point +full:- +full:to +full:- +full:point
2 Generic Thermal Sysfs driver How To
16 devices (sensors) and thermal cooling devices (fan, processor...) to register
17 with the thermal management solution and to be a part of it.
19 This how-to focuses on enabling new thermal zone and cooling devices to
22 and cooling devices should be able to make use of the infrastructure.
24 The main task of the thermal sysfs driver is to expose thermal zone attributes
25 as well as cooling device attributes to the user space.
27 inputs from thermal zone attributes (the current temperature and trip point
30 - `[0-*]` denotes any positive number starting from 0
31 - `[1-*]` denotes any positive number starting from 1
37 ---------------------------------
48 This interface function adds a new thermal zone device (sensor) to
49 /sys/class/thermal folder as `thermal_zone[0-*]`. It tries to bind all the
57 Bit string: If 'n'th bit is set, then trip point 'n' is writeable.
61 thermal zone device call-backs.
76 - "enabled" means the kernel thermal management is
78 - "disabled" will prevent kernel thermal driver action
84 get the type of certain trip point.
86 get the temperature above which the certain trip point
94 number of milliseconds to wait between polls when
97 number of milliseconds to wait between polls when checking
115 This interface adds a new sensor to a DT thermal zone.
117 device tree and look for the zone that refer to the sensor device
118 pointed by dev->of_node as temperature providers. For the zone
119 pointing to the sensor node, the sensor will be added to the DT
126 dev->of_node.
137 get_temp a pointer to a function that reads the
140 set_trips a pointer to a function that sets a
144 get_trend a pointer to a function that reads the
146 set_emul_temp a pointer to a function that sets
184 The benefit of using this interface to register sensor is that it
185 is not require to explicitly call thermal_zone_of_sensor_unregister()
198 Normally this function will not need to be called and the resource
205 This interface is used to read the slope attribute value
213 This interface is used to read the offset attribute value
218 ------------------------------------
228 to /sys/class/thermal/ folder as `cooling_device[0-*]`. It tries to bind itself
229 to all the thermal zone devices registered at the same time.
236 thermal cooling devices call-backs.
255 -----------------------------------------------------------------------------
263 This interface function binds a thermal cooling device to a particular trip
264 point of a thermal zone device.
273 indicates which trip point in this thermal zone the cooling device
276 the Maximum cooling state for this trip point.
280 the Minimum cooling state can be used for this trip point.
293 trip point of a thermal zone device. This function is usually called in
301 indicates which trip point in this thermal zone the cooling device
305 ---------------------------
311 This structure defines the following parameters that are used to bind
312 a zone with a cooling device for a particular trip point.
318 zone. This is relative to the rest of the cooling
323 contribute to the cooling of this zone unless all cooling
328 this thermal zone and cdev, for a particular trip point.
330 for trip point n.
334 array consisting of tuples <lower-state upper-state> of
338 These limits are used when binding a cdev to a trip point.
340 This call back returns success(0) if the 'tz and cdev' need to
349 This is an optional feature where some platforms can choose not to
355 a boolean to indicate if the thermal to hwmon sysfs interface
380 /sys/class/thermal/thermal_zone[0-*]:
381 |---type: Type of the thermal zone
382 |---temp: Current temperature
383 |---mode: Working mode of the thermal zone
384 |---policy: Thermal governor used for this zone
385 |---available_policies: Available thermal governors for this zone
386 |---trip_point_[0-*]_temp: Trip point temperature
387 |---trip_point_[0-*]_type: Trip point type
388 |---trip_point_[0-*]_hyst: Hysteresis value for this trip point
389 |---emul_temp: Emulated temperature set node
390 |---sustainable_power: Sustainable dissipatable power
391 |---k_po: Proportional term during temperature overshoot
392 |---k_pu: Proportional term during temperature undershoot
393 |---k_i: PID's integral term in the power allocator gov
394 |---k_d: PID's derivative term in the power allocator
395 |---integral_cutoff: Offset above which errors are accumulated
396 |---slope: Slope constant applied as linear extrapolation
397 |---offset: Offset constant applied as linear extrapolation
401 /sys/class/thermal/cooling_device[0-*]:
402 |---type: Type of the cooling device(processor/fan/...)
403 |---max_state: Maximum cooling state of the cooling device
404 |---cur_state: Current cooling state of the cooling device
405 |---stats: Directory containing cooling device's statistics
406 |---stats/reset: Writing any value resets the statistics
407 |---stats/time_in_state_ms: Time (msec) spent in various cooling states
408 |---stats/total_trans: Total number of times cooling state is changed
409 |---stats/trans_table: Cooing state transition table
419 /sys/class/thermal/thermal_zone[0-*]:
420 |---cdev[0-*]: [0-*]th cooling device in current thermal zone
421 |---cdev[0-*]_trip_point: Trip point that cdev[0-*] is associated with
422 |---cdev[0-*]_weight: Influence of the cooling device in
433 /sys/class/hwmon/hwmon[0-*]:
434 |---name: The type of the thermal zone devices
435 |---temp[1-*]_input: The current temperature of thermal zone [1-*]
436 |---temp[1-*]_critical: The critical trip point of thermal zone [1-*]
438 Please read Documentation/hwmon/sysfs-interface.rst for additional information.
441 -----------------------
447 In order to keep it consistent with hwmon sys attribute; this should
481 `trip_point_[0-*]_temp`
482 The temperature above which trip point will be fired.
488 `trip_point_[0-*]_type`
489 Strings which indicate the type of the trip point.
491 E.g. it can be one of critical, hot, passive, `active[0-*]` for ACPI
496 `trip_point_[0-*]_hyst`
497 The hysteresis value for a trip point, represented as an integer
501 `cdev[0-*]`
502 Sysfs link to the thermal cooling device node where the sys I/F
507 `cdev[0-*]_trip_point`
508 The trip point in this thermal zone which `cdev[0-*]` is associated
509 with; -1 means the cooling device is not associated with any trip
510 point.
514 `cdev[0-*]_weight`
515 The influence of `cdev[0-*]` in this thermal zone. This value
516 is relative to the rest of cooling devices in the thermal
526 and can be set to a temperature (in millidegrees) to enable a
527 passive trip point for the zone. Activation is done by polling with
537 Interface to set the emulated temperature method in thermal zone
539 this temperature to platform emulation function if registered or
555 more information see Documentation/driver-api/thermal/power_allocator.rst
565 temperature" trip point. For more information see
566 Documentation/driver-api/thermal/power_allocator.rst
574 temperature" trip point. For more information see
575 Documentation/driver-api/thermal/power_allocator.rst
581 controller. This term allows the PID controller to compensate
583 Documentation/driver-api/thermal/power_allocator.rst
590 Documentation/driver-api/thermal/power_allocator.rst
595 Temperature offset from the desired temperature trip point
600 temperature trip point. For more information see
601 Documentation/driver-api/thermal/power_allocator.rst
609 to determine a hotspot temperature based off the sensor's
610 raw readings. It is up to the device driver to determine
617 to determine a hotspot temperature based off the sensor's
618 raw readings. It is up to the device driver to determine
624 -------------------------
629 - for generic ACPI: should be "Fan", "Processor" or "LCD"
630 - for memory controller device on intel_menlow platform:
644 - cur_state == 0 means no cooling
645 - cur_state == max_state means the maximum cooling.
658 units here is 10mS (similar to other time exported in /proc).
672 State_i to State_j. If the transition table is bigger than PAGE_SIZE,
673 reading this will return an -EFBIG error.
684 thermal_cooling_device. Both are considered to have the same
692 |---type: acpitz
693 |---temp: 37000
694 |---mode: enabled
695 |---policy: step_wise
696 |---available_policies: step_wise fair_share
697 |---trip_point_0_temp: 100000
698 |---trip_point_0_type: critical
699 |---trip_point_1_temp: 80000
700 |---trip_point_1_type: passive
701 |---trip_point_2_temp: 70000
702 |---trip_point_2_type: active0
703 |---trip_point_3_temp: 60000
704 |---trip_point_3_type: active1
705 |---cdev0: --->/sys/class/thermal/cooling_device0
706 |---cdev0_trip_point: 1 /* cdev0 can be used for passive */
707 |---cdev0_weight: 1024
708 |---cdev1: --->/sys/class/thermal/cooling_device3
709 |---cdev1_trip_point: 2 /* cdev1 can be used for active[0]*/
710 |---cdev1_weight: 1024
713 |---type: Processor
714 |---max_state: 8
715 |---cur_state: 0
718 |---type: Fan
719 |---max_state: 2
720 |---cur_state: 0
724 |---name: acpitz
725 |---temp1_input: 37000
726 |---temp1_crit: 100000
732 -----------------
736 are supposed to implement the callback. If they don't, the thermal
741 -------------------------
743 This function returns the thermal_instance corresponding to a given
748 -----------------------------
751 throttling the cooling devices according to the policy configured.
758 ------------------------
760 This function serves as an arbitrator to set the state of a cooling
761 device. It sets the cooling device to the deepest cooling state if
768 allows the system to shutdown gracefully by calling orderly_poweroff().
769 In the event of a failure of orderly_poweroff() to shut down the system
771 temperatures. To mitigate this high risk scenario we program a work
772 queue to fire after a pre-determined number of seconds to start
777 The delay should be carefully profiled so as to give adequate time for
782 If set to 0 emergency poweroff will not be supported. So a carefully
783 profiled non-zero positive value is a must for emergerncy poweroff to be