<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel/linux.git/drivers/thermal/tegra, branch v6.6.132</title>
<subtitle>Linux kernel stable tree (mirror)</subtitle>
<id>https://git.radix-linux.su/kernel/linux.git/atom?h=v6.6.132</id>
<link rel='self' href='https://git.radix-linux.su/kernel/linux.git/atom?h=v6.6.132'/>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/'/>
<updated>2023-08-22T17:10:28+00:00</updated>
<entry>
<title>thermal/drivers/tegra-bpmp: Check if BPMP supports trip points</title>
<updated>2023-08-22T17:10:28+00:00</updated>
<author>
<name>Mikko Perttunen</name>
<email>mperttunen@nvidia.com</email>
</author>
<published>2022-11-29T15:39:14+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=1ef5a9f61457b921158ef03f3a2b3e789b41be9f'/>
<id>urn:sha1:1ef5a9f61457b921158ef03f3a2b3e789b41be9f</id>
<content type='text'>
Check if BPMP supports thermal trip points, and if not,
do not expose the .set_trips callback to the thermal core
framework. This can happen in virtualized environments
where asynchronous communication with VM BPMP drivers is not
available.

Signed-off-by: Mikko Perttunen &lt;mperttunen@nvidia.com&gt;
Acked-by: Thierry Reding &lt;treding@nvidia.com&gt;
Signed-off-by: Daniel Lezcano &lt;daniel.lezcano@linaro.org&gt;
Link: https://lore.kernel.org/r/20221129153914.2699041-1-cyndis@kapsi.fi
</content>
</entry>
<entry>
<title>thermal: Explicitly include correct DT includes</title>
<updated>2023-07-31T18:03:42+00:00</updated>
<author>
<name>Rob Herring</name>
<email>robh@kernel.org</email>
</author>
<published>2023-07-14T17:50:07+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=f6a756e8fb12923f0e3996a575e935e94f3594eb'/>
<id>urn:sha1:f6a756e8fb12923f0e3996a575e935e94f3594eb</id>
<content type='text'>
The DT of_device.h and of_platform.h date back to the separate
of_platform_bus_type before it as merged into the regular platform bus.
As part of that merge prepping Arm DT support 13 years ago, they
"temporarily" include each other. They also include platform_device.h
and of.h. As a result, there's a pretty much random mix of those include
files used throughout the tree. In order to detangle these headers and
replace the implicit includes with struct declarations, users need to
explicitly include the correct includes.

Signed-off-by: Rob Herring &lt;robh@kernel.org&gt;
Reviewed-by: Alim Akhtar &lt;alim.akhtar@samsung.com&gt;
Signed-off-by: Rafael J. Wysocki &lt;rafael.j.wysocki@intel.com&gt;
</content>
</entry>
<entry>
<title>thermal/drivers/tegra: Remove redundant msg in tegra_tsensor_register_channel()</title>
<updated>2023-06-26T10:03:14+00:00</updated>
<author>
<name>Yangtao Li</name>
<email>frank.li@vivo.com</email>
</author>
<published>2023-06-20T09:07:27+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=2279e8f9275cb6e440c432716a1a29899c8d27c8'/>
<id>urn:sha1:2279e8f9275cb6e440c432716a1a29899c8d27c8</id>
<content type='text'>
The upper-layer devm_thermal_add_hwmon_sysfs() function can directly
print error information.

Signed-off-by: Yangtao Li &lt;frank.li@vivo.com&gt;
Signed-off-by: Daniel Lezcano &lt;daniel.lezcano@linaro.org&gt;
Link: https://lore.kernel.org/r/20230620090732.50025-6-frank.li@vivo.com
</content>
</entry>
<entry>
<title>thermal/drivers/tegra-bpmp: Handle offline zones</title>
<updated>2023-04-07T08:31:33+00:00</updated>
<author>
<name>Mikko Perttunen</name>
<email>mperttunen@nvidia.com</email>
</author>
<published>2023-03-30T09:49:04+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=cdd6076b0a0c8f1e57be309a41bd9cedcf6795d6'/>
<id>urn:sha1:cdd6076b0a0c8f1e57be309a41bd9cedcf6795d6</id>
<content type='text'>
Thermal zones located in power domains may not be accessible when
the domain is powergated. In this situation, reading the temperature
will return -BPMP_EFAULT. When evaluating trips, BPMP will internally
use -256C as the temperature for offline zones.

