<feed xmlns='http://www.w3.org/2005/Atom'>
<title>user/sven/linux.git/include/linux/thermal.h, branch v5.9.8</title>
<subtitle>Linux Kernel
</subtitle>
<id>https://git.stealer.net/cgit.cgi/user/sven/linux.git/atom?h=v5.9.8</id>
<link rel='self' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/atom?h=v5.9.8'/>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/'/>
<updated>2020-07-07T13:55:21Z</updated>
<entry>
<title>thermal: core: genetlink support for events/cmd/sampling</title>
<updated>2020-07-07T13:55:21Z</updated>
<author>
<name>Daniel Lezcano</name>
<email>daniel.lezcano@linaro.org</email>
</author>
<published>2020-07-06T10:55:37Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=1ce50e7d408ef2bdc8ca021363fd46d1b8bfad00'/>
<id>urn:sha1:1ce50e7d408ef2bdc8ca021363fd46d1b8bfad00</id>
<content type='text'>
Initially the thermal framework had a very simple notification
mechanism to send generic netlink messages to the userspace.

The notification function was never called from anywhere and the
corresponding dead code was removed. It was probably a first attempt
to introduce the netlink notification.

At LPC2018, the presentation "Linux thermal: User kernel interface",
proposed to create the notifications to the userspace via a kfifo.

The advantage of the kfifo is the performance. It is usually used from
a 1:1 communication channel where a driver captures data and sends it
as fast as possible to a userspace process.

The drawback is that only one process uses the notification channel
exclusively, thus no other process is allowed to use the channel to
get temperature or notifications.

This patch defines a generic netlink API to discover the current
thermal setup and adds event notifications as well as temperature
sampling. As any genetlink protocol, it can evolve and the versioning
allows to keep the backward compatibility.

In order to prevent the user from getting flooded with data on a
single channel, there are two multicast channels, one for the
temperature sampling when the thermal zone is updated and another one
for the events, so the user can get the events only without the
thermal zone temperature sampling.

Also, a list of commands to discover the thermal setup is added and
can be extended when needed.

Reviewed-by: Amit Kucheria &lt;amit.kucheria@linaro.org&gt;
Signed-off-by: Daniel Lezcano &lt;daniel.lezcano@linaro.org&gt;
Acked-by: Zhang Rui &lt;rui.zhang@intel.com&gt;
Link: https://lore.kernel.org/r/20200706105538.2159-3-daniel.lezcano@linaro.org
</content>
</entry>
<entry>
<title>thermal: Make thermal_zone_device_is_enabled() available to core only</title>
<updated>2020-07-06T23:26:07Z</updated>
<author>
<name>Andrzej Pietrasiewicz</name>
<email>andrzej.p@collabora.com</email>
</author>
<published>2020-07-03T10:43:54Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=514acd00f957afa9b2a1fd521b2f180a950ee5e3'/>
<id>urn:sha1:514acd00f957afa9b2a1fd521b2f180a950ee5e3</id>
<content type='text'>
This function is not needed by drivers.

Signed-off-by: Andrzej Pietrasiewicz &lt;andrzej.p@collabora.com&gt;
Signed-off-by: Daniel Lezcano &lt;daniel.lezcano@linaro.org&gt;
Link: https://lore.kernel.org/r/20200703104354.19657-4-andrzej.p@collabora.com
</content>
</entry>
<entry>
<title>thermal: Rename set_mode() to change_mode()</title>
<updated>2020-06-29T18:26:39Z</updated>
<author>
<name>Andrzej Pietrasiewicz</name>
<email>andrzej.p@collabora.com</email>
</author>
<published>2020-06-29T12:29:25Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=f5e50bf4d3ef0aba4d5414c9ed51fa4a02e2ed12'/>
<id>urn:sha1:f5e50bf4d3ef0aba4d5414c9ed51fa4a02e2ed12</id>
<content type='text'>
set_mode() is only called when tzd's mode is about to change. Actual
setting is performed in thermal_core, in thermal_zone_device_set_mode().
The meaning of set_mode() callback is actually to notify the driver about
the mode being changed and giving the driver a chance to oppose such
change.

To better reflect the purpose of the method rename it to change_mode()

