aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/thermal.h
diff options
context:
space:
mode:
authorAmit Daniel Kachhap <amit.daniel@samsung.com>2013-02-03 19:30:15 -0500
committerZhang Rui <rui.zhang@intel.com>2013-02-06 00:45:42 -0500
commite6e238c38bd4d42d5e2cddb2165e1a46e0fb1200 (patch)
treef09a49a963463468a39a62908583d5b0484c9d99 /include/linux/thermal.h
parentc8165dc0ea75855b0bff6e5edbe4957b8a63d021 (diff)
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>
Diffstat (limited to 'include/linux/thermal.h')
-rw-r--r--include/linux/thermal.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/include/linux/thermal.h b/include/linux/thermal.h
index 9b78f8c6f773..f0bd7f90a90d 100644
--- a/include/linux/thermal.h
+++ b/include/linux/thermal.h
@@ -123,6 +123,7 @@ struct thermal_zone_device_ops {
123 int (*set_trip_hyst) (struct thermal_zone_device *, int, 123 int (*set_trip_hyst) (struct thermal_zone_device *, int,
124 unsigned long); 124 unsigned long);
125 int (*get_crit_temp) (struct thermal_zone_device *, unsigned long *); 125 int (*get_crit_temp) (struct thermal_zone_device *, unsigned long *);
126 int (*set_emul_temp) (struct thermal_zone_device *, unsigned long);
126 int (*get_trend) (struct thermal_zone_device *, int, 127 int (*get_trend) (struct thermal_zone_device *, int,
127 enum thermal_trend *); 128 enum thermal_trend *);
128 int (*notify) (struct thermal_zone_device *, int, 129 int (*notify) (struct thermal_zone_device *, int,
@@ -165,6 +166,7 @@ struct thermal_zone_device {
165 int polling_delay; 166 int polling_delay;
166 int temperature; 167 int temperature;
167 int last_temperature; 168 int last_temperature;
169 int emul_temperature;
168 int passive; 170 int passive;
169 unsigned int forced_passive; 171 unsigned int forced_passive;
170 const struct thermal_zone_device_ops *ops; 172 const struct thermal_zone_device_ops *ops;