For smooth operation, for offline zones, return -EAGAIN when reading
the temperature and allow registration of zones even if they are
offline during probe.

Signed-off-by: Mikko Perttunen &lt;mperttunen@nvidia.com&gt;
Acked-by: Thierry Reding &lt;treding@nvidia.com&gt;
Signed-off-by: Daniel Lezcano &lt;daniel.lezcano@linaro.org&gt;
Link: https://lore.kernel.org/r/20230330094904.2589428-1-cyndis@kapsi.fi
</content>
</entry>
<entry>
<title>thermal/drivers/tegra: Remove unneeded lock when setting a trip point</title>
<updated>2023-03-03T19:45:03+00:00</updated>
<author>
<name>Daniel Lezcano</name>
<email>daniel.lezcano@linaro.org</email>
</author>
<published>2023-03-01T20:14:44+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=0cf321c85886a74981bff21323b4a097c395fabb'/>
<id>urn:sha1:0cf321c85886a74981bff21323b4a097c395fabb</id>
<content type='text'>
The function tegra_tsensor_enable_hw_channel() takes the thermal zone
lock to prevent "a potential" race with a call to set_trips()
callback.

The driver must not play with the thermal framework core code
internals.

The tegra_tsensor_enable_hw_channel() is called by:

 - the suspend / resume callbacks
 - the probe function after the thermal zones are registered

The thermal zone lock taken in this function is supposed to protect
from a call to the set_trips() callback which writes in the same
register.

The potential race is when suspend / resume are called at the same
time as set_trips. This one is called only in
thermal_zone_device_update().

 - At suspend time, the 'in_suspend' is set, thus the
   thermal_zone_device_update() bails out immediately and set_trips is
   not called during this moment.

 - At resume time, the thermal zone is updated at PM_POST_SUSPEND,
   thus the driver has already set the TH2 temperature.

 - At probe time, we register the thermal zone and then we set the
   TH2. The only scenario I can see so far is the interrupt fires, the
   thermal_zone_update() is called exactly at the moment
   tegra_tsensor_enable_hw_channel() a few lines after registering it.

Enable the channels before setting up the interrupt. We close the
potential race window without using the thermal zone's lock.

Signed-off-by: Daniel Lezcano &lt;daniel.lezcano@linaro.org&gt;
Suggested-by: Thierry Reding &lt;thierry.reding@gmail.com&gt;
Acked-by: Thierry Reding &lt;treding@nvidia.com&gt;
Signed-off-by: Rafael J. Wysocki &lt;rafael.j.wysocki@intel.com&gt;
</content>
</entry>
<entry>
<title>thermal/hwmon: Use the right device for devm_thermal_add_hwmon_sysfs()</title>
<updated>2023-03-03T19:45:02+00:00</updated>
<author>
<name>Daniel Lezcano</name>
<email>daniel.lezcano@linaro.org</email>
</author>
<published>2023-03-01T20:14:36+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=4a16c190f761cb3a87dcbbf355f91c71ce1f8c0b'/>
<id>urn:sha1:4a16c190f761cb3a87dcbbf355f91c71ce1f8c0b</id>
<content type='text'>
The devres variant of thermal_add_hwmon_sysfs() only takes the thermal
zone structure pointer as parameter.

Actually, it uses the tz-&gt;device to add it in the devres list.

It is preferable to use the device registering the thermal zone
instead of the thermal zone device itself. That prevents the driver
accessing the thermal zone structure internals and it is from my POV
more correct regarding how devm_ is used.

