Skip to content

Commit

Permalink
Thermal: Add platform level information to thermal.h
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Durgadoss R authored and Zhang Rui committed Nov 5, 2012
1 parent 9b4298a commit ef87394
Showing 1 changed file with 29 additions and 0 deletions.
29 changes: 29 additions & 0 deletions include/linux/thermal.h
Original file line number Diff line number Diff line change
Expand Up @@ -157,13 +157,42 @@ struct thermal_zone_device {
int passive;
unsigned int forced_passive;
const struct thermal_zone_device_ops *ops;
const struct thermal_zone_params *tzp;
struct list_head thermal_instances;
struct idr idr;
struct mutex lock; /* protect thermal_instances list */
struct list_head node;
struct delayed_work poll_queue;
};

/* Structure that holds binding parameters for a zone */
struct thermal_bind_params {
struct thermal_cooling_device *cdev;

/*
* This is a measure of 'how effectively these devices can
* cool 'this' thermal zone. The shall be determined by platform
* characterization. This is on a 'percentage' scale.
* See Documentation/thermal/sysfs-api.txt for more information.
*/
int weight;

/*
* This is a bit mask that gives the binding relation between this
* thermal zone and cdev, for a particular trip point.
* See Documentation/thermal/sysfs-api.txt for more information.
*/
int trip_mask;
int (*match) (struct thermal_zone_device *tz,
struct thermal_cooling_device *cdev);
};

/* Structure to define Thermal Zone parameters */
struct thermal_zone_params {
int num_tbps; /* Number of tbp entries */
struct thermal_bind_params *tbp;
};

struct thermal_genl_event {
u32 orig;
enum events event;
Expand Down

0 comments on commit ef87394

Please sign in to comment.