Revision tags: v6.6.25, v6.6.24, v6.6.23, v6.6.16, v6.6.15, v6.6.14, v6.6.13, v6.6.12, v6.6.11, v6.6.10, v6.6.9, v6.6.8, v6.6.7, v6.6.6, v6.6.5, v6.6.4, v6.6.3, v6.6.2, v6.5.11, v6.6.1, v6.5.10, v6.6, v6.5.9, v6.5.8, v6.5.7, v6.5.6, v6.5.5, v6.5.4, v6.5.3, v6.5.2, v6.1.51, v6.5.1, v6.1.50, v6.5, v6.1.49, v6.1.48, v6.1.46, v6.1.45, v6.1.44, v6.1.43, v6.1.42, v6.1.41, v6.1.40, v6.1.39 |
|
#
f6a756e8 |
| 14-Jul-2023 |
Rob Herring <robh@kernel.org> |
thermal: Explicitly include correct DT includes
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
thermal: Explicitly include correct DT includes
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 <robh@kernel.org> Reviewed-by: Alim Akhtar <alim.akhtar@samsung.com> Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
show more ...
|
Revision tags: v6.1.38, v6.1.37, v6.1.36, v6.4, v6.1.35 |
|
#
2279e8f9 |
| 20-Jun-2023 |
Yangtao Li <frank.li@vivo.com> |
thermal/drivers/tegra: Remove redundant msg in tegra_tsensor_register_channel()
The upper-layer devm_thermal_add_hwmon_sysfs() function can directly print error information.
Signed-off-by: Yangtao
thermal/drivers/tegra: Remove redundant msg in tegra_tsensor_register_channel()
The upper-layer devm_thermal_add_hwmon_sysfs() function can directly print error information.
Signed-off-by: Yangtao Li <frank.li@vivo.com> Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org> Link: https://lore.kernel.org/r/20230620090732.50025-6-frank.li@vivo.com
show more ...
|
Revision tags: v6.1.34, v6.1.33, v6.1.32, v6.1.31, v6.1.30, v6.1.29, v6.1.28, v6.1.27, v6.1.26, v6.3, v6.1.25, v6.1.24, v6.1.23, v6.1.22, v6.1.21, v6.1.20, v6.1.19, v6.1.18, v6.1.17, v6.1.16, v6.1.15 |
|
#
0cf321c8 |
| 01-Mar-2023 |
Daniel Lezcano <daniel.lezcano@linaro.org> |
thermal/drivers/tegra: Remove unneeded lock when setting a trip point
The function tegra_tsensor_enable_hw_channel() takes the thermal zone lock to prevent "a potential" race with a call to set_trip
thermal/drivers/tegra: Remove unneeded lock when setting a trip point
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 <daniel.lezcano@linaro.org> Suggested-by: Thierry Reding <thierry.reding@gmail.com> Acked-by: Thierry Reding <treding@nvidia.com> Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
show more ...
|
#
4a16c190 |
| 01-Mar-2023 |
Daniel Lezcano <daniel.lezcano@linaro.org> |
thermal/hwmon: Use the right device for devm_thermal_add_hwmon_sysfs()
The devres variant of thermal_add_hwmon_sysfs() only takes the thermal zone structure pointer as parameter.
Actually, it uses
thermal/hwmon: Use the right device for devm_thermal_add_hwmon_sysfs()
The devres variant of thermal_add_hwmon_sysfs() only takes the thermal zone structure pointer as parameter.
Actually, it uses the tz->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 <daniel.lezcano@linaro.org> Acked-by: Martin Blumenstingl <martin.blumenstingl@googlemail.com> #amlogic_thermal Acked-by: Jernej Skrabec <jernej.skrabec@gmail.com> #sun8i_thermal Reviewed-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com> #MediaTek auxadc Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
show more ...
|
#
5f68d078 |
| 01-Mar-2023 |
Daniel Lezcano <daniel.lezcano@linaro.org> |
thermal/core: Use the thermal zone 'devdata' accessor in thermal located drivers
The thermal zone device structure is exposed to the different drivers and obviously they access the internals while t
thermal/core: Use the thermal zone 'devdata' accessor in thermal located drivers
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 <daniel.lezcano@linaro.org> Reviewed-by: Niklas Söderlund <niklas.soderlund+renesas@ragnatech.se> #R-Car Acked-by: Mark Brown <broonie@kernel.org> Reviewed-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com> #MediaTek auxadc and lvts Reviewed-by: Balsam CHIHI <bchihi@baylibre.com> #Mediatek lvts Reviewed-by: Adam Ward <DLG-Adam.Ward.opensource@dm.renesas.com> #da9062 Reviewed-by: Baolin Wang <baolin.wang@linux.alibaba.com> #spread Acked-by: Jernej Skrabec <jernej.skrabec@gmail.com> #sun8i_thermal Acked-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com> Acked-by: Florian Fainelli <f.fainelli@gmail.com> #Broadcom Reviewed-by: Dhruva Gole <d-gole@ti.com> # K3 bandgap Acked-by: Linus Walleij <linus.walleij@linaro.org> Acked-by: Heiko Stuebner <heiko@sntech.de> #rockchip Reviewed-by: Kunihiko Hayashi <hayashi.kunihiko@socionext.com> #uniphier Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
show more ...
|
Revision tags: v6.1.14, v6.1.13, v6.2, v6.1.12, v6.1.11 |
|
#
9272d2d4 |
| 06-Feb-2023 |
Daniel Lezcano <daniel.lezcano@linaro.org> |
thermal: Remove core header inclusion from drivers
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. Hopefu
thermal: Remove core header inclusion from drivers
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 <daniel.lezcano@linaro.org> Reviewed-by: Miquel Raynal <miquel.raynal@bootlin.com> # armada_thermal.c Reviewed-by: Kunihiko Hayashi <hayashi.kunihiko@socionext.com> # uniphier_thermal.c Reviewed-by: Niklas Söderlund <niklas.soderlund+renesas@ragnatech.se> # rcar_gen3_thermal.c Reviewed-by: Neil Armstrong <neil.armstrong@linaro.org> # amlogic_thermal.c Acked-by: Florian Fainelli <f.fainelli@gmail.com> # bcm2835_thermal.c Acked-by: Thierry Reding <treding@nvidia.com> # tegra30-tsensor.c Link: https://lore.kernel.org/r/20230206153432.1017282-1-daniel.lezcano@linaro.org Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
show more ...
|
Revision tags: v6.1.10, v6.1.9, v6.1.8, v6.1.7, v6.1.6, v6.1.5, v6.0.19, v6.0.18, v6.1.4, v6.1.3, v6.0.17, v6.1.2, v6.0.16, v6.1.1, v6.0.15, v6.0.14, v6.0.13, v6.1, v6.0.12, v6.0.11, v6.0.10, v5.15.80, v6.0.9, v5.15.79, v6.0.8, v5.15.78, v6.0.7, v5.15.77, v5.15.76, v6.0.6, v6.0.5, v5.15.75, v6.0.4, v6.0.3, v6.0.2, v5.15.74, v5.15.73, v6.0.1, v5.15.72 |
|
#
735a968d |
| 03-Oct-2022 |
Daniel Lezcano <daniel.lezcano@linaro.org> |
thermal/drivers/tegra: Use generic thermal_zone_get_trip() function
Replace a single call to thermal_zone_get_trip() to get a trip point instead of calling the different ops->get_trip*
Signed-off-b
thermal/drivers/tegra: Use generic thermal_zone_get_trip() function
Replace a single call to thermal_zone_get_trip() to get a trip point instead of calling the different ops->get_trip*
Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org> Link: https://lore.kernel.org/r/20221003092602.1323944-11-daniel.lezcano@linaro.org
show more ...
|
Revision tags: v6.0, v5.15.71, v5.15.70, v5.15.69, v5.15.68, v5.15.67, v5.15.66, v5.15.65, v5.15.64, v5.15.63, v5.15.62, v5.15.61, v5.15.60 |
|
#
6fc2e1a5 |
| 04-Aug-2022 |
Daniel Lezcano <daniel.lezcano@linexp.org> |
thermal/drivers/tegra: Switch to new of API
The thermal OF code has a new API allowing to migrate the OF initialization to a simpler approach. The ops are no longer device tree specific and are the
thermal/drivers/tegra: Switch to new of API
The thermal OF code has a new API allowing to migrate the OF initialization to a simpler approach. The ops are no longer device tree specific and are the generic ones provided by the core code.
Convert the ops to the thermal_zone_device_ops format and use the new API to register the thermal zone with these generic ops.
Signed-off-by: Daniel Lezcano <daniel.lezcano@linexp.org> Link: https://lore.kernel.org/r/20220804224349.1926752-8-daniel.lezcano@linexp.org Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org>
show more ...
|
Revision tags: v5.15.59, v5.19, v5.15.58, v5.15.57 |
|
#
e5bfcd30 |
| 22-Jul-2022 |
Daniel Lezcano <daniel.lezcano@linexp.org> |
thermal/core: Rename 'trips' to 'num_trips'
In order to use thermal trips defined in the thermal structure, rename the 'trips' field to 'num_trips' to have the 'trips' field containing the thermal t
thermal/core: Rename 'trips' to 'num_trips'
In order to use thermal trips defined in the thermal structure, rename the 'trips' field to 'num_trips' to have the 'trips' field containing the thermal trip points.
Cc: Alexandre Bailon <abailon@baylibre.com> Cc: Kevin Hilman <khilman@baylibre.com> Signed-off-by: Daniel Lezcano <daniel.lezcano@linexp.org> Link: https://lore.kernel.org/r/20220722200007.1839356-8-daniel.lezcano@linexp.org Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org>
show more ...
|
Revision tags: v5.15.56, v5.15.55, v5.15.54, v5.15.53, v5.15.52, v5.15.51, v5.15.50, v5.15.49, v5.15.48, v5.15.47, v5.15.46, v5.15.45, v5.15.44, v5.15.43, v5.15.42, v5.18, v5.15.41, v5.15.40, v5.15.39, v5.15.38, v5.15.37, v5.15.36, v5.15.35, v5.15.34, v5.15.33, v5.15.32, v5.15.31, v5.17, v5.15.30, v5.15.29, v5.15.28, v5.15.27, v5.15.26, v5.15.25, v5.15.24, v5.15.23, v5.15.22, v5.15.21, v5.15.20, v5.15.19, v5.15.18, v5.15.17, v5.4.173, v5.15.16, v5.15.15, v5.16, v5.15.10, v5.15.9, v5.15.8, v5.15.7, v5.15.6, v5.15.5, v5.15.4, v5.15.3, v5.15.2, v5.15.1, v5.15, v5.14.14, v5.14.13, v5.14.12, v5.14.11, v5.14.10, v5.14.9, v5.14.8, v5.14.7, v5.14.6, v5.10.67, v5.10.66, v5.14.5, v5.14.4, v5.10.65, v5.14.3, v5.10.64, v5.14.2, v5.10.63, v5.14.1, v5.10.62, v5.14, v5.10.61, v5.10.60, v5.10.53, v5.10.52, v5.10.51, v5.10.50, v5.10.49, v5.13, v5.10.46 |
|
#
3747e426 |
| 16-Jun-2021 |
Dmitry Osipenko <digetx@gmail.com> |
thermal/drivers/tegra: Add driver for Tegra30 thermal sensor
All NVIDIA Tegra30 SoCs have a two-channel on-chip sensor unit which monitors temperature and voltage of the SoC. Sensors control CPU fre
thermal/drivers/tegra: Add driver for Tegra30 thermal sensor
All NVIDIA Tegra30 SoCs have a two-channel on-chip sensor unit which monitors temperature and voltage of the SoC. Sensors control CPU frequency throttling, which is activated by hardware once preprogrammed temperature level is breached, they also send signal to Power Management controller to perform emergency shutdown on a critical overheat of the SoC die. Add driver for the Tegra30 TSENSOR module, exposing it as a thermal sensor.
Tested-by: Andreas Westman Dorcsak <hedmoo@yahoo.com> # Asus TF700T Tested-by: Maxim Schwalm <maxim.schwalm@gmail.com> # Asus TF700T Tested-by: Svyatoslav Ryhel <clamor95@gmail.com> # Asus TF201T Tested-by: Ihor Didenko <tailormoon@rambler.ru> # Asus TF300T Tested-by: Ion Agorria <ion@agorria.com> # Asus TF201T Tested-by: Matt Merhar <mattmerhar@protonmail.com> # Ouya Tested-by: Peter Geis <pgwipeout@gmail.com> # Ouya Acked-by: Thierry Reding <treding@nvidia.com> Signed-off-by: Dmitry Osipenko <digetx@gmail.com> Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org> Link: https://lore.kernel.org/r/20210616190417.32214-4-digetx@gmail.com
show more ...
|