diff options
author | Dominik Sliwa <dominik.sliwa@toradex.com> | 2017-11-21 16:35:43 +0000 |
---|---|---|
committer | Dominik Sliwa <dominik.sliwa@toradex.com> | 2017-12-22 09:41:22 +0000 |
commit | 84325931ccddb09f6313466fb272e8125569ae07 (patch) | |
tree | 9ded98696fb29036983053593bb3cd644911be38 /backport-include/linux/thermal.h | |
parent | e34cb44ac7c08783b98a16eec70125e205e6eb12 (diff) |
backports:Backports for tegra 3.1 kernel
Signed-off-by: Dominik Sliwa <dominik.sliwa@toradex.com>
Diffstat (limited to 'backport-include/linux/thermal.h')
-rw-r--r-- | backport-include/linux/thermal.h | 34 |
1 files changed, 34 insertions, 0 deletions
diff --git a/backport-include/linux/thermal.h b/backport-include/linux/thermal.h index 108a8cf..b0dc643 100644 --- a/backport-include/linux/thermal.h +++ b/backport-include/linux/thermal.h @@ -5,6 +5,40 @@ #if LINUX_VERSION_IS_LESS(3,8,0) #include <linux/errno.h> +#include <linux/err.h> + +enum thermal_trend { + THERMAL_TREND_STABLE, /* temperature is stable */ + THERMAL_TREND_RAISING, /* temperature is raising */ + THERMAL_TREND_DROPPING, /* temperature is dropping */ + THERMAL_TREND_RAISE_FULL, /* apply highest cooling action */ + THERMAL_TREND_DROP_FULL, /* apply lowest cooling action */ +}; + +struct backport_thermal_zone_device_ops { + int (*bind) (struct thermal_zone_device *, + struct thermal_cooling_device *); + int (*unbind) (struct thermal_zone_device *, + struct thermal_cooling_device *); + int (*get_temp) (struct thermal_zone_device *, int *); + int (*get_mode) (struct thermal_zone_device *, + enum thermal_device_mode *); + int (*set_mode) (struct thermal_zone_device *, + enum thermal_device_mode); + int (*get_trip_type) (struct thermal_zone_device *, int, + enum thermal_trip_type *); + int (*get_trip_temp) (struct thermal_zone_device *, int, int *); + int (*set_trip_temp) (struct thermal_zone_device *, int, int); + int (*get_trip_hyst) (struct thermal_zone_device *, int, int *); + int (*set_trip_hyst) (struct thermal_zone_device *, int, int); + int (*get_crit_temp) (struct thermal_zone_device *, int *); + int (*set_emul_temp) (struct thermal_zone_device *, int); + int (*get_trend) (struct thermal_zone_device *, int, + enum thermal_trend *); + int (*notify) (struct thermal_zone_device *, int, + enum thermal_trip_type); +}; +#define thermal_zone_device_ops LINUX_BACKPORT(thermal_zone_device_ops) struct thermal_bind_params { struct thermal_cooling_device *cdev; |