From: lukasz.luba@arm.com
To: linux-kernel@vger.kernel.org, rui.zhang@intel.com,
daniel.lezcano@linaro.org, linux-pm@vger.kernel.org,
linux-doc@vger.kernel.org
Cc: amit.kucheria@verdurent.com, corbet@lwn.net, lukasz.luba@arm.com,
dietmar.eggemann@arm.com
Subject: [PATCH 1/3] docs: thermal: Add bind, unbind information together with trip point
Date: Mon, 16 Dec 2019 14:06:20 +0000 [thread overview]
Message-ID: <20191216140622.25467-2-lukasz.luba@arm.com> (raw)
In-Reply-To: <20191216140622.25467-1-lukasz.luba@arm.com>
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
values.
Signed-off-by: Lukasz Luba <lukasz.luba@arm.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
next prev parent reply other threads:[~2019-12-16 14:06 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-12-16 14:06 [PATCH 0/3] Thermal extensions for flexibility in cooling device bindings lukasz.luba
2019-12-16 14:06 ` lukasz.luba [this message]
2019-12-16 14:06 ` [PATCH 2/3] thermal: Make cooling device trip point writable from sysfs lukasz.luba
2019-12-16 14:06 ` [PATCH 3/3] thermal: Add sysfs binding for cooling device and thermal zone lukasz.luba
2020-03-13 13:33 ` [PATCH 0/3] Thermal extensions for flexibility in cooling device bindings Daniel Lezcano
2020-03-13 15:28 ` Lukasz Luba
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20191216140622.25467-2-lukasz.luba@arm.com \
--to=lukasz.luba@arm.com \
--cc=amit.kucheria@verdurent.com \
--cc=corbet@lwn.net \
--cc=daniel.lezcano@linaro.org \
--cc=dietmar.eggemann@arm.com \
--cc=linux-doc@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pm@vger.kernel.org \
--cc=rui.zhang@intel.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).