diff options
author | Rajendra Nayak <rnayak@codeaurora.org> | 2016-05-05 14:21:42 +0530 |
---|---|---|
committer | Zhang Rui <rui.zhang@intel.com> | 2016-09-27 14:02:16 +0800 |
commit | 4a7069a32c99a81950de035535b0a064dcceaeba (patch) | |
tree | b65912d14e0cd5650a7d1e0cdc5270176e2c6f90 /include/linux/thermal.h | |
parent | 5e6703bd2d83548998848865cb9a9a795f31a311 (diff) |
thermal: core: export apis to get slope and offset
Add apis for platform thermal drivers to query for slope and offset
attributes, which might be needed for temperature calculations.
Signed-off-by: Rajendra Nayak <rnayak@codeaurora.org>
Signed-off-by: Eduardo Valentin <edubezval@gmail.com>
Signed-off-by: Zhang Rui <rui.zhang@intel.com>
Diffstat (limited to 'include/linux/thermal.h')
-rw-r--r-- | include/linux/thermal.h | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/include/linux/thermal.h b/include/linux/thermal.h index ee517bef0db0..707d7353c28b 100644 --- a/include/linux/thermal.h +++ b/include/linux/thermal.h @@ -435,6 +435,8 @@ thermal_of_cooling_device_register(struct device_node *np, char *, void *, void thermal_cooling_device_unregister(struct thermal_cooling_device *); struct thermal_zone_device *thermal_zone_get_zone_by_name(const char *name); int thermal_zone_get_temp(struct thermal_zone_device *tz, int *temp); +int thermal_zone_get_slope(struct thermal_zone_device *tz); +int thermal_zone_get_offset(struct thermal_zone_device *tz); int get_tz_trend(struct thermal_zone_device *, int); struct thermal_instance *get_thermal_instance(struct thermal_zone_device *, @@ -492,6 +494,12 @@ static inline struct thermal_zone_device *thermal_zone_get_zone_by_name( static inline int thermal_zone_get_temp( struct thermal_zone_device *tz, int *temp) { return -ENODEV; } +static inline int thermal_zone_get_slope( + struct thermal_zone_device *tz) +{ return -ENODEV; } +static inline int thermal_zone_get_offset( + struct thermal_zone_device *tz) +{ return -ENODEV; } static inline int get_tz_trend(struct thermal_zone_device *tz, int trip) { return -ENODEV; } static inline struct thermal_instance * |