diff options
Diffstat (limited to 'include/linux/thermal.h')
-rw-r--r-- | include/linux/thermal.h | 32 |
1 files changed, 32 insertions, 0 deletions
diff --git a/include/linux/thermal.h b/include/linux/thermal.h index 1de8b9eb841b..784644961279 100644 --- a/include/linux/thermal.h +++ b/include/linux/thermal.h | |||
@@ -127,6 +127,37 @@ struct thermal_zone_device { | |||
127 | struct thermal_hwmon_attr temp_crit; /* hwmon sys attr */ | 127 | struct thermal_hwmon_attr temp_crit; /* hwmon sys attr */ |
128 | #endif | 128 | #endif |
129 | }; | 129 | }; |
130 | /* Adding event notification support elements */ | ||
131 | #define THERMAL_GENL_FAMILY_NAME "thermal_event" | ||
132 | #define THERMAL_GENL_VERSION 0x01 | ||
133 | #define THERMAL_GENL_MCAST_GROUP_NAME "thermal_mc_group" | ||
134 | |||
135 | enum events { | ||
136 | THERMAL_AUX0, | ||
137 | THERMAL_AUX1, | ||
138 | THERMAL_CRITICAL, | ||
139 | THERMAL_DEV_FAULT, | ||
140 | }; | ||
141 | |||
142 | struct thermal_genl_event { | ||
143 | u32 orig; | ||
144 | enum events event; | ||
145 | }; | ||
146 | /* attributes of thermal_genl_family */ | ||
147 | enum { | ||
148 | THERMAL_GENL_ATTR_UNSPEC, | ||
149 | THERMAL_GENL_ATTR_EVENT, | ||
150 | __THERMAL_GENL_ATTR_MAX, | ||
151 | }; | ||
152 | #define THERMAL_GENL_ATTR_MAX (__THERMAL_GENL_ATTR_MAX - 1) | ||
153 | |||
154 | /* commands supported by the thermal_genl_family */ | ||
155 | enum { | ||
156 | THERMAL_GENL_CMD_UNSPEC, | ||
157 | THERMAL_GENL_CMD_EVENT, | ||
158 | __THERMAL_GENL_CMD_MAX, | ||
159 | }; | ||
160 | #define THERMAL_GENL_CMD_MAX (__THERMAL_GENL_CMD_MAX - 1) | ||
130 | 161 | ||
131 | struct thermal_zone_device *thermal_zone_device_register(char *, int, void *, | 162 | struct thermal_zone_device *thermal_zone_device_register(char *, int, void *, |
132 | struct | 163 | struct |
@@ -146,5 +177,6 @@ struct thermal_cooling_device *thermal_cooling_device_register(char *, void *, | |||
146 | thermal_cooling_device_ops | 177 | thermal_cooling_device_ops |
147 | *); | 178 | *); |
148 | void thermal_cooling_device_unregister(struct thermal_cooling_device *); | 179 | void thermal_cooling_device_unregister(struct thermal_cooling_device *); |
180 | extern int generate_netlink_event(u32 orig, enum events event); | ||
149 | 181 | ||
150 | #endif /* __THERMAL_H__ */ | 182 | #endif /* __THERMAL_H__ */ |