[PATCH 1/3] docs: thermal: Add bind, unbind information together with trip point
From: lukasz . luba
Date: Mon Dec 16 2019 - 09:06:49 EST
From: Lukasz Luba <lukasz.luba@xxxxxxx>
Update sysfs interface documentation about new attributes in the cooling
device folder: bind and unbind. It also updates the changed cooling device
associated trip point interface extending it by information about writable
values.
Signed-off-by: Lukasz Luba <lukasz.luba@xxxxxxx>
---
.../driver-api/thermal/sysfs-api.rst | 30 +++++++++++++++++--
1 file changed, 28 insertions(+), 2 deletions(-)
diff --git a/Documentation/driver-api/thermal/sysfs-api.rst b/Documentation/driver-api/thermal/sysfs-api.rst
index b40b1f839148..605f0d9ffe71 100644
--- a/Documentation/driver-api/thermal/sysfs-api.rst
+++ b/Documentation/driver-api/thermal/sysfs-api.rst
@@ -407,6 +407,8 @@ Thermal cooling device sys I/F, created once it's registered::
|---stats/time_in_state_ms: Time (msec) spent in various cooling states
|---stats/total_trans: Total number of times cooling state is changed
|---stats/trans_table: Cooing state transition table
+ |---bind_tz: Interface for binding cooling device to thermal zone
+ |---unbind_tz: Interface for unbinding cooling device from thermal zone
Then next two dynamic attributes are created/removed in pairs. They represent
@@ -507,9 +509,12 @@ available_policies
`cdev[0-*]_trip_point`
The trip point in this thermal zone which `cdev[0-*]` is associated
with; -1 means the cooling device is not associated with any trip
- point.
+ point. Writing a value (a proper integer) will set new trip point
+ to this cooling device. The value -1 will cause the cooling device
+ is not associated to any trip point and can be unbind from the
+ thermal zone.
- RO, Optional
+ RW, Optional
`cdev[0-*]_weight`
The influence of `cdev[0-*]` in this thermal zone. This value
@@ -637,6 +642,27 @@ max_state
RO, Required
+bind_tz
+ Writing the thermal zone name binds this cooling device with the
+ specified thermal zone. A new dynamic attributes 'cdev*' will be
+ created inside the thermal zone directory.
+ The proper thermal zone name can be from read the attribute:
+ /sys/class/thermal/thermal_zone*/type
+ The default (-1) trip point will be set into the cooling instance,
+ which should be updated later using 'cdev*_trip_point' interface.
+
+ WO, Required
+
+unbind_tz
+ Writing the thermal zone name unbinds this cooling device from
+ the specified thermal zone. The cooling instance needs to set -1
+ into the associated cooling device instance 'cdev*_trip_point'
+ first.
+ The proper thermal zone name can be read from the attribute:
+ /sys/class/thermal/thermal_zone*/type
+
+ WO, Required
+
cur_state
The current cooling state of this cooling device.
The value can any integer numbers between 0 and max_state:
--
2.17.1