summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorEduardo Valentin <eduardo.valentin@ti.com>2014-02-07 02:44:06 -0800
committerDiwakar Tundlam <dtundlam@nvidia.com>2014-02-13 15:08:45 -0800
commit889cdc9288af875835b25f071d6958259a4a5916 (patch)
tree07ae72fb5f91cea00b82cb90c0e62e93190c5225 /include
parentfcd83f20dd1a76007900a16bc50fae29cd691878 (diff)
thermal: thermal_core: allow binding with limits on bind_params
When registering a thermal zone device using platform information via bind_params, the thermal framework will always perform the cdev binding using the lowest and highest limits (THERMAL_NO_LIMIT). This patch changes the data structures so that it is possible to inform what are the desired limits for each trip point inside a bind_param. The way the binding is performed is also changed so that it uses the new data structure. Change-Id: I60c047c508ab229bfacd7b5afb885c6eb2bdda43 Cc: Zhang Rui <rui.zhang@intel.com> Cc: linux-pm@vger.kernel.org Cc: linux-kernel@vger.kernel.org Signed-off-by: Eduardo Valentin <eduardo.valentin@ti.com> Signed-off-by: Paul Walmsley <pwalmsley@nvidia.com> # for the NVIDIA downstream kernel Reviewed-on: http://git-master/r/356884 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 54372a2c5272..870a319b9327 100644
--- a/include/linux/thermal.h
+++ b/include/linux/thermal.h
@@ -220,6 +220,16 @@ struct thermal_bind_params {
* See Documentation/thermal/sysfs-api.txt for more information.
*/
u64 trip_mask;
+
+ /*
+ * This is an array of cooling state limits. Must have exactly
+ * 2 * thermal_zone.number_of_trip_points. It is an array consisting
+ * of tuples <lower-state upper-state> of state limits. Each trip
+ * will be associated with one state limit tuple when binding.
+ * A NULL pointer means <THERMAL_NO_LIMITS THERMAL_NO_LIMITS>
+ * on all trips.
+ */
+ unsigned long *binding_limits;
int (*match) (struct thermal_zone_device *tz,
struct thermal_cooling_device *cdev);
};