summaryrefslogtreecommitdiffstats
path: root/Documentation
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2018-04-13 19:52:26 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2018-04-13 19:52:26 -0400
commitba2b137d10bafc3cc514e52172b549e64a5402fb (patch)
tree1f57795b7555cc19e1453247e5e4bd27aa185a76 /Documentation
parent71893f116109c92e4cd230d990fad5bd7cb4f99d (diff)
parentb907b408ca64482989cd95dacef804ce509a3673 (diff)
Merge branch 'next' of git://git.kernel.org/pub/scm/linux/kernel/git/rzhang/linux
Pull thermal management update from Zhang Rui: - Fix race condition in imx_thermal_probe() (Mikhail Lappo) - Add cooling device's statistics in sysfs (Viresh Kumar) * 'next' of git://git.kernel.org/pub/scm/linux/kernel/git/rzhang/linux: thermal: Add cooling device's statistics in sysfs thermal: imx: Fix race condition in imx_thermal_probe()
Diffstat (limited to 'Documentation')
-rw-r--r--Documentation/thermal/sysfs-api.txt31
1 files changed, 31 insertions, 0 deletions
diff --git a/Documentation/thermal/sysfs-api.txt b/Documentation/thermal/sysfs-api.txt
index bb9a0a53e76b..911399730c1c 100644
--- a/Documentation/thermal/sysfs-api.txt
+++ b/Documentation/thermal/sysfs-api.txt
@@ -255,6 +255,7 @@ temperature) and throttle appropriate devices.
2552. sysfs attributes structure 2552. sysfs attributes structure
256 256
257RO read only value 257RO read only value
258WO write only value
258RW read/write value 259RW read/write value
259 260
260Thermal sysfs attributes will be represented under /sys/class/thermal. 261Thermal sysfs attributes will be represented under /sys/class/thermal.
@@ -286,6 +287,11 @@ Thermal cooling device sys I/F, created once it's registered:
286 |---type: Type of the cooling device(processor/fan/...) 287 |---type: Type of the cooling device(processor/fan/...)
287 |---max_state: Maximum cooling state of the cooling device 288 |---max_state: Maximum cooling state of the cooling device
288 |---cur_state: Current cooling state of the cooling device 289 |---cur_state: Current cooling state of the cooling device
290 |---stats: Directory containing cooling device's statistics
291 |---stats/reset: Writing any value resets the statistics
292 |---stats/time_in_state_ms: Time (msec) spent in various cooling states
293 |---stats/total_trans: Total number of times cooling state is changed
294 |---stats/trans_table: Cooing state transition table
289 295
290 296
291Then next two dynamic attributes are created/removed in pairs. They represent 297Then next two dynamic attributes are created/removed in pairs. They represent
@@ -490,6 +496,31 @@ cur_state
490 - cur_state == max_state means the maximum cooling. 496 - cur_state == max_state means the maximum cooling.
491 RW, Required 497 RW, Required
492 498
499stats/reset
500 Writing any value resets the cooling device's statistics.
501 WO, Required
502
503stats/time_in_state_ms:
504 The amount of time spent by the cooling device in various cooling
505 states. The output will have "<state> <time>" pair in each line, which
506 will mean this cooling device spent <time> msec of time at <state>.
507 Output will have one line for each of the supported states. usertime
508 units here is 10mS (similar to other time exported in /proc).
509 RO, Required
510
511stats/total_trans:
512 A single positive value showing the total number of times the state of a
513 cooling device is changed.
514 RO, Required
515
516stats/trans_table:
517 This gives fine grained information about all the cooling state
518 transitions. The cat output here is a two dimensional matrix, where an
519 entry <i,j> (row i, column j) represents the number of transitions from
520 State_i to State_j. If the transition table is bigger than PAGE_SIZE,
521 reading this will return an -EFBIG error.
522 RO, Required
523
4933. A simple implementation 5243. A simple implementation
494 525
495ACPI thermal zone may support multiple trip points like critical, hot, 526ACPI thermal zone may support multiple trip points like critical, hot,