mirror of
https://github.com/torvalds/linux.git
synced 2024-11-22 12:11:40 +00:00
445936f9e2
The user thresholds mechanism is a way to have the userspace to tell the thermal framework to send a notification when a temperature limit is crossed. There is no id, no hysteresis, just the temperature and the direction of the limit crossing. That means we can be notified when a threshold is crossed the way up only, or the way down only or both ways. That allows to create hysteresis values if it is needed. A threshold can be added, deleted or flushed. The latter means all thresholds belonging to a thermal zone will be deleted. When a threshold is added: - if the same threshold (temperature and direction) exists, an error is returned - if a threshold is specified with the same temperature but a different direction, the specified direction is added - if there is no threshold with the same temperature then it is created When a threshold is deleted: - if the same threshold (temperature and direction) exists, it is deleted - if a threshold is specified with the same temperature but a different direction, the specified direction is removed - if there is no threshold with the same temperature, then an error is returned When the threshold are flushed: - All thresholds related to a thermal zone are deleted When a threshold is crossed: - the userspace does not need to know which threshold(s) have been crossed, it will be notified with the current temperature and the previous temperature - if multiple thresholds have been crossed between two updates only one notification will be send to the userspace, it is pointless to send a notification per thresholds crossed as the userspace can handle that easily when it has the temperature delta information Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org> Link: https://patch.msgid.link/20240923100005.2532430-2-daniel.lezcano@linaro.org [ rjw: Subject edit, use BIT(0) and BIT(1) in symbol definitions ] Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com> |
||
---|---|---|
.. | ||
broadcom | ||
intel | ||
mediatek | ||
qcom | ||
renesas | ||
samsung | ||
st | ||
tegra | ||
testing | ||
ti-soc-thermal | ||
amlogic_thermal.c | ||
armada_thermal.c | ||
cpufreq_cooling.c | ||
cpuidle_cooling.c | ||
da9062-thermal.c | ||
db8500_thermal.c | ||
devfreq_cooling.c | ||
dove_thermal.c | ||
gov_bang_bang.c | ||
gov_fair_share.c | ||
gov_power_allocator.c | ||
gov_step_wise.c | ||
gov_user_space.c | ||
hisi_thermal.c | ||
imx8mm_thermal.c | ||
imx_sc_thermal.c | ||
imx_thermal.c | ||
k3_bandgap.c | ||
k3_j72xx_bandgap.c | ||
Kconfig | ||
khadas_mcu_fan.c | ||
kirkwood_thermal.c | ||
loongson2_thermal.c | ||
Makefile | ||
max77620_thermal.c | ||
qoriq_thermal.c | ||
rockchip_thermal.c | ||
spear_thermal.c | ||
sprd_thermal.c | ||
sun8i_thermal.c | ||
thermal_core.c | ||
thermal_core.h | ||
thermal_debugfs.c | ||
thermal_debugfs.h | ||
thermal_helpers.c | ||
thermal_hwmon.c | ||
thermal_hwmon.h | ||
thermal_mmio.c | ||
thermal_netlink.c | ||
thermal_netlink.h | ||
thermal_of.c | ||
thermal_sysfs.c | ||
thermal_thresholds.c | ||
thermal_thresholds.h | ||
thermal_trace_ipa.h | ||
thermal_trace.h | ||
thermal_trip.c | ||
thermal-generic-adc.c | ||
uniphier_thermal.c |