- Restore sort order in MAINTAINERS and Kconfig,
- Remove empty trailing line from Makefile.
Fixes: 19d3a401a6 ("thermal/drivers/renesas/rzg3e: Add thermal driver for the Renesas RZ/G3E SoC")
Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Merge a thermal driver fix for 6.18 from Daniel Lezcano:
"- Add missing file when importing conflicting change for the Renesas
RZ/G3E thermal driver (Daniel Lezcano)"
* tag 'thermal-v6.18-rc1-2' of ssh://gitolite.kernel.org/pub/scm/linux/kernel/git/thermal/linux:
thermal/drivers/renesas/rzg3e: Fix add thermal driver for the Renesas RZ/G3E SoC
Merge updates of thermal drivers for 6.18-rc1 from Daniel Lezcano:
"- Add the QCS615 compatible DT bindings for QCom platforms (Gaurav
Kohli)
- Support fallback trimming values when the fuse is empty in the R-Car
driver (Marek Vasut)
- Remove unneeded semicolon in the Mediatek LVTS driver (Jiapeng
Chong)
- Fix the LMH Kconfig option by selecting QCOM_SCM and take the
opportunity to add the COMPILE_TEST option for the QCom's LMH
feature (Dmitry Baryshkov)
- Fix the missing includes and incorrect error message in the Qcom's
LMH driver (Dmitry Baryshkov)
- Fix comment typo and add the documentation in the Kconfig for the
R-Car Gen3 and Gen4 (Marek Vasut)
- Add Tegra114 SOCTHERM support (Svyatoslav Ryhel)
- Rename the functions name in the driver to be consistent and generic
with the different R-Car platform variants (Wolfram Sang)
- Register the TI K3 J72xx bandgap sensor as a hwmon sensor too
(Michael Walle)
- Add and document the thermal sensor unit reporting the junction
temperature of the RZ/G3S SoC (Claudiu Beznea)
- Support the GRF in the Rockchip driver (Sebastian Reichel)
- Add a temperature IIO sensor channel in the generic thermal ADC
driver (Svyatoslav Ryhel)
- Document the temperature sensor on the QCOM's Glymur platform (Manaf
Meethalavalappu)
- Add and document the thermal sensor unit reporting the junction
temperature of the RZ/G3E SoC (John Madieu)"
* tag 'thermal-v6.18-rc1' of ssh://gitolite.kernel.org/pub/scm/linux/kernel/git/thermal/linux: (24 commits)
dt-bindings: thermal: qcom-tsens: Document the Glymur temperature Sensor
thermal/drivers/renesas/rzg3e: Add thermal driver for the Renesas RZ/G3E SoC
dt-bindings: thermal: r9a09g047-tsu: Document the TSU unit
thermal/drivers/thermal-generic-adc: Add temperature sensor channel
dt-bindings: thermal: rockchip: Tighten grf requirements
thermal/drivers/rockchip: Shut up GRF warning
thermal/drivers/rockchip: Unify struct rockchip_tsadc_chip format
thermal/drivers/renesas/rzg3s: Add thermal driver for the Renesas RZ/G3S SoC
dt-bindings: thermal: r9a08g045-tsu: Document the TSU unit
thermal/drivers/k3_j72xx_bandgap: Register sensors with hwmon
thermal/drivers/rcar_gen3: Fix mapping SoCs to generic Gen4 entry
thermal/drivers/tegra: Add Tegra114 specific SOCTHERM driver
dt-bindings: thermal: add Tegra114 soctherm header
thermal/drivers/tegra/soctherm-fuse: Prepare calibration for Tegra114 support
dt-bindings: thermal: Document Tegra114 SOCTHERM Thermal Management System
thermal/drivers/rcar_gen3: Document Gen4 support in Kconfig entry
thermal/drivers/rcar_gen3: Fix comment typo
drivers/thermal/qcom/lmh: Fix incorrect error message
thermal/drivers/qcom/lmh: Add missing IRQ includes
thermal/drivers/qcom: Make LMH select QCOM_SCM
...
Merge an adjustment of the new Power Slider interface in the int340x
thermal driver.
* thermal-intel:
thermal: intel: int340x: Power Slider: Validate slider_balance range
The RZ/G3E SoC integrates a Temperature Sensor Unit (TSU) block designed
to monitor the chip's junction temperature. This sensor is connected to
channel 1 of the APB port clock/reset and provides temperature measurements.
It also requires calibration values stored in the system controller registers
for accurate temperature measurement. Add a driver for the Renesas RZ/G3E TSU.
[ dlezcano: Fixed conflict with "renesas: Add support for RZ/G3S" ]
Signed-off-by: John Madieu <john.madieu.xa@bp.renesas.com>
Reviewed-by: Biju Das <biju.das.jz@bp.renesas.com>
Link: https://lore.kernel.org/r/20250917170202.197929-3-john.madieu.xa@bp.renesas.com
Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org>
To avoid duplicating sensor functionality and conversion tables, this
design allows converting an ADC IIO channel's output directly into a
temperature IIO channel. This is particularly useful for devices where
hwmon isn't suitable or where temperature data must be accessible through
IIO.
One such device is, for example, the MAX17040 fuel gauge.
Signed-off-by: Svyatoslav Ryhel <clamor95@gmail.com>
Reviewed-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Link: https://lore.kernel.org/r/20250903162749.109910-2-clamor95@gmail.com
Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org>
The Working Sample R-Car SoCs may not yet have thermal sensor trimming
values programmed into fuses, those fuses are blank instead. For such
SoCs, the driver includes fallback trimming values. Those values are
currently applied to all SoCs which use this driver.
Introduce support for per-SoC fallback trimming values in preparation
for SoCs which do not use these current trimming values. No functional
change is intended here.
Signed-off-by: Marek Vasut <marek.vasut+renesas@mailbox.org>
Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org>
Reviewed-by: Niklas Söderlund <niklas.soderlund+renesas@ragnatech.se>
Link: https://lore.kernel.org/r/20250625181739.28391-1-marek.vasut+renesas@mailbox.org
When the module parameter slider_balance is set to the performance
slider value of 0, the SoC slider profile switches to the performance
mode.
This can cause the Linux power-profiles-daemon to change the system
power mode to performance from balanced mode. This happens when there
is only one platform profile registered as there will be no conflict
with other platform profiles.
Same issue occurs when the slider_balance is set to the power-saver
slider value.
Prevent module parameter slider_balance from overlapping with
performance and power-saver slider values by adding range validation.
Return an error when an invalid value is provided.
Signed-off-by: Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com>
Link: https://patch.msgid.link/20250923205631.3056590-1-srinivas.pandruvada@linux.intel.com
[ rjw: Changelog edits ]
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Intel int340x thermal driver changes for 6.18:
- Add support for new "power slider" firmware interface to the int340x
thermal driver end enable it for Panther Lake platforms (Srinivas
Pandruvada)
- Remove a redundant ACPI control method evaluation from the int340x
thermal driver (Salah Triki)
and clean it up.
* thermal-intel:
thermal: intel: selftests: workload_hint: Mask unsupported types
thermal: intel: int340x: Add module parameter to change slider offset
thermal: intel: int340x: Add module parameter for balanced Slider
thermal: intel: int340x: Enable power slider interface for Panther Lake
thermal: intel: int340x: Add support for power slider
thermal: intel: int340x: Remove redundant acpi_has_method() call
The current behavior of the Step-wise thermal governor is to increase
the cooling level one step at a time after trip point threshold passing
by thermal zone temperature until the temperature stops to rise. Then,
nothing is done until the temperature decreases below the (possibly
updated) trip point threshold, at which point the cooling level is
reduced straight to the applicable minimum.
While this generally works, it is not in agreement with the throttling
logic description comment in step_wise_manage() any more after some
relatively recent changes, and in the case of passive cooling, it may
lead to undesirable performance oscillations between high and low
levels.
For this reason, modify the governor's cooling device state selection
function, get_target_state(), to reduce cooling by one level even if
the temperature is still above the thermal zone threshold, but the
temperature has started to fall down. However, ensure that the cooling
level will remain above the applicable minimum in that case to pull
the zone temperature further down, possibly until it falls below the
trip threshold (which may now be equal to the low temperature of the
trip).
Doing so should help higher performance to be restored earlier in some
cases which is desirable especially for passive trip points with
relatively high hysteresis values.
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Reviewed-by: Lukasz Luba <lukasz.luba@arm.com>
Link: https://patch.msgid.link/1947735.tdWV9SEqCh@rafael.j.wysocki
[ rjw: Changelog edits ]
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
The cooling logic description comment next to the get_target_state()
definition is slightly ambiguous in what it means by "lower cooling
state", so clarify that by replacing the ambuguous phrase with "the
minimum applicable cooling state".
No functional impact.
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Reviewed-by: Lukasz Luba <lukasz.luba@arm.com>
Link: https://patch.msgid.link/4690596.LvFx2qVVIh@rafael.j.wysocki
SoC slider value is set by the user (or the default when user has not
modified it). To enhance power efficiency dynamically, the firmware can
optionally auto-adjust the slider value based on the current workload.
This adjustment is governed by an additional parameter known as the
"slider offset". This offset permits the firmware to increase the slider
value up to and including "SoC slider + slider offset".
Add a module parameter to specify this "slier offset" value.
By default, the SoC slider offset is set to 0. This means that SoC is not
allowed to switch slider position.
Signed-off-by: Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com>
Link: https://patch.msgid.link/20250825132315.75521-5-srinivas.pandruvada@linux.intel.com
[ rjw: Comment and module param description adjustments ]
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
By default, the SoC slider value for the "balanced" platform profile is
set to 3. This update introduces a new module parameter, allowing users
to modify this default value.
The module parameter can be specified during load time to set a custom
slider value for the "balanced" profile. If the module parameter is not
specified at load time and is updated later, the new value will only take
effect after the next write of "balanced" to the sysfs "profile"
attribute.
Signed-off-by: Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com>
Link: https://patch.msgid.link/20250825132315.75521-4-srinivas.pandruvada@linux.intel.com
[ rjw: Minor adjustments of module param description ]
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Add support for system wide energy performance preference using a SoC
slider interface defined via processor thermal PCI device MMIO space.
Using Linux platform-profile class API, register a new platform profile.
Provide three platform power profile choices:
"performance", "balanced" and "low-power".
Profile sysfs is located at:
/sys/class/platform-profile/platform-profile-*
where attribute "name" is presented as "SoC Power Slider".
At boot by default the slider is set to balanced mode. This profile is
changed by user space based on user preference via power profile daemon
or directly writing to the "profile" sysfs attribute.
Add a CPU model specific processor thermal device feature
PROC_THERMAL_FEATURE_SOC_POWER_SLIDER. When enabled for a CPU model,
slider interface is registered.
During system suspend callback save slider register and restore during
resume callback.
Signed-off-by: Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com>
Link: https://patch.msgid.link/20250825132315.75521-2-srinivas.pandruvada@linux.intel.com
[ rjw: Removal of redundant outer parens from one expression ]
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Pull driver core updates from Danilo Krummrich:
"debugfs:
- Remove unneeded debugfs_file_{get,put}() instances
- Remove last remnants of debugfs_real_fops()
- Allow storing non-const void * in struct debugfs_inode_info::aux
sysfs:
- Switch back to attribute_group::bin_attrs (treewide)
- Switch back to bin_attribute::read()/write() (treewide)
- Constify internal references to 'struct bin_attribute'
Support cache-ids for device-tree systems:
- Add arch hook arch_compact_of_hwid()
- Use arch_compact_of_hwid() to compact MPIDR values on arm64
Rust:
- Device:
- Introduce CoreInternal device context (for bus internal methods)
- Provide generic drvdata accessors for bus devices
- Provide Driver::unbind() callbacks
- Use the infrastructure above for auxiliary, PCI and platform
- Implement Device::as_bound()
- Rename Device::as_ref() to Device::from_raw() (treewide)
- Implement fwnode and device property abstractions
- Implement example usage in the Rust platform sample driver
- Devres:
- Remove the inner reference count (Arc) and use pin-init instead
- Replace Devres::new_foreign_owned() with devres::register()
- Require T to be Send in Devres<T>
- Initialize the data kept inside a Devres last
- Provide an accessor for the Devres associated Device
- Device ID:
- Add support for ACPI device IDs and driver match tables
- Split up generic device ID infrastructure
- Use generic device ID infrastructure in net::phy
- DMA:
- Implement the dma::Device trait
- Add DMA mask accessors to dma::Device
- Implement dma::Device for PCI and platform devices
- Use DMA masks from the DMA sample module
- I/O:
- Implement abstraction for resource regions (struct resource)
- Implement resource-based ioremap() abstractions
- Provide platform device accessors for I/O (remap) requests
- Misc:
- Support fallible PinInit types in Revocable
- Implement Wrapper<T> for Opaque<T>
- Merge pin-init blanket dependencies (for Devres)
Misc:
- Fix OF node leak in auxiliary_device_create()
- Use util macros in device property iterators
- Improve kobject sample code
- Add device_link_test() for testing device link flags
- Fix typo in Documentation/ABI/testing/sysfs-kernel-address_bits
- Hint to prefer container_of_const() over container_of()"
* tag 'driver-core-6.17-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/driver-core/driver-core: (84 commits)
rust: io: fix broken intra-doc links to `platform::Device`
rust: io: fix broken intra-doc link to missing `flags` module
rust: io: mem: enable IoRequest doc-tests
rust: platform: add resource accessors
rust: io: mem: add a generic iomem abstraction
rust: io: add resource abstraction
rust: samples: dma: set DMA mask
rust: platform: implement the `dma::Device` trait
rust: pci: implement the `dma::Device` trait
rust: dma: add DMA addressing capabilities
rust: dma: implement `dma::Device` trait
rust: net::phy Change module_phy_driver macro to use module_device_table macro
rust: net::phy represent DeviceId as transparent wrapper over mdio_device_id
rust: device_id: split out index support into a separate trait
device: rust: rename Device::as_ref() to Device::from_raw()
arm64: cacheinfo: Provide helper to compress MPIDR value into u32
cacheinfo: Add arch hook to compress CPU h/w id into 32 bits for cache-id
cacheinfo: Set cache 'id' based on DT data
container_of: Document container_of() is not to be used in new code
driver core: auxiliary bus: fix OF node leak
...
Pull thermal control updates from Rafael Wysocki:
"These update the thermal control sysfs interface and multiple thermal
control drivers:
- Convert EAGAIN into ENODATA in temp_show() to prevent user space
from polling the sysfs file in vain after a failing O_NONBLOCK read
under the assumption that the read would have blocked (Hsin-Te
Yuan)
- Add Wildcat Lake PCI ID to the int340x Intel processor thermal
driver (Srinivas Pandruvada)
- Add debugfs interface to override the temperature set by the
firmware in the Intel platform temperature control (PTC) interface
and add a new sysfs control attribute called thermal_tolerance to
it (Srinivas Pandruvada)
- Enable the stage 2 shutdown in the qcom-spmi-temp-alarm thermal
driver and add support for more SPMI variants to it (Anjelique
Melendez)
- Constify the thermal_zone_device_ops structure where possible in
several assorted thermal drivers (Christophe Jaillet)
- Use the dev_fwnode() helper instead of of_fwnode_handle(), as it is
more adequate, wherever possible in thermal drivers (Jiri Slaby)
- Implement and document One-Time Programmable fuse support in the
Rockchip thermal driver in order to increase the precision of the
measurements (Nicolas Frattaroli)
- Change the way the Mediatek LTVS thermal driver stores the
initialization data sequence to support different sequences
matching different platforms. Introduce mt7988 support with a new
initialization sequence (Mason Chang)
- Document the QCom TSens Milos Temperature Sensor DT bindings (Luca
Weiss)
- Add the fallback compatible string for MT7981 and MT8516 DT
bindings (Aleksander Jan Bajkowski)
- Add the compatible string for the Tegra210B01 SOC_THERM driver
(Aaron Kling)"
* tag 'thermal-6.17-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm: (23 commits)
dt-bindings: thermal: tegra: Document Tegra210B01
dt-bindings: thermal: mediatek: Add fallback compatible string for MT7981 and MT8516
dt-bindings: thermal: qcom-tsens: document the Milos Temperature Sensor
thermal/drivers/mediatek/lvts_thermal: Add mt7988 lvts commands
thermal/drivers/mediatek/lvts_thermal: Add lvts commands and their sizes to driver data
thermal/drivers/mediatek/lvts_thermal: Change lvts commands array to static const
thermal/drivers/rockchip: Support reading trim values from OTP
dt-bindings: thermal: rockchip: document otp thermal trim
thermal/drivers/rockchip: Support RK3576 SoC in the thermal driver
dt-bindings: rockchip-thermal: Add RK3576 compatible
thermal/drivers/rockchip: Rename rk_tsadcv3_tshut_mode
thermal: Use dev_fwnode()
thermal: Constify struct thermal_zone_device_ops
thermal/drivers/loongson2: Constify struct thermal_zone_device_ops
thermal/drivers/qcom-spmi-temp-alarm: Add support for LITE PMIC peripherals
thermal/drivers/qcom-spmi-temp-alarm: Add support for GEN2 rev 2 PMIC peripherals
thermal/drivers/qcom-spmi-temp-alarm: Prepare to support additional Temp Alarm subtypes
thermal/drivers/qcom-spmi-temp-alarm: Add temp alarm data struct based on HW subtype
thermal/drivers/qcom-spmi-temp-alarm: Enable stage 2 shutdown when required
thermal: sysfs: Return ENODATA instead of EAGAIN for reads
...
Many of the Rockchip SoCs support storing trim values for the sensors in
factory programmable memory. These values specify a fixed offset from
the sensor's returned temperature to get a more accurate picture of what
temperature the silicon is actually at.
The way this is implemented is with various OTP cells, which may be
absent. There may both be whole-TSADC trim values, as well as per-sensor
trim values.
In the downstream driver, whole-chip trim values override the per-sensor
trim values. This rewrite of the functionality changes the semantics to
something I see as slightly more useful: allow the whole-chip trim
values to serve as a fallback for lacking per-sensor trim values,
instead of overriding already present sensor trim values.
Additionally, the chip may specify an offset (trim_base, trim_base_frac)
in degrees celsius and degrees decicelsius respectively which defines
what the basis is from which the trim, if any, should be calculated
from. By default, this is 30 degrees Celsius, but the chip can once
again specify a different value through OTP cells.
The implementation of these trim calculations have been tested
extensively on an RK3576, where it was confirmed to get rid of pesky 1.8
degree Celsius offsets between certain sensors.
Signed-off-by: Nicolas Frattaroli <nicolas.frattaroli@collabora.com>
Link: https://lore.kernel.org/r/20250610-rk3576-tsadc-upstream-v6-5-b6e9efbf1015@collabora.com
Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org>
'struct thermal_zone_device_ops' could be left unmodified in this driver.
Constifying this structure moves some data to a read-only section, so
increases overall security, especially when the structure holds some
function pointers.
This partly reverts commit 734b5def91 ("thermal/drivers/loongson2: Add
Loongson-2K2000 support") which removed the const qualifier. Instead,
define two different structures.
On a x86_64, with allmodconfig:
Before:
======
text data bss dec hex filename
5089 1160 0 6249 1869 drivers/thermal/loongson2_thermal.o
After:
=====
text data bss dec hex filename
5464 1128 0 6592 19c0 drivers/thermal/loongson2_thermal.o
Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
Link: https://lore.kernel.org/r/5f5f815f85a9450bca7848c6d47a1fee840f47e5.1748176328.git.christophe.jaillet@wanadoo.fr
Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org>