2 #define TRACE_SYSTEM thermal
4 #if !defined(_TRACE_THERMAL_H) || defined(TRACE_HEADER_MULTI_READ)
5 #define _TRACE_THERMAL_H
7 #include <linux/thermal.h>
8 #include <linux/tracepoint.h>
10 TRACE_EVENT(thermal_temperature
,
12 TP_PROTO(struct thermal_zone_device
*tz
),
17 __string(thermal_zone
, tz
->type
)
19 __field(int, temp_prev
)
24 __assign_str(thermal_zone
, tz
->type
);
26 __entry
->temp_prev
= tz
->last_temperature
;
27 __entry
->temp
= tz
->temperature
;
30 TP_printk("thermal_zone=%s id=%d temp_prev=%d temp=%d",
31 __get_str(thermal_zone
), __entry
->id
, __entry
->temp_prev
,
35 TRACE_EVENT(cdev_update
,
37 TP_PROTO(struct thermal_cooling_device
*cdev
, unsigned long target
),
39 TP_ARGS(cdev
, target
),
42 __string(type
, cdev
->type
)
43 __field(unsigned long, target
)
47 __assign_str(type
, cdev
->type
);
48 __entry
->target
= target
;
51 TP_printk("type=%s target=%lu", __get_str(type
), __entry
->target
)
54 TRACE_EVENT(thermal_zone_trip
,
56 TP_PROTO(struct thermal_zone_device
*tz
, int trip
,
57 enum thermal_trip_type trip_type
),
59 TP_ARGS(tz
, trip
, trip_type
),
62 __string(thermal_zone
, tz
->type
)
65 __field(enum thermal_trip_type
, trip_type
)
69 __assign_str(thermal_zone
, tz
->type
);
72 __entry
->trip_type
= trip_type
;
75 TP_printk("thermal_zone=%s id=%d trip=%d trip_type=%d",
76 __get_str(thermal_zone
), __entry
->id
, __entry
->trip
,
80 #endif /* _TRACE_THERMAL_H */
82 /* This part must be outside protection */
83 #include <trace/define_trace.h>