mirror of
https://github.com/Fishwaldo/linux-bl808.git
synced 2025-06-17 20:25:19 +00:00
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>
This commit is contained in:
parent
5e6703bd2d
commit
4a7069a32c
3 changed files with 50 additions and 0 deletions
|
@ -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 *
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue