894a79ea0686e7f4a3919e07c1ad87b0d429d13b
[cascardo/linux.git] / include / trace / events / thermal.h
1 #undef TRACE_SYSTEM
2 #define TRACE_SYSTEM thermal
3
4 #if !defined(_TRACE_THERMAL_H) || defined(TRACE_HEADER_MULTI_READ)
5 #define _TRACE_THERMAL_H
6
7 #include <linux/thermal.h>
8 #include <linux/tracepoint.h>
9
10 TRACE_EVENT(thermal_temperature,
11
12         TP_PROTO(struct thermal_zone_device *tz),
13
14         TP_ARGS(tz),
15
16         TP_STRUCT__entry(
17                 __string(thermal_zone, tz->type)
18                 __field(int, id)
19                 __field(int, temp_prev)
20                 __field(int, temp)
21         ),
22
23         TP_fast_assign(
24                 __assign_str(thermal_zone, tz->type);
25                 __entry->id = tz->id;
26                 __entry->temp_prev = tz->last_temperature;
27                 __entry->temp = tz->temperature;
28         ),
29
30         TP_printk("thermal_zone=%s id=%d temp_prev=%d temp=%d",
31                 __get_str(thermal_zone), __entry->id, __entry->temp_prev,
32                 __entry->temp)
33 );
34
35 TRACE_EVENT(cdev_update,
36
37         TP_PROTO(struct thermal_cooling_device *cdev, unsigned long target),
38
39         TP_ARGS(cdev, target),
40
41         TP_STRUCT__entry(
42                 __string(type, cdev->type)
43                 __field(unsigned long, target)
44         ),
45
46         TP_fast_assign(
47                 __assign_str(type, cdev->type);
48                 __entry->target = target;
49         ),
50
51         TP_printk("type=%s target=%lu", __get_str(type), __entry->target)
52 );
53
54 #endif /* _TRACE_THERMAL_H */
55
56 /* This part must be outside protection */
57 #include <trace/define_trace.h>