<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux-stable.git/drivers/thermal, branch v3.18.2</title>
<subtitle>Linux kernel stable tree</subtitle>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/'/>
<entry>
<title>thermal: Fix error path in thermal_init()</title>
<updated>2015-01-08T18:30:24+00:00</updated>
<author>
<name>Luis Henriques</name>
<email>luis.henriques@canonical.com</email>
</author>
<published>2014-12-03T21:20:21+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/commit/?id=16811f019293b6c34d6e2649ca8e182532805a22'/>
<id>16811f019293b6c34d6e2649ca8e182532805a22</id>
<content type='text'>
commit 9d367e5e7b05c71a8c1ac4e9b6e00ba45a79f2fc upstream.

thermal_unregister_governors() and class_unregister() were being called in
the wrong order.

Fixes: 80a26a5c22b9 ("Thermal: build thermal governors into thermal_sys module")
Signed-off-by: Luis Henriques &lt;luis.henriques@canonical.com&gt;
Signed-off-by: Zhang Rui &lt;rui.zhang@intel.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
commit 9d367e5e7b05c71a8c1ac4e9b6e00ba45a79f2fc upstream.

thermal_unregister_governors() and class_unregister() were being called in
the wrong order.

Fixes: 80a26a5c22b9 ("Thermal: build thermal governors into thermal_sys module")
Signed-off-by: Luis Henriques &lt;luis.henriques@canonical.com&gt;
Signed-off-by: Zhang Rui &lt;rui.zhang@intel.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</pre>
</div>
</content>
</entry>
<entry>
<title>thermal: Exynos: Deletion of unnecessary checks before two function calls</title>
<updated>2014-11-21T19:20:17+00:00</updated>
<author>
<name>Markus Elfring</name>
<email>elfring@users.sourceforge.net</email>
</author>
<published>2014-11-21T16:11:49+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/commit/?id=d3e19567fa85e1a0dab02205b89b2908084ecadd'/>
<id>d3e19567fa85e1a0dab02205b89b2908084ecadd</id>
<content type='text'>
The functions cpufreq_cooling_unregister() and thermal_zone_device_unregister()
test whether their argument is NULL and then return immediately.
Thus the test around the call is not needed.

This issue was detected by using the Coccinelle software.

Signed-off-by: Markus Elfring &lt;elfring@users.sourceforge.net&gt;
Signed-off-by: Eduardo Valentin &lt;edubezval@gmail.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The functions cpufreq_cooling_unregister() and thermal_zone_device_unregister()
test whether their argument is NULL and then return immediately.
Thus the test around the call is not needed.

This issue was detected by using the Coccinelle software.

Signed-off-by: Markus Elfring &lt;elfring@users.sourceforge.net&gt;
Signed-off-by: Eduardo Valentin &lt;edubezval@gmail.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>thermal: sti: Ignore suspend/resume functions when !PM_SLEEP</title>
<updated>2014-11-21T18:27:37+00:00</updated>
<author>
<name>Lee Jones</name>
<email>lee.jones@linaro.org</email>
</author>
<published>2014-11-19T15:50:31+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/commit/?id=e60a342bc494228d820dd801e9bfd72fbf829bc4'/>
<id>e60a342bc494228d820dd801e9bfd72fbf829bc4</id>
<content type='text'>
Prevents build warning:

st_thermal.c:278:12:
    warning: ‘st_thermal_suspend’ defined but not used [-Wunused-function]
st_thermal.c:286:12:
    warning: ‘st_thermal_resume’ defined but not used [-Wunused-function]

Acked-by: Maxime Coquelin &lt;maxime.coquelin@st.com&gt;
Signed-off-by: Lee Jones &lt;lee.jones@linaro.org&gt;
Signed-off-by: Eduardo Valentin &lt;edubezval@gmail.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Prevents build warning:

st_thermal.c:278:12:
    warning: ‘st_thermal_suspend’ defined but not used [-Wunused-function]
st_thermal.c:286:12:
    warning: ‘st_thermal_resume’ defined but not used [-Wunused-function]

