<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel/linux.git/drivers/thermal, branch linux-4.20.y</title>
<subtitle>Linux kernel stable tree (mirror)</subtitle>
<id>https://git.radix-linux.su/kernel/linux.git/atom?h=linux-4.20.y</id>
<link rel='self' href='https://git.radix-linux.su/kernel/linux.git/atom?h=linux-4.20.y'/>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/'/>
<updated>2019-03-05T16:59:38+00:00</updated>
<entry>
<title>drivers: thermal: int340x_thermal: Fix sysfs race condition</title>
<updated>2019-03-05T16:59:38+00:00</updated>
<author>
<name>Aaron Hill</name>
<email>aa1ronham@gmail.com</email>
</author>
<published>2018-12-24T19:23:36+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=b687c2a1b509db43f2013ab31d691797a5e36718'/>
<id>urn:sha1:b687c2a1b509db43f2013ab31d691797a5e36718</id>
<content type='text'>
[ Upstream commit 129699bb8c7572106b5bbb2407c2daee4727ccad ]

Changes since V1:
* Use dev_info instead of printk
* Use dev_warn instead of BUG_ON

Previously, sysfs_create_group was called before all initialization had
fully run - specifically, before pci_set_drvdata was called. Since the
sysctl group is visible to userspace as soon as sysfs_create_group
returns, a small window of time existed during which a process could read
from an uninitialized/partially-initialized device.

This commit moves the creation of the sysctl group to after all
initialized is completed. This ensures that it's impossible for
userspace to read from a sysctl file before initialization has fully
completed.

To catch any future regressions, I've added a check to ensure
that proc_thermal_emum_mode is never PROC_THERMAL_NONE when a process
tries to read from a sysctl file. Previously, the aforementioned race
condition could result in the 'else' branch
running while PROC_THERMAL_NONE was set,
leading to a null pointer deference.

Signed-off-by: Aaron Hill &lt;aa1ronham@gmail.com&gt;
Signed-off-by: Zhang Rui &lt;rui.zhang@intel.com&gt;
Signed-off-by: Sasha Levin &lt;sashal@kernel.org&gt;
</content>
</entry>
<entry>
<title>thermal: int340x_thermal: Fix a NULL vs IS_ERR() check</title>
<updated>2019-03-05T16:59:35+00:00</updated>
<author>
<name>Dan Carpenter</name>
<email>dan.carpenter@oracle.com</email>
</author>
<published>2018-12-17T07:02:42+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=8efe8806b32f10570d99aaa349d11a053a0ab90f'/>
<id>urn:sha1:8efe8806b32f10570d99aaa349d11a053a0ab90f</id>
<content type='text'>
[ Upstream commit 3fe931b31a4078395c1967f0495dcc9e5ec6b5e3 ]

The intel_soc_dts_iosf_init() function doesn't return NULL, it returns
error pointers.

Fixes: 4d0dd6c1576b ("Thermal/int340x/processor_thermal: Enable auxiliary DTS for Braswell")
Signed-off-by: Dan Carpenter &lt;dan.carpenter@oracle.com&gt;
Signed-off-by: Zhang Rui &lt;rui.zhang@intel.com&gt;
Signed-off-by: Sasha Levin &lt;sashal@kernel.org&gt;
</content>
</entry>
<entry>
<title>thermal: hwmon: inline helpers when CONFIG_THERMAL_HWMON is not set</title>
<updated>2019-02-12T19:02:32+00:00</updated>
<author>
<name>Eduardo Valentin</name>
<email>edubezval@gmail.com</email>
</author>
<published>2019-01-02T00:34:03+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=76afe9c2354c71f0d417f4a184ee7bc0f65396a1'/>
<id>urn:sha1:76afe9c2354c71f0d417f4a184ee7bc0f65396a1</id>
<content type='text'>
commit 03334ba8b425b2ad275c8f390cf83c7b081c3095 upstream.

Avoid warnings like this:
thermal_hwmon.h:29:1: warning: ‘thermal_remove_hwmon_sysfs’ defined but not used [-Wunused-function]
 thermal_remove_hwmon_sysfs(struct thermal_zone_device *tz)

