diff options
author | Archana Sathyakumar <asathyak@codeaurora.org> | 2014-03-12 09:41:12 -0600 |
---|---|---|
committer | David Keitel <dkeitel@codeaurora.org> | 2016-03-22 11:08:23 -0700 |
commit | 7ca5e4817342c078d17dac0e6d901b895391751e (patch) | |
tree | 5f51958c15f139a54b0eaf8a87f475b9d6c237de /include/linux/thermal.h | |
parent | b48731b306e6d13f1555199f9f4c792ef7dd3062 (diff) |
thermal-core: Add API to get temperature
Currently, there is no API to query the current temperature
in sensor framework. Add a generic API to get it.
Change-Id: I038e9a118e77eb6a3599b7d45a0cc8757990d2ef
Signed-off-by: Archana Sathyakumar <asathyak@codeaurora.org>
Conflicts:
include/linux/thermal.h
Diffstat (limited to 'include/linux/thermal.h')
-rw-r--r-- | include/linux/thermal.h | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/include/linux/thermal.h b/include/linux/thermal.h index 89de2ca82974..af10c703601b 100644 --- a/include/linux/thermal.h +++ b/include/linux/thermal.h @@ -447,6 +447,8 @@ struct thermal_instance *get_thermal_instance(struct thermal_zone_device *, struct thermal_cooling_device *, int); void thermal_cdev_update(struct thermal_cooling_device *); void thermal_notify_framework(struct thermal_zone_device *, int); + +int sensor_get_temp(uint32_t sensor_id, long *temp); int sensor_get_id(char *name); int sensor_set_trip(uint32_t sensor_id, struct sensor_threshold *threshold); int sensor_cancel_trip(uint32_t sensor_id, struct sensor_threshold *threshold); @@ -528,6 +530,8 @@ static inline int sensor_cancel_trip(uint32_t sensor_id, static inline int thermal_sensor_trip(struct thermal_zone_device *tz, enum thermal_trip_type trip, unsigned long temp) { return -ENODEV;} +static inline int sensor_get_temp(uint32_t sensor_id, long *temp) +{ return -ENODEV;} #endif /* CONFIG_THERMAL */ |