<feed xmlns='http://www.w3.org/2005/Atom'>
<title>user/sven/linux.git/include/linux/thermal.h, branch v4.9.53</title>
<subtitle>Linux Kernel
</subtitle>
<id>https://git.stealer.net/cgit.cgi/user/sven/linux.git/atom?h=v4.9.53</id>
<link rel='self' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/atom?h=v4.9.53'/>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/'/>
<updated>2016-09-27T06:35:21Z</updated>
<entry>
<title>thermal: Enhance thermal_zone_device_update for events</title>
<updated>2016-09-27T06:35:21Z</updated>
<author>
<name>Srinivas Pandruvada</name>
<email>srinivas.pandruvada@linux.intel.com</email>
</author>
<published>2016-08-26T23:21:16Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=0e70f466fb910ae54c4c71243b99385129e93feb'/>
<id>urn:sha1:0e70f466fb910ae54c4c71243b99385129e93feb</id>
<content type='text'>
Added one additional parameter to thermal_zone_device_update() to provide
caller with an optional capability to specify reason.
Currently this event is used by user space governor to trigger different
processing based on event code. Also it saves an additional call to read
temperature when the event is received.
The following events are cuurently defined:
- Unspecified event
- New temperature sample
- Trip point violated
- Trip point changed
- thermal device up and down
- thermal device power capability changed

Signed-off-by: Srinivas Pandruvada &lt;srinivas.pandruvada@linux.intel.com&gt;
Signed-off-by: Zhang Rui &lt;rui.zhang@intel.com&gt;
</content>
</entry>
<entry>
<title>thermal: streamline get_trend callbacks</title>
<updated>2016-09-27T06:02:16Z</updated>
<author>
<name>Sascha Hauer</name>
<email>s.hauer@pengutronix.de</email>
</author>
<published>2016-06-22T08:42:03Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=e78eaf45993a51e5d7120de48aa01f059ffe8d37'/>
<id>urn:sha1:e78eaf45993a51e5d7120de48aa01f059ffe8d37</id>
<content type='text'>
The .get_trend callback in struct thermal_zone_device_ops has
the prototype:
        int (*get_trend) (struct thermal_zone_device *, int,
                          enum thermal_trend *);
whereas the .get_trend callback in struct thermal_zone_of_device_ops
has:
        int (*get_trend)(void *, long *);

Streamline both prototypes and add the trip argument to the OF callback
aswell and use enum thermal_trend * instead of an integer pointer.

While the OF prototype may be the better one, this should be decided at
framework level and not on OF level.

Signed-off-by: Sascha Hauer &lt;s.hauer@pengutronix.de&gt;
Signed-off-by: Caesar Wang &lt;wxt@rock-chips.com&gt;
Cc: Zhang Rui &lt;rui.zhang@intel.com&gt;
Cc: Eduardo Valentin &lt;edubezval@gmail.com&gt;
Cc: linux-pm@vger.kernel.org
Reviewed-by: Keerthy &lt;j-keerthy@ti.com&gt;
Signed-off-by: Eduardo Valentin &lt;edubezval@gmail.com&gt;
Signed-off-by: Zhang Rui &lt;rui.zhang@intel.com&gt;
</content>
</entry>
<entry>
<title>thermal: of: implement .set_trips for device tree thermal zones</title>
<updated>2016-09-27T06:02:16Z</updated>
<author>
<name>Sascha Hauer</name>
<email>s.hauer@pengutronix.de</email>
</author>
<published>2016-06-22T08:42:02Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=826386e73193e0b58c6d797fbbab409bc98b1d9c'/>
<id>urn:sha1:826386e73193e0b58c6d797fbbab409bc98b1d9c</id>
<content type='text'>
This patch implements .set_trips for device tree thermal zones.
As the hardware-tracked trip points is supported by thermal core patch[0].

patch[0]
"thermal: Add support for hardware-tracked trip points".

Signed-off-by: Sascha Hauer &lt;s.hauer@pengutronix.de&gt;
Signed-off-by: Caesar Wang &lt;wxt@rock-chips.com&gt;
Cc: Zhang Rui &lt;rui.zhang@intel.com&gt;
Cc: Eduardo Valentin &lt;edubezval@gmail.com&gt;
Reviewed-by: Javi Merino &lt;javi.merino@arm.com&gt;
Signed-off-by: Eduardo Valentin &lt;edubezval@gmail.com&gt;
Signed-off-by: Zhang Rui &lt;rui.zhang@intel.com&gt;
</content>
</entry>
<entry>
<title>thermal: Add support for hardware-tracked trip points</title>
<updated>2016-09-27T06:02:16Z</updated>
<author>
<name>Sascha Hauer</name>
<email>s.hauer@pengutronix.de</email>
</author>
<published>2016-06-22T08:42:01Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=060c034a974187e930b790957cafc5047cc30a40'/>
<id>urn:sha1:060c034a974187e930b790957cafc5047cc30a40</id>
<content type='text'>
This adds support for hardware-tracked trip points to the device tree
thermal sensor framework.