Acked-by: Maxime Coquelin &lt;maxime.coquelin@st.com&gt;
Signed-off-by: Lee Jones &lt;lee.jones@linaro.org&gt;
Signed-off-by: Eduardo Valentin &lt;edubezval@gmail.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>thermal: cpu_cooling: Update always cpufreq policy with thermal constraints</title>
<updated>2014-11-20T22:17:11+00:00</updated>
<author>
<name>Yadwinder Singh Brar</name>
<email>yadi.brar@samsung.com</email>
</author>
<published>2014-11-07T13:42:29+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/commit/?id=2dcd851fe4b4fe60c2f8520bf7668d7e9b2dd76b'/>
<id>2dcd851fe4b4fe60c2f8520bf7668d7e9b2dd76b</id>
<content type='text'>
Existing code updates cupfreq policy only while executing
cpufreq_apply_cooling() function (i.e. when notify_device != NOTIFY_INVALID).
It doesn't apply constraints when cpufreq policy update happens from any other
place but it should update the cpufreq policy with thermal constraints every
time when there is a cpufreq policy update, to keep state of
cpufreq_cooling_device and max_feq of cpufreq policy in sync. For instance
while resuming cpufreq updates cpufreq_policy and it restores default
policy-&gt;usr_policy values irrespective of cooling device's cpufreq_state since
notification gets missed because (notify_device == NOTIFY_INVALID).
Another problem, is that userspace is able to change max_freq irrespective of
cooling device's state, as notification gets missed.

This patch modifies code to maintain a global cpufreq_dev_list and applies
constraints of all matching cooling devices for policy's cpu when there is any
policy update(ends up applying the lowest max_freq among the matching cpu
cooling devices).

This patch also removes redundant check (max_freq &gt; policy-&gt;user_policy.max),
as cpufreq framework takes care of user_policy constraints already where ever
required, otherwise its causing an issue while increasing max_freq in normal
scenerio as it restores max_freq with policy-&gt;user_policy.max which is old
(smaller) value.

Signed-off-by: Yadwinder Singh Brar &lt;yadi.brar@samsung.com&gt;
Signed-off-by: Eduardo Valentin &lt;edubezval@gmail.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Existing code updates cupfreq policy only while executing
cpufreq_apply_cooling() function (i.e. when notify_device != NOTIFY_INVALID).
It doesn't apply constraints when cpufreq policy update happens from any other
place but it should update the cpufreq policy with thermal constraints every
time when there is a cpufreq policy update, to keep state of
cpufreq_cooling_device and max_feq of cpufreq policy in sync. For instance
while resuming cpufreq updates cpufreq_policy and it restores default
policy-&gt;usr_policy values irrespective of cooling device's cpufreq_state since
notification gets missed because (notify_device == NOTIFY_INVALID).
Another problem, is that userspace is able to change max_freq irrespective of
cooling device's state, as notification gets missed.

This patch modifies code to maintain a global cpufreq_dev_list and applies
constraints of all matching cooling devices for policy's cpu when there is any
policy update(ends up applying the lowest max_freq among the matching cpu
cooling devices).

This patch also removes redundant check (max_freq &gt; policy-&gt;user_policy.max),
as cpufreq framework takes care of user_policy constraints already where ever
required, otherwise its causing an issue while increasing max_freq in normal
scenerio as it restores max_freq with policy-&gt;user_policy.max which is old
(smaller) value.

Signed-off-by: Yadwinder Singh Brar &lt;yadi.brar@samsung.com&gt;
Signed-off-by: Eduardo Valentin &lt;edubezval@gmail.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>imx: thermal: imx_get_temp might be called before sensor clock is prepared</title>
<updated>2014-11-09T19:42:53+00:00</updated>
<author>
<name>Heiner Kallweit</name>
<email>heiner.kallweit@web.de</email>
</author>
<published>2014-11-08T19:35:54+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/commit/?id=90a21ff5824c3ae8b49c1c0498b137792b935aab'/>
<id>90a21ff5824c3ae8b49c1c0498b137792b935aab</id>
<content type='text'>
imx_get_temp might be called before the sensor clock is prepared
thus resulting in a timeout of the first attempt to read temp:
thermal thermal_zone0: failed to read out thermal zone 0
Happened to me on a Utilite Standard with IMX6 Dual SoC.

