aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
Diffstat (limited to 'include')
-rw-r--r--include/linux/thermal.h26
-rw-r--r--include/trace/events/thermal_power_allocator.h6
2 files changed, 14 insertions, 18 deletions
diff --git a/include/linux/thermal.h b/include/linux/thermal.h
index 037e9df2f610..17292fee8686 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 */
334struct thermal_zone_of_device_ops { 330struct 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/**
@@ -406,7 +402,7 @@ thermal_of_cooling_device_register(struct device_node *np, char *, void *,
406 const struct thermal_cooling_device_ops *); 402 const struct thermal_cooling_device_ops *);
407void thermal_cooling_device_unregister(struct thermal_cooling_device *); 403void thermal_cooling_device_unregister(struct thermal_cooling_device *);
408struct thermal_zone_device *thermal_zone_get_zone_by_name(const char *name); 404struct thermal_zone_device *thermal_zone_get_zone_by_name(const char *name);
409int thermal_zone_get_temp(struct thermal_zone_device *tz, unsigned long *temp); 405int thermal_zone_get_temp(struct thermal_zone_device *tz, int *temp);
410 406
411int get_tz_trend(struct thermal_zone_device *, int); 407int get_tz_trend(struct thermal_zone_device *, int);
412struct thermal_instance *get_thermal_instance(struct thermal_zone_device *, 408struct thermal_instance *get_thermal_instance(struct thermal_zone_device *,
@@ -457,7 +453,7 @@ static inline struct thermal_zone_device *thermal_zone_get_zone_by_name(
457 const char *name) 453 const char *name)
458{ return ERR_PTR(-ENODEV); } 454{ return ERR_PTR(-ENODEV); }
459static inline int thermal_zone_get_temp( 455static inline int thermal_zone_get_temp(
460 struct thermal_zone_device *tz, unsigned long *temp) 456 struct thermal_zone_device *tz, int *temp)
461{ return -ENODEV; } 457{ return -ENODEV; }
462static inline int get_tz_trend(struct thermal_zone_device *tz, int trip) 458static inline int get_tz_trend(struct thermal_zone_device *tz, int trip)
463{ return -ENODEV; } 459{ return -ENODEV; }
diff --git a/include/trace/events/thermal_power_allocator.h b/include/trace/events/thermal_power_allocator.h
index 12e1321c4e0c..5afae8fe3795 100644
--- a/include/trace/events/thermal_power_allocator.h
+++ b/include/trace/events/thermal_power_allocator.h
@@ -11,7 +11,7 @@ TRACE_EVENT(thermal_power_allocator,
11 u32 total_req_power, u32 *granted_power, 11 u32 total_req_power, u32 *granted_power,
12 u32 total_granted_power, size_t num_actors, 12 u32 total_granted_power, size_t num_actors,
13 u32 power_range, u32 max_allocatable_power, 13 u32 power_range, u32 max_allocatable_power,
14 unsigned long current_temp, s32 delta_temp), 14 int current_temp, s32 delta_temp),
15 TP_ARGS(tz, req_power, total_req_power, granted_power, 15 TP_ARGS(tz, req_power, total_req_power, granted_power,
16 total_granted_power, num_actors, power_range, 16 total_granted_power, num_actors, power_range,
17 max_allocatable_power, current_temp, delta_temp), 17 max_allocatable_power, current_temp, delta_temp),
@@ -24,7 +24,7 @@ TRACE_EVENT(thermal_power_allocator,
24 __field(size_t, num_actors ) 24 __field(size_t, num_actors )
25 __field(u32, power_range ) 25 __field(u32, power_range )
26 __field(u32, max_allocatable_power ) 26 __field(u32, max_allocatable_power )
27 __field(unsigned long, current_temp ) 27 __field(int, current_temp )
28 __field(s32, delta_temp ) 28 __field(s32, delta_temp )
29 ), 29 ),
30 TP_fast_assign( 30 TP_fast_assign(
@@ -42,7 +42,7 @@ TRACE_EVENT(thermal_power_allocator,
42 __entry->delta_temp = delta_temp; 42 __entry->delta_temp = delta_temp;
43 ), 43 ),
44 44
45 TP_printk("thermal_zone_id=%d req_power={%s} total_req_power=%u granted_power={%s} total_granted_power=%u power_range=%u max_allocatable_power=%u current_temperature=%lu delta_temperature=%d", 45 TP_printk("thermal_zone_id=%d req_power={%s} total_req_power=%u granted_power={%s} total_granted_power=%u power_range=%u max_allocatable_power=%u current_temperature=%d delta_temperature=%d",
46 __entry->tz_id, 46 __entry->tz_id,
47 __print_array(__get_dynamic_array(req_power), 47 __print_array(__get_dynamic_array(req_power),
48 __entry->num_actors, 4), 48 __entry->num_actors, 4),