thermal: exynos: Adapt to temperature emulation core thermal framework
Subsystems (3)
PATCH v3 1/1 thermal: exynos: Adapt to temperature emulation core thermal framework
This removes the driver specific sysfs support of the temperature emulation and uses the newly added core thermal framework for thermal emulation. An exynos platform specific handler is added to support this.
In this patch, the exynos senor(tmu) related code and exynos framework related (thermal zone, cooling devices) code are intentionally kept separate. So an emulated function pointer is passed from sensor to framework. This is beneficial in adding more sensor support using the same framework code which is an ongoing work. The goal is to finally split them totally. Even the existing read_temperature also follows the same execution method.
---
Changes in V3:
* Added an invalid return from function when CONFIG_THERMAL_EMULATION is not defined.
* Added more details in the patch description.
Changes in V2:
* Added config option CONFIG_THERMAL_EMULATION instead of CONFIG_EXYNOS_THERMAL_EMUL
This patchset is based on thermal maintainer next tree.git://git.kernel.org/pub/scm/linux/kernel/git/rzhang/linux.git next
Documentation/thermal/exynos_thermal_emulation | 8 +- drivers/thermal/Kconfig | 9 -- drivers/thermal/exynos_thermal.c | 158 ++++++++++-------------- 3 files changed, 67 insertions(+), 108 deletions(-)
Documentation/thermal/exynos_thermal_emulation +4 -4
@@ -13,11 +13,11 @@ Thermal emulation mode supports software debug for TMU's operation. User can set manually with software code and TMU will read current temperature from user value not from sensor's value. -Enabling CONFIG_EXYNOS_THERMAL_EMUL option will make this support in available. -When it's enabled, sysfs node will be created under -/sys/bus/platform/devices/'exynos device name'/ with name of 'emulation'. +Enabling CONFIG_THERMAL_EMULATION option will make this support available. +When it's enabled, sysfs node will be created as +/sys/devices/virtual/thermal/thermal_zone'zone id'/emul_temp. -The sysfs node, 'emulation', will contain value 0 for the initial state. When you input any +The sysfs node, 'emul_node', will contain value 0 for the initial state. When you input any temperature you want to update to sysfs node, it automatically enable emulation mode and current temperature will be changed into it. (Exynos also supports user changable delay time which would be used to delay of
drivers/thermal/Kconfig +0 -9
@@ -117,15 +117,6 @@ config EXYNOS_THERMAL If you say yes here you get support for TMU (Thermal Management Unit) on SAMSUNG EXYNOS series of SoC. -config EXYNOS_THERMAL_EMUL - bool "EXYNOS TMU emulation mode support" - depends on EXYNOS_THERMAL - help - Exynos 4412 and 4414 and 5 series has emulation mode on TMU. - Enable this option will be make sysfs node in exynos thermal platform - device directory to support emulation mode. With emulation mode sysfs - node, you can manually input temperature to TMU for simulation purpose. - config DOVE_THERMAL tristate "Temperature sensor on Marvell Dove SoCs" depends on ARCH_DOVE
drivers/thermal/exynos_thermal.c +63 -95
217 lines not on this page · raw message
Signature · 1 line
1.7.5.4