diff options
author | Dominik Sliwa <dominik.sliwa@toradex.com> | 2019-02-21 14:48:31 +0100 |
---|---|---|
committer | Dominik Sliwa <dominik.sliwa@toradex.com> | 2019-02-22 15:26:14 +0100 |
commit | 515a1fa55cda2b1d952872e1786857481bd54fcc (patch) | |
tree | 4c66dd52c58f3d1da423a1ed7f92c4f720e24685 /backport/backport-include/linux/thermal.h | |
parent | c956caceefd8e859c8b783dd13dad197dc1f7907 (diff) |
backports: support 3.1 and 3.10 tegra kernels
Changes specific to vendor kernels
Signed-off-by: Dominik Sliwa <dominik.sliwa@toradex.com>
Diffstat (limited to 'backport/backport-include/linux/thermal.h')
-rw-r--r-- | backport/backport-include/linux/thermal.h | 34 |
1 files changed, 34 insertions, 0 deletions
diff --git a/backport/backport-include/linux/thermal.h b/backport/backport-include/linux/thermal.h index 8874e196..ad61a90a 100644 --- a/backport/backport-include/linux/thermal.h +++ b/backport/backport-include/linux/thermal.h @@ -6,6 +6,40 @@ #ifdef CONFIG_THERMAL #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; |