perf hists: Move sort__has_sym into struct perf_hpp_list
[linux/fpc-iii.git] / include / trace / events / spmi.h
blob62f005ef4c7e5964e177cac880675597644cfb25
1 #undef TRACE_SYSTEM
2 #define TRACE_SYSTEM spmi
4 #if !defined(_TRACE_SPMI_H) || defined(TRACE_HEADER_MULTI_READ)
5 #define _TRACE_SPMI_H
7 #include <linux/spmi.h>
8 #include <linux/tracepoint.h>
11 * drivers/spmi/spmi.c
14 TRACE_EVENT(spmi_write_begin,
15 TP_PROTO(u8 opcode, u8 sid, u16 addr, u8 len, const u8 *buf),
16 TP_ARGS(opcode, sid, addr, len, buf),
18 TP_STRUCT__entry(
19 __field ( u8, opcode )
20 __field ( u8, sid )
21 __field ( u16, addr )
22 __field ( u8, len )
23 __dynamic_array ( u8, buf, len + 1 )
26 TP_fast_assign(
27 __entry->opcode = opcode;
28 __entry->sid = sid;
29 __entry->addr = addr;
30 __entry->len = len + 1;
31 memcpy(__get_dynamic_array(buf), buf, len + 1);
34 TP_printk("opc=%d sid=%02d addr=0x%04x len=%d buf=0x[%*phD]",
35 (int)__entry->opcode, (int)__entry->sid,
36 (int)__entry->addr, (int)__entry->len,
37 (int)__entry->len, __get_dynamic_array(buf))
40 TRACE_EVENT(spmi_write_end,
41 TP_PROTO(u8 opcode, u8 sid, u16 addr, int ret),
42 TP_ARGS(opcode, sid, addr, ret),
44 TP_STRUCT__entry(
45 __field ( u8, opcode )
46 __field ( u8, sid )
47 __field ( u16, addr )
48 __field ( int, ret )
51 TP_fast_assign(
52 __entry->opcode = opcode;
53 __entry->sid = sid;
54 __entry->addr = addr;
55 __entry->ret = ret;
58 TP_printk("opc=%d sid=%02d addr=0x%04x ret=%d",
59 (int)__entry->opcode, (int)__entry->sid,
60 (int)__entry->addr, __entry->ret)
63 TRACE_EVENT(spmi_read_begin,
64 TP_PROTO(u8 opcode, u8 sid, u16 addr),
65 TP_ARGS(opcode, sid, addr),
67 TP_STRUCT__entry(
68 __field ( u8, opcode )
69 __field ( u8, sid )
70 __field ( u16, addr )
73 TP_fast_assign(
74 __entry->opcode = opcode;
75 __entry->sid = sid;
76 __entry->addr = addr;
79 TP_printk("opc=%d sid=%02d addr=0x%04x",
80 (int)__entry->opcode, (int)__entry->sid,
81 (int)__entry->addr)
84 TRACE_EVENT(spmi_read_end,
85 TP_PROTO(u8 opcode, u8 sid, u16 addr, int ret, u8 len, const u8 *buf),
86 TP_ARGS(opcode, sid, addr, ret, len, buf),
88 TP_STRUCT__entry(
89 __field ( u8, opcode )
90 __field ( u8, sid )
91 __field ( u16, addr )
92 __field ( int, ret )
93 __field ( u8, len )
94 __dynamic_array ( u8, buf, len + 1 )
97 TP_fast_assign(
98 __entry->opcode = opcode;
99 __entry->sid = sid;
100 __entry->addr = addr;
101 __entry->ret = ret;
102 __entry->len = len + 1;
103 memcpy(__get_dynamic_array(buf), buf, len + 1);
106 TP_printk("opc=%d sid=%02d addr=0x%04x ret=%d len=%02d buf=0x[%*phD]",
107 (int)__entry->opcode, (int)__entry->sid,
108 (int)__entry->addr, __entry->ret, (int)__entry->len,
109 (int)__entry->len, __get_dynamic_array(buf))
112 TRACE_EVENT(spmi_cmd,
113 TP_PROTO(u8 opcode, u8 sid, int ret),
114 TP_ARGS(opcode, sid, ret),
116 TP_STRUCT__entry(
117 __field ( u8, opcode )
118 __field ( u8, sid )
119 __field ( int, ret )
122 TP_fast_assign(
123 __entry->opcode = opcode;
124 __entry->sid = sid;
125 __entry->ret = ret;
128 TP_printk("opc=%d sid=%02d ret=%d", (int)__entry->opcode,
129 (int)__entry->sid, ret)
132 #endif /* _TRACE_SPMI_H */
134 /* This part must be outside protection */
135 #include <trace/define_trace.h>