Signed-off-by: Andrzej Pietrasiewicz &lt;andrzej.p@collabora.com&gt;
[for acerhdf]
Acked-by: Peter Kaestle &lt;peter@piie.net&gt;
Reviewed-by: Bartlomiej Zolnierkiewicz &lt;b.zolnierkie@samsung.com&gt;
Reviewed-by: Amit Kucheria &lt;amit.kucheria@linaro.org&gt;
Signed-off-by: Daniel Lezcano &lt;daniel.lezcano@linaro.org&gt;
Link: https://lore.kernel.org/r/20200629122925.21729-12-andrzej.p@collabora.com
</content>
</entry>
<entry>
<title>thermal: Add mode helpers</title>
<updated>2020-06-29T18:26:36Z</updated>
<author>
<name>Andrzej Pietrasiewicz</name>
<email>andrzej.p@collabora.com</email>
</author>
<published>2020-06-29T12:29:20Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=ac5d9ecc74d8beee8c87f1441e4adaf4e9fe90c5'/>
<id>urn:sha1:ac5d9ecc74d8beee8c87f1441e4adaf4e9fe90c5</id>
<content type='text'>
Prepare for making the drivers not access tzd's private members.

Signed-off-by: Andrzej Pietrasiewicz &lt;andrzej.p@collabora.com&gt;
Reviewed-by: Bartlomiej Zolnierkiewicz &lt;b.zolnierkie@samsung.com&gt;
[staticize thermal_zone_device_set_mode()]
Signed-off-by: kernel test robot &lt;lkp@intel.com&gt;
Signed-off-by: Daniel Lezcano &lt;daniel.lezcano@linaro.org&gt;
Link: https://lore.kernel.org/r/20200629122925.21729-7-andrzej.p@collabora.com
</content>
</entry>
<entry>
<title>thermal: remove get_mode() operation of drivers</title>
<updated>2020-06-29T18:26:35Z</updated>
<author>
<name>Andrzej Pietrasiewicz</name>
<email>andrzej.p@collabora.com</email>
</author>
<published>2020-06-29T12:29:19Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=1ee14820fd8ee79c4fc191155f48c985f28040e2'/>
<id>urn:sha1:1ee14820fd8ee79c4fc191155f48c985f28040e2</id>
<content type='text'>
get_mode() is now redundant, as the state is stored in struct
thermal_zone_device.

Consequently the "mode" attribute in sysfs can always be visible, because
it is always possible to get the mode from struct tzd.

Signed-off-by: Andrzej Pietrasiewicz &lt;andrzej.p@collabora.com&gt;
[for acerhdf]
Acked-by: Peter Kaestle &lt;peter@piie.net&gt;
Reviewed-by: Bartlomiej Zolnierkiewicz &lt;b.zolnierkie@samsung.com&gt;
Reviewed-by: Amit Kucheria &lt;amit.kucheria@linaro.org&gt;
Signed-off-by: Daniel Lezcano &lt;daniel.lezcano@linaro.org&gt;
Link: https://lore.kernel.org/r/20200629122925.21729-6-andrzej.p@collabora.com
</content>
</entry>
<entry>
<title>thermal: Add current mode to thermal zone device</title>
<updated>2020-06-29T18:26:34Z</updated>
<author>
<name>Andrzej Pietrasiewicz</name>
<email>andrzej.p@collabora.com</email>
</author>
<published>2020-06-29T12:29:17Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=cbba1d719534b77b857267890b0f54f0f0a90de4'/>
<id>urn:sha1:cbba1d719534b77b857267890b0f54f0f0a90de4</id>
<content type='text'>
Prepare for changing the place where the mode is stored: now it is in
drivers, which might or might not implement get_mode()/set_mode() methods.
A lot of cleanup can be done thanks to storing it in struct tzd. The
get_mode() methods will become redundant.

