aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/thermal.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/linux/thermal.h')
-rw-r--r--include/linux/thermal.h32
1 files changed, 24 insertions, 8 deletions
diff --git a/include/linux/thermal.h b/include/linux/thermal.h
index 917707e6151d..4cb3292fb6e4 100644
--- a/include/linux/thermal.h
+++ b/include/linux/thermal.h
@@ -31,23 +31,39 @@
31struct thermal_zone_device; 31struct thermal_zone_device;
32struct thermal_cooling_device; 32struct thermal_cooling_device;
33 33
34enum thermal_device_mode {
35 THERMAL_DEVICE_DISABLED = 0,
36 THERMAL_DEVICE_ENABLED,
37};
38
39enum thermal_trip_type {
40 THERMAL_TRIP_ACTIVE = 0,
41 THERMAL_TRIP_PASSIVE,
42 THERMAL_TRIP_HOT,
43 THERMAL_TRIP_CRITICAL,
44};
45
34struct thermal_zone_device_ops { 46struct thermal_zone_device_ops {
35 int (*bind) (struct thermal_zone_device *, 47 int (*bind) (struct thermal_zone_device *,
36 struct thermal_cooling_device *); 48 struct thermal_cooling_device *);
37 int (*unbind) (struct thermal_zone_device *, 49 int (*unbind) (struct thermal_zone_device *,
38 struct thermal_cooling_device *); 50 struct thermal_cooling_device *);
39 int (*get_temp) (struct thermal_zone_device *, char *); 51 int (*get_temp) (struct thermal_zone_device *, unsigned long *);
40 int (*get_mode) (struct thermal_zone_device *, char *); 52 int (*get_mode) (struct thermal_zone_device *,
41 int (*set_mode) (struct thermal_zone_device *, const char *); 53 enum thermal_device_mode *);
42 int (*get_trip_type) (struct thermal_zone_device *, int, char *); 54 int (*set_mode) (struct thermal_zone_device *,
43 int (*get_trip_temp) (struct thermal_zone_device *, int, char *); 55 enum thermal_device_mode);
56 int (*get_trip_type) (struct thermal_zone_device *, int,
57 enum thermal_trip_type *);
58 int (*get_trip_temp) (struct thermal_zone_device *, int,
59 unsigned long *);
44 int (*get_crit_temp) (struct thermal_zone_device *, unsigned long *); 60 int (*get_crit_temp) (struct thermal_zone_device *, unsigned long *);
45}; 61};
46 62
47struct thermal_cooling_device_ops { 63struct thermal_cooling_device_ops {
48 int (*get_max_state) (struct thermal_cooling_device *, char *); 64 int (*get_max_state) (struct thermal_cooling_device *, unsigned long *);
49 int (*get_cur_state) (struct thermal_cooling_device *, char *); 65 int (*get_cur_state) (struct thermal_cooling_device *, unsigned long *);
50 int (*set_cur_state) (struct thermal_cooling_device *, unsigned int); 66 int (*set_cur_state) (struct thermal_cooling_device *, unsigned long);
51}; 67};
52 68
53#define THERMAL_TRIPS_NONE -1 69#define THERMAL_TRIPS_NONE -1