diff options
Diffstat (limited to 'include/linux/thermal.h')
-rw-r--r-- | include/linux/thermal.h | 20 |
1 files changed, 17 insertions, 3 deletions
diff --git a/include/linux/thermal.h b/include/linux/thermal.h index 796f1ff0388c..4b94a61955df 100644 --- a/include/linux/thermal.h +++ b/include/linux/thermal.h | |||
@@ -58,6 +58,12 @@ struct thermal_zone_device_ops { | |||
58 | enum thermal_trip_type *); | 58 | enum thermal_trip_type *); |
59 | int (*get_trip_temp) (struct thermal_zone_device *, int, | 59 | int (*get_trip_temp) (struct thermal_zone_device *, int, |
60 | unsigned long *); | 60 | unsigned long *); |
61 | int (*set_trip_temp) (struct thermal_zone_device *, int, | ||
62 | unsigned long); | ||
63 | int (*get_trip_hyst) (struct thermal_zone_device *, int, | ||
64 | unsigned long *); | ||
65 | int (*set_trip_hyst) (struct thermal_zone_device *, int, | ||
66 | unsigned long); | ||
61 | int (*get_crit_temp) (struct thermal_zone_device *, unsigned long *); | 67 | int (*get_crit_temp) (struct thermal_zone_device *, unsigned long *); |
62 | int (*notify) (struct thermal_zone_device *, int, | 68 | int (*notify) (struct thermal_zone_device *, int, |
63 | enum thermal_trip_type); | 69 | enum thermal_trip_type); |
@@ -85,10 +91,18 @@ struct thermal_cooling_device { | |||
85 | ((long)t-2732+5)/10 : ((long)t-2732-5)/10) | 91 | ((long)t-2732+5)/10 : ((long)t-2732-5)/10) |
86 | #define CELSIUS_TO_KELVIN(t) ((t)*10+2732) | 92 | #define CELSIUS_TO_KELVIN(t) ((t)*10+2732) |
87 | 93 | ||
94 | struct thermal_attr { | ||
95 | struct device_attribute attr; | ||
96 | char name[THERMAL_NAME_LENGTH]; | ||
97 | }; | ||
98 | |||
88 | struct thermal_zone_device { | 99 | struct thermal_zone_device { |
89 | int id; | 100 | int id; |
90 | char type[THERMAL_NAME_LENGTH]; | 101 | char type[THERMAL_NAME_LENGTH]; |
91 | struct device device; | 102 | struct device device; |
103 | struct thermal_attr *trip_temp_attrs; | ||
104 | struct thermal_attr *trip_type_attrs; | ||
105 | struct thermal_attr *trip_hyst_attrs; | ||
92 | void *devdata; | 106 | void *devdata; |
93 | int trips; | 107 | int trips; |
94 | int tc1; | 108 | int tc1; |
@@ -137,9 +151,9 @@ enum { | |||
137 | }; | 151 | }; |
138 | #define THERMAL_GENL_CMD_MAX (__THERMAL_GENL_CMD_MAX - 1) | 152 | #define THERMAL_GENL_CMD_MAX (__THERMAL_GENL_CMD_MAX - 1) |
139 | 153 | ||
140 | struct thermal_zone_device *thermal_zone_device_register(char *, int, void *, | 154 | struct thermal_zone_device *thermal_zone_device_register(const char *, int, int, |
141 | const struct thermal_zone_device_ops *, int tc1, int tc2, | 155 | void *, const struct thermal_zone_device_ops *, int tc1, |
142 | int passive_freq, int polling_freq); | 156 | int tc2, int passive_freq, int polling_freq); |
143 | void thermal_zone_device_unregister(struct thermal_zone_device *); | 157 | void thermal_zone_device_unregister(struct thermal_zone_device *); |
144 | 158 | ||
145 | int thermal_zone_bind_cooling_device(struct thermal_zone_device *, int, | 159 | int thermal_zone_bind_cooling_device(struct thermal_zone_device *, int, |