Signed-off-by: Andrzej Pietrasiewicz &lt;andrzej.p@collabora.com&gt;
Reviewed-by: Guenter Roeck &lt;linux@roeck-us.net&gt;
Reviewed-by: Bartlomiej Zolnierkiewicz &lt;b.zolnierkie@samsung.com&gt;
Reviewed-by: Amit Kucheria &lt;amit.kucheria@linaro.org&gt;
Signed-off-by: Daniel Lezcano &lt;daniel.lezcano@linaro.org&gt;
Link: https://lore.kernel.org/r/20200629122925.21729-4-andrzej.p@collabora.com
</content>
</entry>
<entry>
<title>thermal: Remove thermal_zone_device_update() stub</title>
<updated>2020-04-14T09:41:12Z</updated>
<author>
<name>Daniel Lezcano</name>
<email>daniel.lezcano@linaro.org</email>
</author>
<published>2020-04-02T14:27:47Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=0145f67866b71e8c1da3c1d9412623db7ba8a0c8'/>
<id>urn:sha1:0145f67866b71e8c1da3c1d9412623db7ba8a0c8</id>
<content type='text'>
All users of the function depends on THERMAL, no stub is
needed. Remove it.

Signed-off-by: Daniel Lezcano &lt;daniel.lezcano@linaro.org&gt;
Reviewed-by: Amit Kucheria &lt;amit.kucheria@linaro.org&gt;
Acked-by: Zhang Rui &lt;rui.zhang@intel.com&gt;
Link: https://lore.kernel.org/r/20200402142747.8307-9-daniel.lezcano@linaro.org
</content>
</entry>
<entry>
<title>thermal: Remove stubs for thermal_zone_[un]bind_cooling_device</title>
<updated>2020-04-14T09:41:12Z</updated>
<author>
<name>Daniel Lezcano</name>
<email>daniel.lezcano@linaro.org</email>
</author>
<published>2020-04-02T14:27:46Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=708418500644c248d6f266e4df0bf43ce53bf746'/>
<id>urn:sha1:708418500644c248d6f266e4df0bf43ce53bf746</id>
<content type='text'>
All callers of the functions depends on THERMAL, it is pointless to
define stubs. Remove them.

Signed-off-by: Daniel Lezcano &lt;daniel.lezcano@linaro.org&gt;
Reviewed-by: Amit Kucheria &lt;amit.kucheria@linaro.org&gt;
Acked-by: Zhang Rui &lt;rui.zhang@intel.com&gt;
Link: https://lore.kernel.org/r/20200402142747.8307-8-daniel.lezcano@linaro.org
</content>
</entry>
<entry>
<title>thermal: Change IS_ENABLED to IFDEF in the header file</title>
<updated>2020-04-14T09:41:12Z</updated>
<author>
<name>Daniel Lezcano</name>
<email>daniel.lezcano@linaro.org</email>
</author>
<published>2020-04-02T14:27:45Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=60518260cab21e749704baa5246ff13f7559fa91'/>
<id>urn:sha1:60518260cab21e749704baa5246ff13f7559fa91</id>
<content type='text'>
The thermal framework can not be compiled as a module. The IS_ENABLED
macro is useless here and can be replaced by an ifdef.

Signed-off-by: Daniel Lezcano &lt;daniel.lezcano@linaro.org&gt;
Reviewed-by: Amit Kucheria &lt;amit.kucheria@linaro.org&gt;
Acked-by: Zhang Rui &lt;rui.zhang@intel.com&gt;
Link: https://lore.kernel.org/r/20200402142747.8307-7-daniel.lezcano@linaro.org
</content>
</entry>
<entry>
<title>thermal: Move get_thermal_instance to the internal header</title>
<updated>2020-04-14T09:41:12Z</updated>
<author>
<name>Daniel Lezcano</name>
<email>daniel.lezcano@linaro.org</email>
</author>
<published>2020-04-02T14:27:44Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=06f1041f5023c00a54f63c269b997c61d1b3b739'/>
<id>urn:sha1:06f1041f5023c00a54f63c269b997c61d1b3b739</id>
<content type='text'>
The function is not used any place other than the thermal
directory. It does not make sense to export its definition in the
global header as there is no use of it.

Move the definition to the internal header and allow better
self-encapsulation.

Take the opportunity to add the parameter names to make checkpatch
happy and remove the pointless stubs.

Signed-off-by: Daniel Lezcano &lt;daniel.lezcano@linaro.org&gt;
Reviewed-by: Amit Kucheria &lt;amit.kucheria@linaro.org&gt;
Acked-by: Zhang Rui &lt;rui.zhang@intel.com&gt;
Link: https://lore.kernel.org/r/20200402142747.8307-6-daniel.lezcano@linaro.org
</content>
</entry>
</feed>