Fixes: 0dd88793aacd ("thermal: hwmon: move hwmon support to single file")
Reviewed-by: Geert Uytterhoeven &lt;geert+renesas@glider.be&gt;
Signed-off-by: Eduardo Valentin &lt;edubezval@gmail.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</content>
</entry>
<entry>
<title>thermal: generic-adc: Fix adc to temp interpolation</title>
<updated>2019-02-12T19:02:31+00:00</updated>
<author>
<name>Bjorn Andersson</name>
<email>bjorn.andersson@linaro.org</email>
</author>
<published>2018-12-24T07:26:44+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=42249cb24cf9509d872f7ab3d1a3afe7bdb61615'/>
<id>urn:sha1:42249cb24cf9509d872f7ab3d1a3afe7bdb61615</id>
<content type='text'>
[ Upstream commit 9d216211fded20fff301d0317af3238d8383634c ]

First correct the edge case to return the last element if we're
outside the range, rather than at the last element, so that
interpolation is not omitted for points between the two last entries in
the table.

Then correct the formula to perform linear interpolation based the two
points surrounding the read ADC value. The indices for temp are kept as
"hi" and "lo" to pair with the adc indices, but there's no requirement
that the temperature is provided in descendent order. mult_frac() is
used to prevent issues with overflowing the int.

Cc: Laxman Dewangan &lt;ldewangan@nvidia.com&gt;
Signed-off-by: Bjorn Andersson &lt;bjorn.andersson@linaro.org&gt;
Signed-off-by: Eduardo Valentin &lt;edubezval@gmail.com&gt;
Signed-off-by: Sasha Levin &lt;sashal@kernel.org&gt;
</content>
</entry>
<entry>
<title>thermal: tsens: qcom: do not create duplicate regmap debugfs entries</title>
<updated>2019-02-12T19:02:30+00:00</updated>
<author>
<name>Srinivas Kandagatla</name>
<email>srinivas.kandagatla@linaro.org</email>
</author>
<published>2018-11-15T17:43:30+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=22723eecb95782fe0dd41f67e96b2ce22784a008'/>
<id>urn:sha1:22723eecb95782fe0dd41f67e96b2ce22784a008</id>
<content type='text'>
[ Upstream commit 4ab248b3b10a58e379e2d32333fff99ea5ca256c ]

Regmap would use device name to create debugfs entries. If the device
has multiple regmaps it is recommended to use name field in regmap_config.
Fix this by providing name to the regmap configs correctly.

Without this patch we would see below error on DB820c.

qcom-tsens 4a9000.thermal-sensor: Failed to create 4a9000.thermal-sensor
debugfs directory

Signed-off-by: Srinivas Kandagatla &lt;srinivas.kandagatla@linaro.org&gt;
Acked-by: Amit Kucheria &lt;amit.kucheria@linaro.org&gt;
Tested-by: Amit Kucheria &lt;amit.kucheria@linaro.org&gt;
Signed-off-by: Eduardo Valentin &lt;edubezval@gmail.com&gt;
Signed-off-by: Sasha Levin &lt;sashal@kernel.org&gt;
</content>
</entry>
<entry>
<title>thermal: bcm2835: enable hwmon explicitly</title>
<updated>2019-02-12T19:02:30+00:00</updated>
<author>
<name>Matthias Brugger</name>
<email>mbrugger@suse.com</email>
</author>
<published>2018-10-21T21:58:48+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=acd38b4d4eeab35c03e1aa0bf169ab3b8a7cad76'/>
<id>urn:sha1:acd38b4d4eeab35c03e1aa0bf169ab3b8a7cad76</id>
<content type='text'>
[ Upstream commit d56c19d07e0bc3ceff366a49b7d7a2440c967b1b ]

By defaul of-based thermal driver do not enable hwmon.
This patch does this explicitly, so that the temperature can be read
through the common hwmon sysfs.

Signed-off-by: Matthias Brugger &lt;mbrugger@suse.com&gt;
Acked-by: Stefan Wahren &lt;stefan.wahren@i2se.com&gt;
Signed-off-by: Eduardo Valentin &lt;edubezval@gmail.com&gt;
Signed-off-by: Sasha Levin &lt;sashal@kernel.org&gt;
</content>
</entry>
<entry>
<title>thermal: Fix locking in cooling device sysfs update cur_state</title>
<updated>2019-02-12T19:02:12+00:00</updated>
<author>
<name>Thara Gopinath</name>
<email>thara.gopinath@linaro.org</email>
</author>
<published>2018-11-27T22:43:11+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=5b8aafa6ce91dde873917178f697c212d5a1e0be'/>
<id>urn:sha1:5b8aafa6ce91dde873917178f697c212d5a1e0be</id>
<content type='text'>
[ Upstream commit 68000a0d983f539c95ebe5dccd4f29535c7ac0af ]