The framework supports an arbitrary number of trip points. Whenever
the current temperature is updated, the trip points immediately
below and above the current temperature are found. A .set_trips
callback is then called with the temperatures. If there is no trip
point above or below the current temperature, the passed trip
temperature will be -INT_MAX or INT_MAX respectively. In this callback,
the driver should program the hardware such that it is notified
when either of these trip points are triggered. When a trip point
is triggered, the driver should call `thermal_zone_device_update'
for the respective thermal zone. This will cause the trip points
to be updated again.

If .set_trips is not implemented, the framework behaves as before.

This patch is based on an earlier version from Mikko Perttunen
&lt;mikko.perttunen@kapsi.fi&gt;

Signed-off-by: Sascha Hauer &lt;s.hauer@pengutronix.de&gt;
Signed-off-by: Caesar Wang &lt;wxt@rock-chips.com&gt;
Cc: Zhang Rui &lt;rui.zhang@intel.com&gt;
Cc: Eduardo Valentin &lt;edubezval@gmail.com&gt;
Cc: linux-pm@vger.kernel.org
Reviewed-by: Javi Merino &lt;javi.merino@arm.com&gt;
Signed-off-by: Eduardo Valentin &lt;edubezval@gmail.com&gt;
Signed-off-by: Zhang Rui &lt;rui.zhang@intel.com&gt;
</content>
</entry>
<entry>
<title>thermal: core: export apis to get slope and offset</title>
<updated>2016-09-27T06:02:16Z</updated>
<author>
<name>Rajendra Nayak</name>
<email>rnayak@codeaurora.org</email>
</author>
<published>2016-05-05T08:51:42Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=4a7069a32c99a81950de035535b0a064dcceaeba'/>
<id>urn:sha1:4a7069a32c99a81950de035535b0a064dcceaeba</id>
<content type='text'>
Add apis for platform thermal drivers to query for slope and offset
attributes, which might be needed for temperature calculations.

Signed-off-by: Rajendra Nayak &lt;rnayak@codeaurora.org&gt;
Signed-off-by: Eduardo Valentin &lt;edubezval@gmail.com&gt;
Signed-off-by: Zhang Rui &lt;rui.zhang@intel.com&gt;
</content>
</entry>
<entry>
<title>thermal: add the note for set_trip_temp</title>
<updated>2016-06-01T14:25:48Z</updated>
<author>
<name>Caesar Wang</name>
<email>wxt@rock-chips.com</email>
</author>
<published>2016-05-18T15:01:39Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=5a5e78cd706ce0577ed6356634a34552c866cc10'/>
<id>urn:sha1:5a5e78cd706ce0577ed6356634a34552c866cc10</id>
<content type='text'>
Fixes commit 60f9ce3ada53
("thermal: of-thermal: allow setting trip_temp on hardware")

Signed-off-by: Caesar Wang &lt;wxt@rock-chips.com&gt;
Cc: Zhang Rui &lt;rui.zhang@intel.com&gt;
Cc: Eduardo Valentin &lt;edubezval@gmail.com&gt;
Cc: linux-pm@vger.kernel.org
Signed-off-by: Zhang Rui &lt;rui.zhang@intel.com&gt;
</content>
</entry>
<entry>
<title>thermal: of-thermal: allow setting trip_temp on hardware</title>
<updated>2016-05-17T14:28:28Z</updated>
<author>
<name>Wei Ni</name>
<email>wni@nvidia.com</email>
</author>
<published>2016-03-29T10:29:17Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=c35095215a80b13af2f521e1ab1c727a5224e53b'/>
<id>urn:sha1:c35095215a80b13af2f521e1ab1c727a5224e53b</id>
<content type='text'>
In current of-thermal, the .set_trip_temp only support to
set trip_temp for SW. But some sensors support to set
trip_temp on hardware, so that can trigger interrupt,
shutdown or any other events.
This patch adds .set_trip_temp() callback in
thermal_zone_of_device_ops{}, so that the sensor device can
use it to set trip_temp on hardware.

Signed-off-by: Wei Ni &lt;wni@nvidia.com&gt;
Signed-off-by: Eduardo Valentin &lt;edubezval@gmail.com&gt;
</content>
</entry>
<entry>
<title>thermal: consistently use int for trip temp</title>
<updated>2016-04-21T03:31:14Z</updated>
<author>
<name>Wei Ni</name>
<email>wni@nvidia.com</email>
</author>
<published>2016-03-03T09:33:46Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=1d0fd42fa31d18ba0a3e0dd008c9e93e1cebe451'/>
<id>urn:sha1:1d0fd42fa31d18ba0a3e0dd008c9e93e1cebe451</id>
<content type='text'>
The commit 17e8351a7739 consistently use int for temperature,
however it missed a few in trip temperature and thermal_core.

In current codes, the trip-&gt;temperature used "unsigned long"
and zone-&gt;temperature used"int", if the temperature is negative
value, it will get wrong result when compare temperature with
trip temperature.

This patch can fix it.

Signed-off-by: Wei Ni &lt;wni@nvidia.com&gt;
Signed-off-by: Eduardo Valentin &lt;edubezval@gmail.com&gt;
</content>
</entry>
<entry>
<title>Thermal: Ignore invalid trip points</title>
<updated>2016-03-18T06:10:57Z</updated>
<author>
<name>Zhang Rui</name>
<email>rui.zhang@intel.com</email>
</author>
<published>2016-03-18T02:03:24Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=81ad4276b505e987dd8ebbdf63605f92cd172b52'/>
<id>urn:sha1:81ad4276b505e987dd8ebbdf63605f92cd172b52</id>
<content type='text'>
In some cases, platform thermal driver may report invalid trip points,
thermal core should not take any action for these trip points.

This fixed a regression that bogus trip point starts to screw up thermal
control on some Lenovo laptops, after
commit bb431ba26c5cd0a17c941ca6c3a195a3a6d5d461
Author: Zhang Rui &lt;rui.zhang@intel.com&gt;
Date:   Fri Oct 30 16:31:47 2015 +0800

    Thermal: initialize thermal zone device correctly

    After thermal zone device registered, as we have not read any
    temperature before, thus tz-&gt;temperature should not be 0,
    which actually means 0C, and thermal trend is not available.
    In this case, we need specially handling for the first
    thermal_zone_device_update().

    Both thermal core framework and step_wise governor is
    enhanced to handle this. And since the step_wise governor
    is the only one that uses trends, so it's the only thermal
    governor that needs to be updated.

    Tested-by: Manuel Krause &lt;manuelkrause@netscape.net&gt;
    Tested-by: szegad &lt;szegadlo@poczta.onet.pl&gt;
    Tested-by: prash &lt;prash.n.rao@gmail.com&gt;
    Tested-by: amish &lt;ammdispose-arch@yahoo.com&gt;
    Tested-by: Matthias &lt;morpheusxyz123@yahoo.de&gt;
    Reviewed-by: Javi Merino &lt;javi.merino@arm.com&gt;
    Signed-off-by: Zhang Rui &lt;rui.zhang@intel.com&gt;
    Signed-off-by: Chen Yu &lt;yu.c.chen@intel.com&gt;

CC: &lt;stable@vger.kernel.org&gt; #3.18+
Link: https://bugzilla.redhat.com/show_bug.cgi?id=1317190
Link: https://bugzilla.kernel.org/show_bug.cgi?id=114551
Signed-off-by: Zhang Rui &lt;rui.zhang@intel.com&gt;
</content>
</entry>
<entry>
<title>thermal: of-thermal: Add devm version of thermal_zone_of_sensor_register</title>
<updated>2016-03-09T18:31:20Z</updated>
<author>
<name>Laxman Dewangan</name>
<email>ldewangan@nvidia.com</email>
</author>
<published>2016-03-09T13:10:06Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=e498b4984db82b4ba3ceea7dba813222a31e9c2e'/>
<id>urn:sha1:e498b4984db82b4ba3ceea7dba813222a31e9c2e</id>
<content type='text'>
Add resource managed version of thermal_zone_of_sensor_register() and
thermal_zone_of_sensor_unregister().

This helps in reducing the code size in error path, remove of
driver remove callbacks and making proper sequence for deallocations.

Signed-off-by: Laxman Dewangan &lt;ldewangan@nvidia.com&gt;
Signed-off-by: Eduardo Valentin &lt;edubezval@gmail.com&gt;
</content>
</entry>
</feed>
