thermal: sysfs: Add a new sysfs node emul_temp for thermal emulation
authorAmit Daniel Kachhap <amit.daniel@samsung.com>
Mon, 4 Feb 2013 00:30:15 +0000 (00:30 +0000)
committerZhang Rui <rui.zhang@intel.com>
Wed, 6 Feb 2013 05:45:42 +0000 (13:45 +0800)
commite6e238c38bd4d42d5e2cddb2165e1a46e0fb1200
treef09a49a963463468a39a62908583d5b0484c9d99
parentc8165dc0ea75855b0bff6e5edbe4957b8a63d021
thermal: sysfs: Add a new sysfs node emul_temp for thermal emulation

This patch adds support to set the emulated temperature method in
thermal zone (sensor). After setting this feature thermal zone may
report this temperature and not the actual temperature. The emulation
implementation may be based on sensor capability through platform
specific handler or pure software emulation if no platform handler defined.

This is useful in debugging different temperature threshold and its
associated cooling action. Critical threshold's cannot be emulated.
Writing 0 on this node should disable emulation.

Signed-off-by: Amit Daniel Kachhap <amit.daniel@samsung.com>
Acked-by: Kukjin Kim <kgene.kim@samsung.com>
Signed-off-by: Zhang Rui <rui.zhang@intel.com>
Documentation/thermal/sysfs-api.txt
drivers/thermal/Kconfig
drivers/thermal/thermal_sys.c
include/linux/thermal.h