summaryrefslogtreecommitdiffstats
path: root/drivers/thermal/Kconfig
diff options
context:
space:
mode:
authorYinbo Zhu <zhuyinbo@loongson.cn>2023-08-17 04:10:06 +0200
committerDaniel Lezcano <daniel.lezcano@linaro.org>2023-08-17 09:27:18 +0200
commite7e3a7c35791fe7a70997883fb8ada5866a40f4d (patch)
treebb93418e2e0b0f29330048da9099677ffba68696 /drivers/thermal/Kconfig
parentthermal/drivers/ti-soc-thermal: Use helper function IS_ERR_OR_NULL() (diff)
downloadlinux-e7e3a7c35791fe7a70997883fb8ada5866a40f4d.tar.xz
linux-e7e3a7c35791fe7a70997883fb8ada5866a40f4d.zip
thermal/drivers/loongson-2: Add thermal management support
This patch adds the support for Loongson-2 thermal sensor controller, which can support maximum four sensor selectors that corresponding to four sets of thermal control registers and one set of sampling register. The sensor selector can selector a speific thermal sensor as temperature input. The sampling register is used to obtain the temperature in real time, the control register GATE field is used to set the threshold of high or low temperature, when the input temperature is higher than the high temperature threshold or lower than the low temperature threshold, an interrupt will occur. Signed-off-by: zhanghongchen <zhanghongchen@loongson.cn> Signed-off-by: Yinbo Zhu <zhuyinbo@loongson.cn> Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org> Link: https://lore.kernel.org/r/20230817021007.10350-1-zhuyinbo@loongson.cn
Diffstat (limited to 'drivers/thermal/Kconfig')
-rw-r--r--drivers/thermal/Kconfig12
1 files changed, 12 insertions, 0 deletions
diff --git a/drivers/thermal/Kconfig b/drivers/thermal/Kconfig
index 19a4b33cb564..c81a00fbca7d 100644
--- a/drivers/thermal/Kconfig
+++ b/drivers/thermal/Kconfig
@@ -510,4 +510,16 @@ config KHADAS_MCU_FAN_THERMAL
If you say yes here you get support for the FAN controlled
by the Microcontroller found on the Khadas VIM boards.
+config LOONGSON2_THERMAL
+ tristate "Loongson-2 SoC series thermal driver"
+ depends on LOONGARCH || COMPILE_TEST
+ depends on OF
+ help
+ Support for Thermal driver found on Loongson-2 SoC series platforms.
+ The thermal driver realizes get_temp and set_trips function, which
+ are used to obtain the temperature of the current node and set the
+ temperature range to trigger the interrupt. When the input temperature
+ is higher than the high temperature threshold or lower than the low
+ temperature threshold, the interrupt will occur.
+
endif