aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorDurgadoss R <durgadoss.r@intel.com>2012-09-18 01:34:55 -0400
committerZhang Rui <rui.zhang@intel.com>2012-11-05 00:56:32 -0500
commitef87394791206019e4e4e04cb746865f2dc115ed (patch)
tree704c497f48469bcdad2c89724d48984c799135d4 /include
parent9b4298a088907811a4fe5a5d7cd2454da60708c5 (diff)
Thermal: Add platform level information to thermal.h
This patch adds platform level information to thermal.h by introducing two structures to hold: * bind parameters for a thermal zone, * zone level platform parameters Signed-off-by: Durgadoss R <durgadoss.r@intel.com> Signed-off-by: Zhang Rui <rui.zhang@intel.com>
Diffstat (limited to 'include')
-rw-r--r--include/linux/thermal.h29
1 files changed, 29 insertions, 0 deletions
diff --git a/include/linux/thermal.h b/include/linux/thermal.h
index 32af124d23cd..4caa32e400b4 100644
--- a/include/linux/thermal.h
+++ b/include/linux/thermal.h
@@ -157,6 +157,7 @@ struct thermal_zone_device {
157 int passive; 157 int passive;
158 unsigned int forced_passive; 158 unsigned int forced_passive;
159 const struct thermal_zone_device_ops *ops; 159 const struct thermal_zone_device_ops *ops;
160 const struct thermal_zone_params *tzp;
160 struct list_head thermal_instances; 161 struct list_head thermal_instances;
161 struct idr idr; 162 struct idr idr;
162 struct mutex lock; /* protect thermal_instances list */ 163 struct mutex lock; /* protect thermal_instances list */
@@ -164,6 +165,34 @@ struct thermal_zone_device {
164 struct delayed_work poll_queue; 165 struct delayed_work poll_queue;
165}; 166};
166 167
168/* Structure that holds binding parameters for a zone */
169struct thermal_bind_params {
170 struct thermal_cooling_device *cdev;
171
172 /*
173 * This is a measure of 'how effectively these devices can
174 * cool 'this' thermal zone. The shall be determined by platform
175 * characterization. This is on a 'percentage' scale.
176 * See Documentation/thermal/sysfs-api.txt for more information.
177 */
178 int weight;
179
180 /*
181 * This is a bit mask that gives the binding relation between this
182 * thermal zone and cdev, for a particular trip point.
183 * See Documentation/thermal/sysfs-api.txt for more information.
184 */
185 int trip_mask;
186 int (*match) (struct thermal_zone_device *tz,
187 struct thermal_cooling_device *cdev);
188};
189
190/* Structure to define Thermal Zone parameters */
191struct thermal_zone_params {
192 int num_tbps; /* Number of tbp entries */
193 struct thermal_bind_params *tbp;
194};
195
167struct thermal_genl_event { 196struct thermal_genl_event {
168 u32 orig; 197 u32 orig;
169 enum events event; 198 enum events event;