Signed-off-by: Daniel Lezcano &lt;daniel.lezcano@linaro.org&gt;
Acked-by: Martin Blumenstingl &lt;martin.blumenstingl@googlemail.com&gt; #amlogic_thermal
Acked-by: Jernej Skrabec &lt;jernej.skrabec@gmail.com&gt; #sun8i_thermal
Reviewed-by: AngeloGioacchino Del Regno &lt;angelogioacchino.delregno@collabora.com&gt; #MediaTek auxadc
Signed-off-by: Rafael J. Wysocki &lt;rafael.j.wysocki@intel.com&gt;
</content>
</entry>
<entry>
<title>thermal/core: Use the thermal zone 'devdata' accessor in thermal located drivers</title>
<updated>2023-03-03T19:45:02+00:00</updated>
<author>
<name>Daniel Lezcano</name>
<email>daniel.lezcano@linaro.org</email>
</author>
<published>2023-03-01T20:14:30+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=5f68d0785e5258ab5e6df9e351929973a0742c1a'/>
<id>urn:sha1:5f68d0785e5258ab5e6df9e351929973a0742c1a</id>
<content type='text'>
The thermal zone device structure is exposed to the different drivers
and obviously they access the internals while that should be
restricted to the core thermal code.

In order to self-encapsulate the thermal core code, we need to prevent
the drivers accessing directly the thermal zone structure and provide
accessor functions to deal with.

Use the devdata accessor introduced in the previous patch.

No functional changes intended.

Signed-off-by: Daniel Lezcano &lt;daniel.lezcano@linaro.org&gt;
Reviewed-by: Niklas Söderlund &lt;niklas.soderlund+renesas@ragnatech.se&gt; #R-Car
Acked-by: Mark Brown &lt;broonie@kernel.org&gt;
Reviewed-by: AngeloGioacchino Del Regno &lt;angelogioacchino.delregno@collabora.com&gt; #MediaTek auxadc and lvts
Reviewed-by: Balsam CHIHI &lt;bchihi@baylibre.com&gt; #Mediatek lvts
Reviewed-by: Adam Ward &lt;DLG-Adam.Ward.opensource@dm.renesas.com&gt; #da9062
Reviewed-by: Baolin Wang &lt;baolin.wang@linux.alibaba.com&gt;  #spread
Acked-by: Jernej Skrabec &lt;jernej.skrabec@gmail.com&gt; #sun8i_thermal
Acked-by: Rafael J. Wysocki &lt;rafael.j.wysocki@intel.com&gt;
Acked-by: Florian Fainelli &lt;f.fainelli@gmail.com&gt; #Broadcom
Reviewed-by: Dhruva Gole &lt;d-gole@ti.com&gt; # K3 bandgap
Acked-by: Linus Walleij &lt;linus.walleij@linaro.org&gt;
Acked-by: Heiko Stuebner &lt;heiko@sntech.de&gt; #rockchip
Reviewed-by: Kunihiko Hayashi &lt;hayashi.kunihiko@socionext.com&gt; #uniphier
Signed-off-by: Rafael J. Wysocki &lt;rafael.j.wysocki@intel.com&gt;
</content>
</entry>
<entry>
<title>thermal: Remove core header inclusion from drivers</title>
<updated>2023-02-15T16:29:48+00:00</updated>
<author>
<name>Daniel Lezcano</name>
<email>daniel.lezcano@linaro.org</email>
</author>
<published>2023-02-06T15:34:29+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=9272d2d43b6e532d0c0b6d3a597cf75c9ca1e183'/>
<id>urn:sha1:9272d2d43b6e532d0c0b6d3a597cf75c9ca1e183</id>
<content type='text'>
As the name states "thermal_core.h" is the header file for the core
components of the thermal framework.

Too many drivers are including it. Hopefully the recent cleanups
helped to self encapsulate the code a bit more and prevented the
drivers to need this header.

Remove this inclusion in every place where it is possible.

