From ca62707f4d187616199d9dc57db2b64308fd42c7 Mon Sep 17 00:00:00 2001 From: Rocky Hao Date: Wed, 6 Dec 2017 10:53:29 +0800 Subject: [PATCH] thermal: rockchip: add virtual tsadc support for rk3126 rk previous SOCs such as rk3126 have no tsadc module, so a virtual tsadc is implemented to control the thermal problem. the virtual tsadc is designed on considering 2 factors, one is heating modules' heating time and the working frequences, the other one is current leval monitored by coulometer. Change-Id: I0c7d8b952004d4f7918a41c925c50d38aaa65673 Signed-off-by: Rocky Hao Signed-off-by: Elaine Zhang --- drivers/thermal/Kconfig | 10 ++++++++++ drivers/thermal/Makefile | 1 + 2 files changed, 11 insertions(+) diff --git a/drivers/thermal/Kconfig b/drivers/thermal/Kconfig index 7edc8dc6bbab..bb25226507d1 100644 --- a/drivers/thermal/Kconfig +++ b/drivers/thermal/Kconfig @@ -337,6 +337,16 @@ config ROCKCHIP_THERMAL trip point. Cpufreq is used as the cooling device and will throttle CPUs when the Temperature crosses the passive trip point. +config RK_VIRTUAL_THERMAL + tristate "rk_virtual thermal driver" + depends on ROCKCHIP_THERMAL + select POWER_SUPPLY + help + Rk virtual thermal driver provides virtual temperature support for + SOCs without tsadc module. It supports one critical trip point. + Cpufreq is used as the cooling device and will throttle CPUs when + the Temperature crosses the passive trip point. + config RCAR_THERMAL tristate "Renesas R-Car thermal driver" depends on ARCH_RENESAS || COMPILE_TEST diff --git a/drivers/thermal/Makefile b/drivers/thermal/Makefile index b64dd50a6629..759e1505ce97 100644 --- a/drivers/thermal/Makefile +++ b/drivers/thermal/Makefile @@ -35,6 +35,7 @@ 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-$(CONFIG_RK_VIRTUAL_THERMAL) += rk_virtual_thermal.o obj-$(CONFIG_RCAR_THERMAL) += rcar_thermal.o obj-$(CONFIG_RCAR_GEN3_THERMAL) += rcar_gen3_thermal.o obj-$(CONFIG_KIRKWOOD_THERMAL) += kirkwood_thermal.o