• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /* SPDX-License-Identifier: GPL-2.0 */
2 
3 #undef TRACE_SYSTEM
4 #define TRACE_SYSTEM fsi_master_gpio
5 
6 #if !defined(_TRACE_FSI_MASTER_GPIO_H) || defined(TRACE_HEADER_MULTI_READ)
7 #define _TRACE_FSI_MASTER_GPIO_H
8 
9 #include <linux/tracepoint.h>
10 
11 TRACE_EVENT(fsi_master_gpio_in,
12 	TP_PROTO(const struct fsi_master_gpio *master, int bits, uint64_t msg),
13 	TP_ARGS(master, bits, msg),
14 	TP_STRUCT__entry(
15 		__field(int,	master_idx)
16 		__field(int,	bits)
17 		__field(uint64_t, msg)
18 	),
19 	TP_fast_assign(
20 		__entry->master_idx = master->master.idx;
21 		__entry->bits = bits;
22 		__entry->msg  = msg & ((1ull<<bits) - 1);
23 	),
24 	TP_printk("fsi-gpio%d => %0*llx[%d]",
25 		__entry->master_idx,
26 		(__entry->bits + 3) / 4,
27 		__entry->msg,
28 		__entry->bits
29 	)
30 );
31 
32 TRACE_EVENT(fsi_master_gpio_out,
33 	TP_PROTO(const struct fsi_master_gpio *master, int bits, uint64_t msg),
34 	TP_ARGS(master, bits, msg),
35 	TP_STRUCT__entry(
36 		__field(int,	master_idx)
37 		__field(int,	bits)
38 		__field(uint64_t, msg)
39 	),
40 	TP_fast_assign(
41 		__entry->master_idx = master->master.idx;
42 		__entry->bits = bits;
43 		__entry->msg  = msg & ((1ull<<bits) - 1);
44 	),
45 	TP_printk("fsi-gpio%d <= %0*llx[%d]",
46 		__entry->master_idx,
47 		(__entry->bits + 3) / 4,
48 		__entry->msg,
49 		__entry->bits
50 	)
51 );
52 
53 TRACE_EVENT(fsi_master_gpio_clock_zeros,
54 	TP_PROTO(const struct fsi_master_gpio *master, int clocks),
55 	TP_ARGS(master, clocks),
56 	TP_STRUCT__entry(
57 		__field(int,	master_idx)
58 		__field(int,	clocks)
59 	),
60 	TP_fast_assign(
61 		__entry->master_idx = master->master.idx;
62 		__entry->clocks = clocks;
63 	),
64 	TP_printk("fsi-gpio%d clock %d zeros",
65 		  __entry->master_idx, __entry->clocks
66 	)
67 );
68 
69 TRACE_EVENT(fsi_master_gpio_break,
70 	TP_PROTO(const struct fsi_master_gpio *master),
71 	TP_ARGS(master),
72 	TP_STRUCT__entry(
73 		__field(int,	master_idx)
74 	),
75 	TP_fast_assign(
76 		__entry->master_idx = master->master.idx;
77 	),
78 	TP_printk("fsi-gpio%d ----break---",
79 		__entry->master_idx
80 	)
81 );
82 
83 TRACE_EVENT(fsi_master_gpio_crc_cmd_error,
84 	TP_PROTO(const struct fsi_master_gpio *master),
85 	TP_ARGS(master),
86 	TP_STRUCT__entry(
87 		__field(int,	master_idx)
88 	),
89 	TP_fast_assign(
90 		__entry->master_idx = master->master.idx;
91 	),
92 	TP_printk("fsi-gpio%d ----CRC command retry---",
93 		__entry->master_idx
94 	)
95 );
96 
97 TRACE_EVENT(fsi_master_gpio_crc_rsp_error,
98 	TP_PROTO(const struct fsi_master_gpio *master),
99 	TP_ARGS(master),
100 	TP_STRUCT__entry(
101 		__field(int,	master_idx)
102 	),
103 	TP_fast_assign(
104 		__entry->master_idx = master->master.idx;
105 	),
106 	TP_printk("fsi-gpio%d ----CRC response---",
107 		__entry->master_idx
108 	)
109 );
110 
111 TRACE_EVENT(fsi_master_gpio_poll_response_busy,
112 	TP_PROTO(const struct fsi_master_gpio *master, int busy),
113 	TP_ARGS(master, busy),
114 	TP_STRUCT__entry(
115 		__field(int,	master_idx)
116 		__field(int,	busy)
117 	),
118 	TP_fast_assign(
119 		__entry->master_idx = master->master.idx;
120 		__entry->busy = busy;
121 	),
122 	TP_printk("fsi-gpio%d: device reported busy %d times",
123 		__entry->master_idx, __entry->busy)
124 );
125 
126 TRACE_EVENT(fsi_master_gpio_cmd_abs_addr,
127 	TP_PROTO(const struct fsi_master_gpio *master, u32 addr),
128 	TP_ARGS(master, addr),
129 	TP_STRUCT__entry(
130 		__field(int,	master_idx)
131 		__field(u32,	addr)
132 	),
133 	TP_fast_assign(
134 		__entry->master_idx = master->master.idx;
135 		__entry->addr = addr;
136 	),
137 	TP_printk("fsi-gpio%d: Sending ABS_ADR %06x",
138 		__entry->master_idx, __entry->addr)
139 );
140 
141 TRACE_EVENT(fsi_master_gpio_cmd_rel_addr,
142 	TP_PROTO(const struct fsi_master_gpio *master, u32 rel_addr),
143 	TP_ARGS(master, rel_addr),
144 	TP_STRUCT__entry(
145 		__field(int,	master_idx)
146 		__field(u32,	rel_addr)
147 	),
148 	TP_fast_assign(
149 		__entry->master_idx = master->master.idx;
150 		__entry->rel_addr = rel_addr;
151 	),
152 	TP_printk("fsi-gpio%d: Sending REL_ADR %03x",
153 		__entry->master_idx, __entry->rel_addr)
154 );
155 
156 TRACE_EVENT(fsi_master_gpio_cmd_same_addr,
157 	TP_PROTO(const struct fsi_master_gpio *master),
158 	TP_ARGS(master),
159 	TP_STRUCT__entry(
160 		__field(int,	master_idx)
161 	),
162 	TP_fast_assign(
163 		__entry->master_idx = master->master.idx;
164 	),
165 	TP_printk("fsi-gpio%d: Sending SAME_ADR",
166 		__entry->master_idx)
167 );
168 
169 #endif /* _TRACE_FSI_MASTER_GPIO_H */
170 
171 #include <trace/define_trace.h>
172