From a8892d83894bcbd2717846cfa85955152b73453f Mon Sep 17 00:00:00 2001 From: Eduardo Valentin Date: Tue, 16 Jul 2013 15:26:28 -0400 Subject: 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. Cc: Zhang Rui Cc: linux-pm@vger.kernel.org Cc: linux-kernel@vger.kernel.org Signed-off-by: Eduardo Valentin --- include/linux/thermal.h | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'include/linux/thermal.h') diff --git a/include/linux/thermal.h b/include/linux/thermal.h index b4a975f25be..b268d3cf7ae 100644 --- a/include/linux/thermal.h +++ b/include/linux/thermal.h @@ -207,6 +207,16 @@ struct thermal_bind_params { * See Documentation/thermal/sysfs-api.txt for more information. */ int 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 of state limits. Each trip + * will be associated with one state limit tuple when binding. + * A NULL pointer means + * on all trips. + */ + unsigned long *binding_limits; int (*match) (struct thermal_zone_device *tz, struct thermal_cooling_device *cdev); }; -- cgit v1.2.3-70-g09d2