thermal/drivers/loongson-2: Add thermal management support
authorYinbo Zhu <zhuyinbo@loongson.cn>
Thu, 17 Aug 2023 02:10:06 +0000 (10:10 +0800)
committerDaniel Lezcano <daniel.lezcano@linaro.org>
Thu, 17 Aug 2023 07:27:18 +0000 (09:27 +0200)
commite7e3a7c35791fe7a70997883fb8ada5866a40f4d
treebb93418e2e0b0f29330048da9099677ffba68696
parente98153a8c60a91b54fe9193bb9d51080f948e7c1
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
MAINTAINERS
drivers/thermal/Kconfig
drivers/thermal/Makefile
drivers/thermal/loongson2_thermal.c [new file with mode: 0644]