diff mbox series

[1/3] docs: thermal: Add bind, unbind information together with trip point

Message ID 20191216140622.25467-2-lukasz.luba@arm.com (mailing list archive)
State Under Review
Delegated to: Daniel Lezcano
Headers show
Series Thermal extensions for flexibility in cooling device bindings | expand

Commit Message

Lukasz Luba Dec. 16, 2019, 2:06 p.m. UTC
From: Lukasz Luba <lukasz.luba@arm.com>

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

Signed-off-by: Lukasz Luba <lukasz.luba@arm.com>
 .../driver-api/thermal/sysfs-api.rst          | 30 +++++++++++++++++--
 1 file changed, 28 insertions(+), 2 deletions(-)
diff mbox series


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
 	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
 	The influence of `cdev[0-*]` in this thermal zone. This value
@@ -637,6 +642,27 @@  max_state
 	RO, Required
+	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
+	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
 	The current cooling state of this cooling device.
 	The value can any integer numbers between 0 and max_state: