linux/drivers/thermal
Rafael J. Wysocki 3669716401 thermal: core: Add sanity checks for polling_delay and passive_delay
If polling_delay is nonzero and passive_delay is greater than
polling_delay, the thermal zone temperature will be updated less
often when tz->passive is nonzero, which is not as expected.  Make
the thermal zone registration fail with -EINVAL in that case as
this is a clear thermal zone configuration mistake.

If polling_delay is nonzero and passive_delay is 0, which is regarded
as a valid thermal zone configuration, the thermal zone will use polling
except when tz->passive is nonzero.  However, the expected behavior in
that case is to continue temperature polling with the same delay value
regardless of tz->passive, so set passive_delay to the polling_delay
value then.

Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Reviewed-by: Daniel Lezcano <daniel.lezcano@linaro.org>
Link: https://patch.msgid.link/5802156.DvuYhMxLoT@rjwysocki.net
2024-07-12 15:14:57 +02:00
..
broadcom
intel thermal: trip: Pass trip pointer to .set_trip_temp() thermal zone callback 2024-07-12 15:14:01 +02:00
mediatek thermal/drivers/mediatek/lvts_thermal: Return error in case of invalid efuse data 2024-06-12 19:07:34 +02:00
qcom thermal: trip: Pass trip pointer to .set_trip_temp() thermal zone callback 2024-07-12 15:14:01 +02:00
samsung
st thermal: Drop spaces before TABs 2024-03-11 17:14:46 +01:00
tegra thermal: trip: Pass trip pointer to .set_trip_temp() thermal zone callback 2024-07-12 15:14:01 +02:00
ti-soc-thermal
amlogic_thermal.c thermal/drivers/amlogic: Support A1 SoC family Thermal Sensor controller 2024-04-23 12:40:29 +02:00
armada_thermal.c thermal/drivers/armada: Simplify name sanitization 2024-04-23 12:40:29 +02:00
cpufreq_cooling.c thermal/cpufreq: Remove arch_update_thermal_pressure() 2024-04-24 12:08:00 +02:00
cpuidle_cooling.c
da9062-thermal.c thermal: core: Eliminate writable trip points masks 2024-02-27 12:04:38 +01:00
db8500_thermal.c
devfreq_cooling.c thermal: devfreq_cooling: Fix perf state when calculate dfc res_util 2024-03-27 16:27:39 +01:00
dove_thermal.c
gov_bang_bang.c thermal: gov_bang_bang: Drop unnecessary cooling device target state checks 2024-06-11 21:06:44 +02:00
gov_fair_share.c thermal: gov_fair_share: Eliminate unnecessary integer divisions 2024-04-24 10:15:08 +02:00
gov_power_allocator.c thermal: core: Move passive polling management to the core 2024-04-30 21:16:13 +02:00
gov_step_wise.c thermal: gov_step_wise: Go straight to instance->lower when mitigation is over 2024-06-25 14:37:05 +02:00
gov_user_space.c thermal: gov_user_space: Use .trip_crossed() instead of .throttle() 2024-04-24 20:42:10 +02:00
hisi_thermal.c
imx8mm_thermal.c
imx_sc_thermal.c
imx_thermal.c thermal: trip: Pass trip pointer to .set_trip_temp() thermal zone callback 2024-07-12 15:14:01 +02:00
k3_bandgap.c thermal/drivers/k3_bandgap: Remove some unused fields in struct k3_bandgap 2024-04-23 12:40:29 +02:00
k3_j72xx_bandgap.c
Kconfig thermal: Get rid of CONFIG_THERMAL_WRITABLE_TRIPS 2024-02-23 18:24:48 +01:00
khadas_mcu_fan.c
kirkwood_thermal.c
loongson2_thermal.c thermal/drivers/loongson2: Add Loongson-2K2000 support 2024-04-23 12:40:30 +02:00
Makefile thermal: Drop spaces before TABs 2024-03-11 17:14:46 +01:00
max77620_thermal.c
qoriq_thermal.c thermal/drivers/qoriq: Fix getting tmu range 2024-03-11 17:14:46 +01:00
rcar_gen3_thermal.c thermal/drivers/rcar_gen3: Update temperature approximation calculation 2024-04-23 12:40:29 +02:00
rcar_thermal.c thermal: core: Eliminate writable trip points masks 2024-02-27 12:04:38 +01:00
rockchip_thermal.c
rzg2l_thermal.c
spear_thermal.c
sprd_thermal.c
sun8i_thermal.c thermal/drivers/sun8i: Don't fail probe due to zone registration failure 2024-03-11 17:14:46 +01:00
thermal_core.c thermal: core: Add sanity checks for polling_delay and passive_delay 2024-07-12 15:14:57 +02:00
thermal_core.h Merge branch 'thermal-core' 2024-06-25 16:27:38 +02:00
thermal_debugfs.c thermal: trip: Use common set of trip type names 2024-06-11 21:04:40 +02:00
thermal_debugfs.h thermal/debugfs: Do not extend mitigation episodes beyond system resume 2024-06-11 21:04:00 +02:00
thermal_helpers.c thermal: helpers: Introduce thermal_trip_is_bound_to_cdev() 2024-07-09 18:22:59 +02:00
thermal_hwmon.c thermal: core: Store zone ops in struct thermal_zone_device 2024-02-23 18:24:48 +01:00
thermal_hwmon.h
thermal_mmio.c
thermal_netlink.c Merge branch 'thermal-intel' into thermal 2024-04-15 15:45:32 +02:00
thermal_netlink.h thermal: netlink: Add genetlink bind/unbind notifications 2024-03-27 14:50:26 +01:00
thermal_of.c thermal/of: Assume polling-delay(-passive) 0 when absent 2024-03-11 17:14:46 +01:00
thermal_sysfs.c thermal: trip: Pass trip pointer to .set_trip_temp() thermal zone callback 2024-07-12 15:14:01 +02:00
thermal_trace_ipa.h thermal: core: Make struct thermal_zone_device definition internal 2024-04-08 16:01:20 +02:00
thermal_trace.h tracing/treewide: Remove second parameter of __assign_str() 2024-05-22 20:14:47 -04:00
thermal_trip.c thermal: trip: Fold __thermal_zone_get_trip() into its caller 2024-07-12 15:14:56 +02:00
thermal-generic-adc.c
uniphier_thermal.c thermal: uniphier: Use thermal_zone_for_each_trip() for walking trip points 2024-07-04 13:25:31 +02:00