Some other drivers did a confusion with the core header and the one
exported in linux/thermal.h. They include the former instead of the
latter. The changes also fix this.

The tegra/soctherm driver still remains as it uses an internal
function which need to be replaced.

The Intel HFI driver uses the netlink internal framework core and
should be changed to prevent to deal with the internals.

No functional changes intended.

Signed-off-by: Daniel Lezcano &lt;daniel.lezcano@linaro.org&gt;
Reviewed-by: Miquel Raynal &lt;miquel.raynal@bootlin.com&gt; # armada_thermal.c
Reviewed-by: Kunihiko Hayashi &lt;hayashi.kunihiko@socionext.com&gt; # uniphier_thermal.c
Reviewed-by: Niklas Söderlund &lt;niklas.soderlund+renesas@ragnatech.se&gt; # rcar_gen3_thermal.c
Reviewed-by: Neil Armstrong &lt;neil.armstrong@linaro.org&gt; # amlogic_thermal.c
Acked-by: Florian Fainelli &lt;f.fainelli@gmail.com&gt; # bcm2835_thermal.c
Acked-by: Thierry Reding &lt;treding@nvidia.com&gt; # tegra30-tsensor.c
Link: https://lore.kernel.org/r/20230206153432.1017282-1-daniel.lezcano@linaro.org
Signed-off-by: Rafael J. Wysocki &lt;rafael.j.wysocki@intel.com&gt;
</content>
</entry>
<entry>
<title>thermal/drivers/tegra: Fix set_trip_temp() deadlock</title>
<updated>2023-01-06T13:14:48+00:00</updated>
<author>
<name>Johan Hovold</name>
<email>johan+linaro@kernel.org</email>
</author>
<published>2022-12-14T13:16:16+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=b0b5d063d66e85c24c32bf169fe4879bf08ea580'/>
<id>urn:sha1:b0b5d063d66e85c24c32bf169fe4879bf08ea580</id>
<content type='text'>
The set_trip_temp() callback is used when changing the trip temperature
through sysfs. As it is called with the thermal-zone-device lock held
it must not use thermal_zone_get_trip() directly or it will deadlock.

Fixes: 56d7b397cc29 ("thermal/drivers/tegra: Use generic thermal_zone_get_trip() function")
Signed-off-by: Johan Hovold &lt;johan+linaro@kernel.org&gt;
Link: https://lore.kernel.org/r/20221214131617.2447-4-johan+linaro@kernel.org
Signed-off-by: Daniel Lezcano &lt;daniel.lezcano@kernel.org&gt;
</content>
</entry>
<entry>
<title>thermal/drivers/tegra: Fix crash when getting critical temp</title>
<updated>2023-01-06T13:14:48+00:00</updated>
<author>
<name>Jon Hunter</name>
<email>jonathanh@nvidia.com</email>
</author>
<published>2022-10-10T15:03:11+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=5f28ecc1e909b2c3ab6ba4e9ba57c0f8dc66c30f'/>
<id>urn:sha1:5f28ecc1e909b2c3ab6ba4e9ba57c0f8dc66c30f</id>
<content type='text'>
Commit 13bea86623be ("thermal/of: Remove of_thermal_get_crit_temp()")
removed the function of_thermal_get_crit_temp() and this is causing a
NULL pointer deference crash when attempting to call the 'get_crit_temp'
function pointer because this function pointer is no longer initialised.
Fix this by replacing the call to the 'get_crit_temp' function pointer
with a call to the function thermal_zone_get_crit_temp() instead.

Fixes: 13bea86623be ("thermal/of: Remove of_thermal_get_crit_temp()")
Signed-off-by: Jon Hunter &lt;jonathanh@nvidia.com&gt;
Link: https://lore.kernel.org/r/20221010150311.40384-1-jonathanh@nvidia.com
Signed-off-by: Daniel Lezcano &lt;daniel.lezcano@linaro.org&gt;
</content>
</entry>
</feed>
