diff options
Diffstat (limited to 'include/linux/thermal.h')
-rw-r--r-- | include/linux/thermal.h | 34 |
1 files changed, 18 insertions, 16 deletions
diff --git a/include/linux/thermal.h b/include/linux/thermal.h index 037e9df2f610..157d366e761b 100644 --- a/include/linux/thermal.h +++ b/include/linux/thermal.h | |||
@@ -92,23 +92,19 @@ struct thermal_zone_device_ops { | |||
92 | struct thermal_cooling_device *); | 92 | struct thermal_cooling_device *); |
93 | int (*unbind) (struct thermal_zone_device *, | 93 | int (*unbind) (struct thermal_zone_device *, |
94 | struct thermal_cooling_device *); | 94 | struct thermal_cooling_device *); |
95 | int (*get_temp) (struct thermal_zone_device *, unsigned long *); | 95 | int (*get_temp) (struct thermal_zone_device *, int *); |
96 | int (*get_mode) (struct thermal_zone_device *, | 96 | int (*get_mode) (struct thermal_zone_device *, |
97 | enum thermal_device_mode *); | 97 | enum thermal_device_mode *); |
98 | int (*set_mode) (struct thermal_zone_device *, | 98 | int (*set_mode) (struct thermal_zone_device *, |
99 | enum thermal_device_mode); | 99 | enum thermal_device_mode); |
100 | int (*get_trip_type) (struct thermal_zone_device *, int, | 100 | int (*get_trip_type) (struct thermal_zone_device *, int, |
101 | enum thermal_trip_type *); | 101 | enum thermal_trip_type *); |
102 | int (*get_trip_temp) (struct thermal_zone_device *, int, | 102 | int (*get_trip_temp) (struct thermal_zone_device *, int, int *); |
103 | unsigned long *); | 103 | int (*set_trip_temp) (struct thermal_zone_device *, int, int); |
104 | int (*set_trip_temp) (struct thermal_zone_device *, int, | 104 | int (*get_trip_hyst) (struct thermal_zone_device *, int, int *); |
105 | unsigned long); | 105 | int (*set_trip_hyst) (struct thermal_zone_device *, int, int); |
106 | int (*get_trip_hyst) (struct thermal_zone_device *, int, | 106 | int (*get_crit_temp) (struct thermal_zone_device *, int *); |
107 | unsigned long *); | 107 | int (*set_emul_temp) (struct thermal_zone_device *, int); |
108 | int (*set_trip_hyst) (struct thermal_zone_device *, int, | ||
109 | unsigned long); | ||
110 | int (*get_crit_temp) (struct thermal_zone_device *, unsigned long *); | ||
111 | int (*set_emul_temp) (struct thermal_zone_device *, unsigned long); | ||
112 | int (*get_trend) (struct thermal_zone_device *, int, | 108 | int (*get_trend) (struct thermal_zone_device *, int, |
113 | enum thermal_trend *); | 109 | enum thermal_trend *); |
114 | int (*notify) (struct thermal_zone_device *, int, | 110 | int (*notify) (struct thermal_zone_device *, int, |
@@ -332,9 +328,9 @@ struct thermal_genl_event { | |||
332 | * temperature. | 328 | * temperature. |
333 | */ | 329 | */ |
334 | struct thermal_zone_of_device_ops { | 330 | struct thermal_zone_of_device_ops { |
335 | int (*get_temp)(void *, long *); | 331 | int (*get_temp)(void *, int *); |
336 | int (*get_trend)(void *, long *); | 332 | int (*get_trend)(void *, long *); |
337 | int (*set_emul_temp)(void *, unsigned long); | 333 | int (*set_emul_temp)(void *, int); |
338 | }; | 334 | }; |
339 | 335 | ||
340 | /** | 336 | /** |
@@ -364,7 +360,7 @@ static inline struct thermal_zone_device * | |||
364 | thermal_zone_of_sensor_register(struct device *dev, int id, void *data, | 360 | thermal_zone_of_sensor_register(struct device *dev, int id, void *data, |
365 | const struct thermal_zone_of_device_ops *ops) | 361 | const struct thermal_zone_of_device_ops *ops) |
366 | { | 362 | { |
367 | return NULL; | 363 | return ERR_PTR(-ENODEV); |
368 | } | 364 | } |
369 | 365 | ||
370 | static inline | 366 | static inline |
@@ -384,6 +380,8 @@ static inline bool cdev_is_power_actor(struct thermal_cooling_device *cdev) | |||
384 | 380 | ||
385 | int power_actor_get_max_power(struct thermal_cooling_device *, | 381 | int power_actor_get_max_power(struct thermal_cooling_device *, |
386 | struct thermal_zone_device *tz, u32 *max_power); | 382 | struct thermal_zone_device *tz, u32 *max_power); |
383 | int power_actor_get_min_power(struct thermal_cooling_device *, | ||
384 | struct thermal_zone_device *tz, u32 *min_power); | ||
387 | int power_actor_set_power(struct thermal_cooling_device *, | 385 | int power_actor_set_power(struct thermal_cooling_device *, |
388 | struct thermal_instance *, u32); | 386 | struct thermal_instance *, u32); |
389 | struct thermal_zone_device *thermal_zone_device_register(const char *, int, int, | 387 | struct thermal_zone_device *thermal_zone_device_register(const char *, int, int, |
@@ -406,7 +404,7 @@ thermal_of_cooling_device_register(struct device_node *np, char *, void *, | |||
406 | const struct thermal_cooling_device_ops *); | 404 | const struct thermal_cooling_device_ops *); |
407 | void thermal_cooling_device_unregister(struct thermal_cooling_device *); | 405 | void thermal_cooling_device_unregister(struct thermal_cooling_device *); |
408 | struct thermal_zone_device *thermal_zone_get_zone_by_name(const char *name); | 406 | struct thermal_zone_device *thermal_zone_get_zone_by_name(const char *name); |
409 | int thermal_zone_get_temp(struct thermal_zone_device *tz, unsigned long *temp); | 407 | int thermal_zone_get_temp(struct thermal_zone_device *tz, int *temp); |
410 | 408 | ||
411 | int get_tz_trend(struct thermal_zone_device *, int); | 409 | int get_tz_trend(struct thermal_zone_device *, int); |
412 | struct thermal_instance *get_thermal_instance(struct thermal_zone_device *, | 410 | struct thermal_instance *get_thermal_instance(struct thermal_zone_device *, |
@@ -419,6 +417,10 @@ static inline bool cdev_is_power_actor(struct thermal_cooling_device *cdev) | |||
419 | static inline int power_actor_get_max_power(struct thermal_cooling_device *cdev, | 417 | static inline int power_actor_get_max_power(struct thermal_cooling_device *cdev, |
420 | struct thermal_zone_device *tz, u32 *max_power) | 418 | struct thermal_zone_device *tz, u32 *max_power) |
421 | { return 0; } | 419 | { return 0; } |
420 | static inline int power_actor_get_min_power(struct thermal_cooling_device *cdev, | ||
421 | struct thermal_zone_device *tz, | ||
422 | u32 *min_power) | ||
423 | { return -ENODEV; } | ||
422 | static inline int power_actor_set_power(struct thermal_cooling_device *cdev, | 424 | static inline int power_actor_set_power(struct thermal_cooling_device *cdev, |
423 | struct thermal_instance *tz, u32 power) | 425 | struct thermal_instance *tz, u32 power) |
424 | { return 0; } | 426 | { return 0; } |
@@ -457,7 +459,7 @@ static inline struct thermal_zone_device *thermal_zone_get_zone_by_name( | |||
457 | const char *name) | 459 | const char *name) |
458 | { return ERR_PTR(-ENODEV); } | 460 | { return ERR_PTR(-ENODEV); } |
459 | static inline int thermal_zone_get_temp( | 461 | static inline int thermal_zone_get_temp( |
460 | struct thermal_zone_device *tz, unsigned long *temp) | 462 | struct thermal_zone_device *tz, int *temp) |
461 | { return -ENODEV; } | 463 | { return -ENODEV; } |
462 | static inline int get_tz_trend(struct thermal_zone_device *tz, int trip) | 464 | static inline int get_tz_trend(struct thermal_zone_device *tz, int trip) |
463 | { return -ENODEV; } | 465 | { return -ENODEV; } |