diff options
author | Mateusz Majewski <m.majewski2@samsung.com> | 2023-12-01 10:56:25 +0100 |
---|---|---|
committer | Daniel Lezcano <daniel.lezcano@linaro.org> | 2024-01-02 09:33:19 +0100 |
commit | 5314b1543787e6cd5d248186fcfd5c5fc4ca2146 (patch) | |
tree | ddb1f1484ebcd7b716143a84fa53821ce123bd17 /drivers/thermal/thermal_core.c | |
parent | af00d488339aee7bf42b07057053ef919bedee6f (diff) | |
download | linux-stable-5314b1543787e6cd5d248186fcfd5c5fc4ca2146.tar.gz linux-stable-5314b1543787e6cd5d248186fcfd5c5fc4ca2146.tar.bz2 linux-stable-5314b1543787e6cd5d248186fcfd5c5fc4ca2146.zip |
thermal/drivers/exynos: Use set_trips ops
Currently, each trip point defined in the device tree corresponds to a
single hardware interrupt. This commit instead switches to using two
hardware interrupts, whose values are set dynamically using the
set_trips callback. Additionally, the critical temperature threshold is
handled specifically.
Setting interrupts in this way also fixes a long-standing lockdep
warning, which was caused by calling thermal_zone_get_trips with our
lock being held. Do note that this requires TMU initialization to be
split into two parts, as done by the parent commit: parts of the
initialization call into the thermal_zone_device structure and so must
be done after its registration, but the initialization is also
responsible for setting up calibration, which must be done before
thermal_zone_device registration, which will call set_trips for the
first time; if the calibration is not done in time, the interrupt values
will be silently wrong!
Reviewed-by: Lukasz Luba <lukasz.luba@arm.com>
Signed-off-by: Mateusz Majewski <m.majewski2@samsung.com>
Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org>
Link: https://lore.kernel.org/r/20231201095625.301884-10-m.majewski2@samsung.com
Diffstat (limited to 'drivers/thermal/thermal_core.c')
0 files changed, 0 insertions, 0 deletions