mirror of
https://mirrors.bfsu.edu.cn/git/linux.git
synced 2024-11-23 12:14:10 +08: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>
68 lines
2.6 KiB
Makefile
68 lines
2.6 KiB
Makefile
# SPDX-License-Identifier: GPL-2.0
|
|
#
|
|
# Makefile for sensor chip drivers.
|
|
#
|
|
CFLAGS_thermal_core.o := -I$(src)
|
|
obj-$(CONFIG_THERMAL) += thermal_sys.o
|
|
thermal_sys-y += thermal_core.o thermal_sysfs.o
|
|
thermal_sys-y += thermal_trip.o thermal_helpers.o
|
|
thermal_sys-y += thermal_thresholds.o
|
|
|
|
# netlink interface to manage the thermal framework
|
|
thermal_sys-$(CONFIG_THERMAL_NETLINK) += thermal_netlink.o
|
|
|
|
thermal_sys-$(CONFIG_THERMAL_DEBUGFS) += thermal_debugfs.o
|
|
|
|
# interface to/from other layers providing sensors
|
|
thermal_sys-$(CONFIG_THERMAL_HWMON) += thermal_hwmon.o
|
|
thermal_sys-$(CONFIG_THERMAL_OF) += thermal_of.o
|
|
|
|
# governors
|
|
CFLAGS_gov_power_allocator.o := -I$(src)
|
|
thermal_sys-$(CONFIG_THERMAL_GOV_FAIR_SHARE) += gov_fair_share.o
|
|
thermal_sys-$(CONFIG_THERMAL_GOV_BANG_BANG) += gov_bang_bang.o
|
|
thermal_sys-$(CONFIG_THERMAL_GOV_STEP_WISE) += gov_step_wise.o
|
|
thermal_sys-$(CONFIG_THERMAL_GOV_USER_SPACE) += gov_user_space.o
|
|
thermal_sys-$(CONFIG_THERMAL_GOV_POWER_ALLOCATOR) += gov_power_allocator.o
|
|
|
|
# cpufreq cooling
|
|
thermal_sys-$(CONFIG_CPU_FREQ_THERMAL) += cpufreq_cooling.o
|
|
thermal_sys-$(CONFIG_CPU_IDLE_THERMAL) += cpuidle_cooling.o
|
|
|
|
# devfreq cooling
|
|
thermal_sys-$(CONFIG_DEVFREQ_THERMAL) += devfreq_cooling.o
|
|
|
|
obj-$(CONFIG_K3_THERMAL) += k3_bandgap.o k3_j72xx_bandgap.o
|
|
# platform thermal drivers
|
|
obj-y += broadcom/
|
|
obj-$(CONFIG_THERMAL_MMIO) += thermal_mmio.o
|
|
obj-$(CONFIG_SPEAR_THERMAL) += spear_thermal.o
|
|
obj-$(CONFIG_SUN8I_THERMAL) += sun8i_thermal.o
|
|
obj-$(CONFIG_ROCKCHIP_THERMAL) += rockchip_thermal.o
|
|
obj-y += renesas/
|
|
obj-$(CONFIG_KIRKWOOD_THERMAL) += kirkwood_thermal.o
|
|
obj-y += samsung/
|
|
obj-$(CONFIG_DOVE_THERMAL) += dove_thermal.o
|
|
obj-$(CONFIG_DB8500_THERMAL) += db8500_thermal.o
|
|
obj-$(CONFIG_ARMADA_THERMAL) += armada_thermal.o
|
|
obj-$(CONFIG_IMX_THERMAL) += imx_thermal.o
|
|
obj-$(CONFIG_IMX_SC_THERMAL) += imx_sc_thermal.o
|
|
obj-$(CONFIG_IMX8MM_THERMAL) += imx8mm_thermal.o
|
|
obj-$(CONFIG_MAX77620_THERMAL) += max77620_thermal.o
|
|
obj-$(CONFIG_QORIQ_THERMAL) += qoriq_thermal.o
|
|
obj-$(CONFIG_DA9062_THERMAL) += da9062-thermal.o
|
|
obj-y += intel/
|
|
obj-$(CONFIG_TI_SOC_THERMAL) += ti-soc-thermal/
|
|
obj-y += st/
|
|
obj-y += qcom/
|
|
obj-y += tegra/
|
|
obj-$(CONFIG_HISI_THERMAL) += hisi_thermal.o
|
|
obj-y += mediatek/
|
|
obj-$(CONFIG_GENERIC_ADC_THERMAL) += thermal-generic-adc.o
|
|
obj-$(CONFIG_UNIPHIER_THERMAL) += uniphier_thermal.o
|
|
obj-$(CONFIG_AMLOGIC_THERMAL) += amlogic_thermal.o
|
|
obj-$(CONFIG_SPRD_THERMAL) += sprd_thermal.o
|
|
obj-$(CONFIG_KHADAS_MCU_FAN_THERMAL) += khadas_mcu_fan.o
|
|
obj-$(CONFIG_LOONGSON2_THERMAL) += loongson2_thermal.o
|
|
obj-$(CONFIG_THERMAL_CORE_TESTING) += testing/
|