lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20191216140622.25467-2-lukasz.luba@arm.com>
Date:   Mon, 16 Dec 2019 14:06:20 +0000
From:   lukasz.luba@....com
To:     linux-kernel@...r.kernel.org, rui.zhang@...el.com,
        daniel.lezcano@...aro.org, linux-pm@...r.kernel.org,
        linux-doc@...r.kernel.org
Cc:     amit.kucheria@...durent.com, corbet@....net, lukasz.luba@....com,
        dietmar.eggemann@....com
Subject: [PATCH  1/3] docs: thermal: Add bind, unbind information together with trip point

From: Lukasz Luba <lukasz.luba@....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
values.

Signed-off-by: Lukasz Luba <lukasz.luba@....com>
---
 .../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

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