spi-topcliff-pch: add recovery processing in case wait-event timeout
[zen-stable.git] / include / trace / events / rpm.h
blobd62c558bf64be73a957cfafa171cd53b9530b5a8
2 #undef TRACE_SYSTEM
3 #define TRACE_SYSTEM rpm
5 #if !defined(_TRACE_RUNTIME_POWER_H) || defined(TRACE_HEADER_MULTI_READ)
6 #define _TRACE_RUNTIME_POWER_H
8 #include <linux/ktime.h>
9 #include <linux/tracepoint.h>
10 #include <linux/device.h>
13 * The rpm_internal events are used for tracing some important
14 * runtime pm internal functions.
16 DECLARE_EVENT_CLASS(rpm_internal,
18 TP_PROTO(struct device *dev, int flags),
20 TP_ARGS(dev, flags),
22 TP_STRUCT__entry(
23 __string( name, dev_name(dev) )
24 __field( int, flags )
25 __field( int , usage_count )
26 __field( int , disable_depth )
27 __field( int , runtime_auto )
28 __field( int , request_pending )
29 __field( int , irq_safe )
30 __field( int , child_count )
33 TP_fast_assign(
34 __assign_str(name, dev_name(dev));
35 __entry->flags = flags;
36 __entry->usage_count = atomic_read(
37 &dev->power.usage_count);
38 __entry->disable_depth = dev->power.disable_depth;
39 __entry->runtime_auto = dev->power.runtime_auto;
40 __entry->request_pending = dev->power.request_pending;
41 __entry->irq_safe = dev->power.irq_safe;
42 __entry->child_count = atomic_read(
43 &dev->power.child_count);
46 TP_printk("%s flags-%x cnt-%-2d dep-%-2d auto-%-1d p-%-1d"
47 " irq-%-1d child-%d",
48 __get_str(name), __entry->flags,
49 __entry->usage_count,
50 __entry->disable_depth,
51 __entry->runtime_auto,
52 __entry->request_pending,
53 __entry->irq_safe,
54 __entry->child_count
57 DEFINE_EVENT(rpm_internal, rpm_suspend,
59 TP_PROTO(struct device *dev, int flags),
61 TP_ARGS(dev, flags)
63 DEFINE_EVENT(rpm_internal, rpm_resume,
65 TP_PROTO(struct device *dev, int flags),
67 TP_ARGS(dev, flags)
69 DEFINE_EVENT(rpm_internal, rpm_idle,
71 TP_PROTO(struct device *dev, int flags),
73 TP_ARGS(dev, flags)
76 TRACE_EVENT(rpm_return_int,
77 TP_PROTO(struct device *dev, unsigned long ip, int ret),
78 TP_ARGS(dev, ip, ret),
80 TP_STRUCT__entry(
81 __string( name, dev_name(dev))
82 __field( unsigned long, ip )
83 __field( int, ret )
86 TP_fast_assign(
87 __assign_str(name, dev_name(dev));
88 __entry->ip = ip;
89 __entry->ret = ret;
92 TP_printk("%pS:%s ret=%d", (void *)__entry->ip, __get_str(name),
93 __entry->ret)
96 #endif /* _TRACE_RUNTIME_POWER_H */
98 /* This part must be outside protection */
99 #include <trace/define_trace.h>