summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorJinyoung Park <jinyoungp@nvidia.com>2012-12-17 22:44:50 +0900
committerSimone Willett <swillett@nvidia.com>2013-01-09 15:05:48 -0800
commitabd20510c04546008cd2c33a5c83d16e73e8c4cc (patch)
tree07b36b56c3dbb941a5ee1f27d3cf99e76dbf9e34 /include
parent84a23d951d5d412877998a59a35b50246f16850b (diff)
Thermal: Add start and stop operations in thermal_governor structure
Added start and stop operations to initialize and uninitialize governor in thermal_governor structure. The start and stop operations will be called when thermal zone is registered and when change governor via sysfs. They will be not called when cooling devices are registered or when cooling devices are bound to thermal zones. Bug 1200111 Change-Id: Ib4037bc1f07a252cf5975aafda7323734e421e26 Signed-off-by: Jinyoung Park <jinyoungp@nvidia.com> Reviewed-on: http://git-master/r/188035 Reviewed-by: Automatic_Commit_Validation_User Reviewed-by: Matthew Longnecker <mlongnecker@nvidia.com> Reviewed-by: Diwakar Tundlam <dtundlam@nvidia.com>
Diffstat (limited to 'include')
-rw-r--r--include/linux/thermal.h10
1 files changed, 10 insertions, 0 deletions
diff --git a/include/linux/thermal.h b/include/linux/thermal.h
index 40c59080116f..3f4f0fea4787 100644
--- a/include/linux/thermal.h
+++ b/include/linux/thermal.h
@@ -173,6 +173,16 @@ struct thermal_zone_device {
/* Structure that holds thermal governor information */
struct thermal_governor {
char name[THERMAL_NAME_LENGTH];
+
+ /*
+ * The start and stop operations will be called when thermal zone is
+ * registered and when change governor via sysfs. They will not be
+ * called when cooling devices are registered or when cooling devices
+ * are bound to thermal zones.
+ */
+ int (*start)(struct thermal_zone_device *tz);
+ void (*stop)(struct thermal_zone_device *tz);
+
int (*throttle)(struct thermal_zone_device *tz, int trip);
struct list_head governor_list;
struct module *owner;