Sysfs interface to update cooling device cur_state does not
currently holding cooling device lock sometimes leading to
stale values in cur_state if getting updated simultanelously
from user space and thermal framework. Adding the proper locking
code fixes this issue.

Signed-off-by: Thara Gopinath &lt;thara.gopinath@linaro.org&gt;
Signed-off-by: Zhang Rui &lt;rui.zhang@intel.com&gt;
Signed-off-by: Sasha Levin &lt;sashal@kernel.org&gt;
</content>
</entry>
<entry>
<title>Thermal: do not clear passive state during system sleep</title>
<updated>2019-02-12T19:02:12+00:00</updated>
<author>
<name>Wei Wang</name>
<email>wvw@google.com</email>
</author>
<published>2018-11-07T22:36:11+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=39b28779167233626344ed62dc2d53e517a8973c'/>
<id>urn:sha1:39b28779167233626344ed62dc2d53e517a8973c</id>
<content type='text'>
[ Upstream commit 964f4843a455d2ffb199512b08be8d5f077c4cac ]

commit ff140fea847e ("Thermal: handle thermal zone device properly
during system sleep") added PM hook to call thermal zone reset during
sleep. However resetting thermal zone will also clear the passive state
and thus cancel the polling queue which leads the passive cooling device
state not being cleared properly after sleep.

thermal_pm_notify =&gt; thermal_zone_device_reset set passive to 0
thermal_zone_trip_update will skip update passive as `old_target ==
instance-&gt;target'.
monitor_thermal_zone =&gt; thermal_zone_device_set_polling will cancel
tz-&gt;poll_queue, so the cooling device state will not be changed
afterwards.

Reported-by: Kame Wang &lt;kamewang@google.com&gt;
Signed-off-by: Wei Wang &lt;wvw@google.com&gt;
Signed-off-by: Zhang Rui &lt;rui.zhang@intel.com&gt;
Signed-off-by: Sasha Levin &lt;sashal@kernel.org&gt;
</content>
</entry>
<entry>
<title>thermal: stm32: Fix stm_thermal_read_factory_settings</title>
<updated>2018-12-11T04:15:28+00:00</updated>
<author>
<name>David HERNANDEZ SANCHEZ</name>
<email>david.hernandezsanchez@st.com</email>
</author>
<published>2018-12-06T13:23:32+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=99c47fcd4daa2b9a1348872ba49226dcdc58cb40'/>
<id>urn:sha1:99c47fcd4daa2b9a1348872ba49226dcdc58cb40</id>
<content type='text'>
Adding brackets allows to multiply the register value,
masked by TS1_RAMP_COEFF_MASK, by an ADJUST value
properly and not to multiply ADJUST by register value and
then mask the whole.

Fixes: 1d693155 ("thermal: add stm32 thermal driver")
Reviewed-by: Daniel Lezcano &lt;daniel.lezcano@linaro.org&gt;
Signed-off-by: David Hernandez Sanchez &lt;david.hernandezsanchez@st.com&gt;
Signed-off-by: Eduardo Valentin &lt;edubezval@gmail.com&gt;
</content>
</entry>
<entry>
<title>thermal: stm32: read factory settings inside stm_thermal_prepare</title>
<updated>2018-12-11T04:15:21+00:00</updated>
<author>
<name>David HERNANDEZ SANCHEZ</name>
<email>david.hernandezsanchez@st.com</email>
</author>
<published>2018-12-06T13:23:32+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=3c9d082064b5ec5876f7e20bc50959d1915c5ab0'/>
<id>urn:sha1:3c9d082064b5ec5876f7e20bc50959d1915c5ab0</id>
<content type='text'>
Calling stm_thermal_read_factory_settings before clocking
internal peripheral causes bad register values and makes
temperature computation wrong.

Calling stm_thermal_read_factory_settings inside
stm_thermal_prepare fixes this problem as internal
peripheral is well clocked at this stage.

Fixes: 1d693155 ("thermal: add stm32 thermal driver")
Reviewed-by: Daniel Lezcano &lt;daniel.lezcano@linaro.org&gt;
Signed-off-by: David Hernandez Sanchez &lt;david.hernandezsanchez@st.com&gt;
Signed-off-by: Eduardo Valentin &lt;edubezval@gmail.com&gt;
</content>
</entry>
</feed>