Reason is that in imx_thermal_probe thermal_zone_device_register
is called before the sensor clock is prepared.
thermal_zone_device_register however calls
thermal_zone_device_update which eventually calls imx_get_temp.

Fix this by preparing the clock before calling
thermal_zone_device_register.

Signed-off-by: Heiner Kallweit &lt;heiner.kallweit@web.de&gt;
Signed-off-by: Eduardo Valentin &lt;edubezval@gmail.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
imx_get_temp might be called before the sensor clock is prepared
thus resulting in a timeout of the first attempt to read temp:
thermal thermal_zone0: failed to read out thermal zone 0
Happened to me on a Utilite Standard with IMX6 Dual SoC.

Reason is that in imx_thermal_probe thermal_zone_device_register
is called before the sensor clock is prepared.
thermal_zone_device_register however calls
thermal_zone_device_update which eventually calls imx_get_temp.

Fix this by preparing the clock before calling
thermal_zone_device_register.

Signed-off-by: Heiner Kallweit &lt;heiner.kallweit@web.de&gt;
Signed-off-by: Eduardo Valentin &lt;edubezval@gmail.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>thermal: exynos: use correct offset for TMU_CONTROL register on Exynos5260</title>
<updated>2014-11-07T18:52:42+00:00</updated>
<author>
<name>Bartlomiej Zolnierkiewicz</name>
<email>b.zolnierkie@samsung.com</email>
</author>
<published>2014-09-11T13:00:49+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/commit/?id=1d6a27775762110d675f71d7192972c7357b99a7'/>
<id>1d6a27775762110d675f71d7192972c7357b99a7</id>
<content type='text'>
In exynos5260_tmu_registers tmu_ctrl entry is erroneously
assigned twice.  The second assignment (to EXYNOS_TMU_REG_CONTROL1
define which represents 0x24 value) overrides the first one
(to EXYNOS_TMU_REG_CONTROL define which represents 0x20 value)
which results in the wrong (according to the Exynos5260 SoC
documentation that I have) offset being used for TMU_CONTROL
register.  Fix it by removing the wrong assignment and then
remove no longer used EXYNOS_TMU_REG_CONTROL1 define.

Cc: Naveen Krishna Chatradhi &lt;ch.naveen@samsung.com&gt;
Cc: Amit Daniel Kachhap &lt;amit.daniel@samsung.com&gt;
Cc: Lukasz Majewski &lt;l.majewski@samsung.com&gt;
Cc: Eduardo Valentin &lt;edubezval@gmail.com&gt;
Cc: Zhang Rui &lt;rui.zhang@intel.com&gt;
Signed-off-by: Bartlomiej Zolnierkiewicz &lt;b.zolnierkie@samsung.com&gt;
Acked-by: Kyungmin Park &lt;kyungmin.park@samsung.com&gt;
Signed-off-by: Eduardo Valentin &lt;edubezval@gmail.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
In exynos5260_tmu_registers tmu_ctrl entry is erroneously
assigned twice.  The second assignment (to EXYNOS_TMU_REG_CONTROL1
define which represents 0x24 value) overrides the first one
(to EXYNOS_TMU_REG_CONTROL define which represents 0x20 value)
which results in the wrong (according to the Exynos5260 SoC
documentation that I have) offset being used for TMU_CONTROL
register.  Fix it by removing the wrong assignment and then
remove no longer used EXYNOS_TMU_REG_CONTROL1 define.

Cc: Naveen Krishna Chatradhi &lt;ch.naveen@samsung.com&gt;
Cc: Amit Daniel Kachhap &lt;amit.daniel@samsung.com&gt;
Cc: Lukasz Majewski &lt;l.majewski@samsung.com&gt;
Cc: Eduardo Valentin &lt;edubezval@gmail.com&gt;
Cc: Zhang Rui &lt;rui.zhang@intel.com&gt;
Signed-off-by: Bartlomiej Zolnierkiewicz &lt;b.zolnierkie@samsung.com&gt;
Acked-by: Kyungmin Park &lt;kyungmin.park@samsung.com&gt;
Signed-off-by: Eduardo Valentin &lt;edubezval@gmail.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>thermal: imx: correct driver load sequence for cpu cooling</title>
<updated>2014-11-07T18:44:41+00:00</updated>
<author>
<name>Bai Ping</name>
<email>b51503@freescale.com</email>
</author>
<published>2014-10-14T05:12:07+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/commit/?id=491b079db3f7fa631f6a012e7e896a1eafe4dd99'/>
<id>491b079db3f7fa631f6a012e7e896a1eafe4dd99</id>
<content type='text'>
thermal driver should be regisetered after cpufreq driver has
been registered and probed. Doing so is to make sure that thermal
driver can get the max cpu cooling states correctly when calling
get_property.

