staging: octeon-usb: add spaces around operator
[linux/fpc-iii.git] / include / trace / events / rpm.h
blob33f85b68c22c13b0a4492d2b81e180edd837886a
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>
11 struct device;
14 * The rpm_internal events are used for tracing some important
15 * runtime pm internal functions.
17 DECLARE_EVENT_CLASS(rpm_internal,
19 TP_PROTO(struct device *dev, int flags),
21 TP_ARGS(dev, flags),
23 TP_STRUCT__entry(
24 __string( name, dev_name(dev) )
25 __field( int, flags )
26 __field( int , usage_count )
27 __field( int , disable_depth )
28 __field( int , runtime_auto )
29 __field( int , request_pending )
30 __field( int , irq_safe )
31 __field( int , child_count )
34 TP_fast_assign(
35 __assign_str(name, dev_name(dev));
36 __entry->flags = flags;
37 __entry->usage_count = atomic_read(
38 &dev->power.usage_count);
39 __entry->disable_depth = dev->power.disable_depth;
40 __entry->runtime_auto = dev->power.runtime_auto;
41 __entry->request_pending = dev->power.request_pending;
42 __entry->irq_safe = dev->power.irq_safe;
43 __entry->child_count = atomic_read(
44 &dev->power.child_count);
47 TP_printk("%s flags-%x cnt-%-2d dep-%-2d auto-%-1d p-%-1d"
48 " irq-%-1d child-%d",
49 __get_str(name), __entry->flags,
50 __entry->usage_count,
51 __entry->disable_depth,
52 __entry->runtime_auto,
53 __entry->request_pending,
54 __entry->irq_safe,
55 __entry->child_count
58 DEFINE_EVENT(rpm_internal, rpm_suspend,
60 TP_PROTO(struct device *dev, int flags),
62 TP_ARGS(dev, flags)
64 DEFINE_EVENT(rpm_internal, rpm_resume,
66 TP_PROTO(struct device *dev, int flags),
68 TP_ARGS(dev, flags)
70 DEFINE_EVENT(rpm_internal, rpm_idle,
72 TP_PROTO(struct device *dev, int flags),
74 TP_ARGS(dev, flags)
77 TRACE_EVENT(rpm_return_int,
78 TP_PROTO(struct device *dev, unsigned long ip, int ret),
79 TP_ARGS(dev, ip, ret),
81 TP_STRUCT__entry(
82 __string( name, dev_name(dev))
83 __field( unsigned long, ip )
84 __field( int, ret )
87 TP_fast_assign(
88 __assign_str(name, dev_name(dev));
89 __entry->ip = ip;
90 __entry->ret = ret;
93 TP_printk("%pS:%s ret=%d", (void *)__entry->ip, __get_str(name),
94 __entry->ret)
97 #endif /* _TRACE_RUNTIME_POWER_H */
99 /* This part must be outside protection */
100 #include <trace/define_trace.h>