drm/panfrost: Remove set but not used variable 'bo'
[linux/fpc-iii.git] / include / trace / events / spmi.h
blob8b60efe18ba687679565cf9b354f7b5c3ed3db41
1 /* SPDX-License-Identifier: GPL-2.0 */
2 #undef TRACE_SYSTEM
3 #define TRACE_SYSTEM spmi
5 #if !defined(_TRACE_SPMI_H) || defined(TRACE_HEADER_MULTI_READ)
6 #define _TRACE_SPMI_H
8 #include <linux/spmi.h>
9 #include <linux/tracepoint.h>
12 * drivers/spmi/spmi.c
15 TRACE_EVENT(spmi_write_begin,
16 TP_PROTO(u8 opcode, u8 sid, u16 addr, u8 len, const u8 *buf),
17 TP_ARGS(opcode, sid, addr, len, buf),
19 TP_STRUCT__entry(
20 __field ( u8, opcode )
21 __field ( u8, sid )
22 __field ( u16, addr )
23 __field ( u8, len )
24 __dynamic_array ( u8, buf, len + 1 )
27 TP_fast_assign(
28 __entry->opcode = opcode;
29 __entry->sid = sid;
30 __entry->addr = addr;
31 __entry->len = len + 1;
32 memcpy(__get_dynamic_array(buf), buf, len + 1);
35 TP_printk("opc=%d sid=%02d addr=0x%04x len=%d buf=0x[%*phD]",
36 (int)__entry->opcode, (int)__entry->sid,
37 (int)__entry->addr, (int)__entry->len,
38 (int)__entry->len, __get_dynamic_array(buf))
41 TRACE_EVENT(spmi_write_end,
42 TP_PROTO(u8 opcode, u8 sid, u16 addr, int ret),
43 TP_ARGS(opcode, sid, addr, ret),
45 TP_STRUCT__entry(
46 __field ( u8, opcode )
47 __field ( u8, sid )
48 __field ( u16, addr )
49 __field ( int, ret )
52 TP_fast_assign(
53 __entry->opcode = opcode;
54 __entry->sid = sid;
55 __entry->addr = addr;
56 __entry->ret = ret;
59 TP_printk("opc=%d sid=%02d addr=0x%04x ret=%d",
60 (int)__entry->opcode, (int)__entry->sid,
61 (int)__entry->addr, __entry->ret)
64 TRACE_EVENT(spmi_read_begin,
65 TP_PROTO(u8 opcode, u8 sid, u16 addr),
66 TP_ARGS(opcode, sid, addr),
68 TP_STRUCT__entry(
69 __field ( u8, opcode )
70 __field ( u8, sid )
71 __field ( u16, addr )
74 TP_fast_assign(
75 __entry->opcode = opcode;
76 __entry->sid = sid;
77 __entry->addr = addr;
80 TP_printk("opc=%d sid=%02d addr=0x%04x",
81 (int)__entry->opcode, (int)__entry->sid,
82 (int)__entry->addr)
85 TRACE_EVENT(spmi_read_end,
86 TP_PROTO(u8 opcode, u8 sid, u16 addr, int ret, u8 len, const u8 *buf),
87 TP_ARGS(opcode, sid, addr, ret, len, buf),
89 TP_STRUCT__entry(
90 __field ( u8, opcode )
91 __field ( u8, sid )
92 __field ( u16, addr )
93 __field ( int, ret )
94 __field ( u8, len )
95 __dynamic_array ( u8, buf, len + 1 )
98 TP_fast_assign(
99 __entry->opcode = opcode;
100 __entry->sid = sid;
101 __entry->addr = addr;
102 __entry->ret = ret;
103 __entry->len = len + 1;
104 memcpy(__get_dynamic_array(buf), buf, len + 1);
107 TP_printk("opc=%d sid=%02d addr=0x%04x ret=%d len=%02d buf=0x[%*phD]",
108 (int)__entry->opcode, (int)__entry->sid,
109 (int)__entry->addr, __entry->ret, (int)__entry->len,
110 (int)__entry->len, __get_dynamic_array(buf))
113 TRACE_EVENT(spmi_cmd,
114 TP_PROTO(u8 opcode, u8 sid, int ret),
115 TP_ARGS(opcode, sid, ret),
117 TP_STRUCT__entry(
118 __field ( u8, opcode )
119 __field ( u8, sid )
120 __field ( int, ret )
123 TP_fast_assign(
124 __entry->opcode = opcode;
125 __entry->sid = sid;
126 __entry->ret = ret;
129 TP_printk("opc=%d sid=%02d ret=%d", (int)__entry->opcode,
130 (int)__entry->sid, ret)
133 #endif /* _TRACE_SPMI_H */
135 /* This part must be outside protection */
136 #include <trace/define_trace.h>