Signed-off-by: Bai Ping &lt;b51503@freescale.com&gt;
Signed-off-by: Eduardo Valentin &lt;edubezval@gmail.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
thermal driver should be regisetered after cpufreq driver has
been registered and probed. Doing so is to make sure that thermal
driver can get the max cpu cooling states correctly when calling
get_property.

Signed-off-by: Bai Ping &lt;b51503@freescale.com&gt;
Signed-off-by: Eduardo Valentin &lt;edubezval@gmail.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>Thermal/int3403: Fix thermal hysteresis unit conversion</title>
<updated>2014-11-04T23:17:32+00:00</updated>
<author>
<name>lan,Tianyu</name>
<email>tianyu.lan@intel.com</email>
</author>
<published>2014-11-03T09:53:01+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/commit/?id=225112a56942c74f1e114587719fa2bd0d180b3e'/>
<id>225112a56942c74f1e114587719fa2bd0d180b3e</id>
<content type='text'>
Thermal hysteresis represents a temperature difference.
But the original code treats it as a temperature value,
Convert it from tenths of degree Kelvin to Milli-Celsius
by deducing 273200. This is not right.

Kelvin and Celsius have same degree size. From temperature
difference view, the conversion between tenths of degree
Kelvin unit and Milli-Celsius unit is just to multiply 100.

Signed-off-by: Lan Tianyu &lt;tianyu.lan@intel.com&gt;
Acked-by: Srinivas Pandruvada &lt;srinivas.pandruvada@linux.intel.com&gt;
Signed-off-by: Zhang Rui &lt;rui.zhang@intel.com&gt;
Signed-off-by: Eduardo Valentin &lt;edubezval@gmail.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Thermal hysteresis represents a temperature difference.
But the original code treats it as a temperature value,
Convert it from tenths of degree Kelvin to Milli-Celsius
by deducing 273200. This is not right.

Kelvin and Celsius have same degree size. From temperature
difference view, the conversion between tenths of degree
Kelvin unit and Milli-Celsius unit is just to multiply 100.

Signed-off-by: Lan Tianyu &lt;tianyu.lan@intel.com&gt;
Acked-by: Srinivas Pandruvada &lt;srinivas.pandruvada@linux.intel.com&gt;
Signed-off-by: Zhang Rui &lt;rui.zhang@intel.com&gt;
Signed-off-by: Eduardo Valentin &lt;edubezval@gmail.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>Thermal:Remove usless if(!result) before return tz</title>
<updated>2014-11-03T22:59:50+00:00</updated>
<author>
<name>Yao Dongdong</name>
<email>yaodongdong@huawei.com</email>
</author>
<published>2014-10-28T07:40:25+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/commit/?id=14015860565a1464193ddb3fbd3f7253a37dfcf9'/>
<id>14015860565a1464193ddb3fbd3f7253a37dfcf9</id>
<content type='text'>
result is always zero when comes here.

Signed-off-by: Yao Dongdong &lt;yaodongdong@huawei.com&gt;
Acked-by: Eduardo Valentin &lt;edubezval@gmail.com&gt;
Signed-off-by: Eduardo Valentin &lt;edubezval@gmail.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
result is always zero when comes here.

Signed-off-by: Yao Dongdong &lt;yaodongdong@huawei.com&gt;
Acked-by: Eduardo Valentin &lt;edubezval@gmail.com&gt;
Signed-off-by: Eduardo Valentin &lt;edubezval@gmail.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>thermal: exynos: fix IRQ clearing on TMU initialization</title>
<updated>2014-11-03T03:02:49+00:00</updated>
<author>
<name>Bartlomiej Zolnierkiewicz</name>
<email>b.zolnierkie@samsung.com</email>
</author>
<published>2014-10-03T16:17:17+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/commit/?id=b835ced1fd05c43bd4a706050963678bc6e95bc7'/>
<id>b835ced1fd05c43bd4a706050963678bc6e95bc7</id>
<content type='text'>
* Factor out code for clearing raised IRQs from exynos_tmu_work() to
  exynos_tmu_clear_irqs().

* Add a comment about documentation bugs to exynos_tmu_clear_irqs().

  [ The documentation for Exynos3250, Exynos4412, Exynos5250 and
    Exynos5260 incorrectly states that INTCLEAR register has
    a different placing of bits responsible for FALL IRQs than
    INTSTAT register.  Exynos5420 and Exynos5440 documentation is
    correct (Exynos4210 doesn't support FALL IRQs at all). ]

* Use exynos_tmu_clear_irqs() in exynos_tmu_initialize() instead
  of open-coded code trying to clear IRQs according to predefined
  masks.  After this change exynos_tmu_initialize() just clears
  IRQs that are raised like it is already done in exynos_tmu_work().

  As a nice side-effect the code now uses the correct offset
  (16 instead of 12) for bits responsible for clearing FALL IRQs
  in INTCLEAR register on Exynos3250, Exynos4412 and Exynos5250.

* Remove no longer needed intclr_rise_[mask,shift] and
  intclr_fall_[mask,shift] fields from struct exynos_tmu_registers.

* Remove no longer needed defines.

This patch has been tested on Exynos4412 and Exynos5420 SoCs.

Cc: Amit Daniel Kachhap &lt;amit.daniel@samsung.com&gt;
Cc: Lukasz Majewski &lt;l.majewski@samsung.com&gt;
Cc: Eduardo Valentin &lt;edubezval@gmail.com&gt;
Cc: Zhang Rui &lt;rui.zhang@intel.com&gt;
Signed-off-by: Bartlomiej Zolnierkiewicz &lt;b.zolnierkie@samsung.com&gt;
Acked-by: Kyungmin Park &lt;kyungmin.park@samsung.com&gt;
Signed-off-by: Eduardo Valentin &lt;edubezval@gmail.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
* Factor out code for clearing raised IRQs from exynos_tmu_work() to
  exynos_tmu_clear_irqs().

* Add a comment about documentation bugs to exynos_tmu_clear_irqs().

  [ The documentation for Exynos3250, Exynos4412, Exynos5250 and
    Exynos5260 incorrectly states that INTCLEAR register has
    a different placing of bits responsible for FALL IRQs than
    INTSTAT register.  Exynos5420 and Exynos5440 documentation is
    correct (Exynos4210 doesn't support FALL IRQs at all). ]

* Use exynos_tmu_clear_irqs() in exynos_tmu_initialize() instead
  of open-coded code trying to clear IRQs according to predefined
  masks.  After this change exynos_tmu_initialize() just clears
  IRQs that are raised like it is already done in exynos_tmu_work().

  As a nice side-effect the code now uses the correct offset
  (16 instead of 12) for bits responsible for clearing FALL IRQs
  in INTCLEAR register on Exynos3250, Exynos4412 and Exynos5250.

* Remove no longer needed intclr_rise_[mask,shift] and
  intclr_fall_[mask,shift] fields from struct exynos_tmu_registers.

* Remove no longer needed defines.

This patch has been tested on Exynos4412 and Exynos5420 SoCs.

Cc: Amit Daniel Kachhap &lt;amit.daniel@samsung.com&gt;
Cc: Lukasz Majewski &lt;l.majewski@samsung.com&gt;
Cc: Eduardo Valentin &lt;edubezval@gmail.com&gt;
Cc: Zhang Rui &lt;rui.zhang@intel.com&gt;
Signed-off-by: Bartlomiej Zolnierkiewicz &lt;b.zolnierkie@samsung.com&gt;
Acked-by: Kyungmin Park &lt;kyungmin.park@samsung.com&gt;
Signed-off-by: Eduardo Valentin &lt;edubezval@gmail.com&gt;
</pre>
</div>
</content>
</entry>
</feed>
