Merge tag 'trace-v5.11-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/rostedt...
[linux/fpc-iii.git] / drivers / base / regmap / trace.h
blob9abee14df9eea2d50213389ff745db92961cbac8
1 /* SPDX-License-Identifier: GPL-2.0 */
2 #undef TRACE_SYSTEM
3 #define TRACE_SYSTEM regmap
5 #if !defined(_TRACE_REGMAP_H) || defined(TRACE_HEADER_MULTI_READ)
6 #define _TRACE_REGMAP_H
8 #include <linux/ktime.h>
9 #include <linux/tracepoint.h>
11 #include "internal.h"
14 * Log register events
16 DECLARE_EVENT_CLASS(regmap_reg,
18 TP_PROTO(struct regmap *map, unsigned int reg,
19 unsigned int val),
21 TP_ARGS(map, reg, val),
23 TP_STRUCT__entry(
24 __string( name, regmap_name(map) )
25 __field( unsigned int, reg )
26 __field( unsigned int, val )
29 TP_fast_assign(
30 __assign_str(name, regmap_name(map));
31 __entry->reg = reg;
32 __entry->val = val;
35 TP_printk("%s reg=%x val=%x", __get_str(name),
36 (unsigned int)__entry->reg,
37 (unsigned int)__entry->val)
40 DEFINE_EVENT(regmap_reg, regmap_reg_write,
42 TP_PROTO(struct regmap *map, unsigned int reg,
43 unsigned int val),
45 TP_ARGS(map, reg, val)
49 DEFINE_EVENT(regmap_reg, regmap_reg_read,
51 TP_PROTO(struct regmap *map, unsigned int reg,
52 unsigned int val),
54 TP_ARGS(map, reg, val)
58 DEFINE_EVENT(regmap_reg, regmap_reg_read_cache,
60 TP_PROTO(struct regmap *map, unsigned int reg,
61 unsigned int val),
63 TP_ARGS(map, reg, val)
67 DECLARE_EVENT_CLASS(regmap_block,
69 TP_PROTO(struct regmap *map, unsigned int reg, int count),
71 TP_ARGS(map, reg, count),
73 TP_STRUCT__entry(
74 __string( name, regmap_name(map) )
75 __field( unsigned int, reg )
76 __field( int, count )
79 TP_fast_assign(
80 __assign_str(name, regmap_name(map));
81 __entry->reg = reg;
82 __entry->count = count;
85 TP_printk("%s reg=%x count=%d", __get_str(name),
86 (unsigned int)__entry->reg,
87 (int)__entry->count)
90 DEFINE_EVENT(regmap_block, regmap_hw_read_start,
92 TP_PROTO(struct regmap *map, unsigned int reg, int count),
94 TP_ARGS(map, reg, count)
97 DEFINE_EVENT(regmap_block, regmap_hw_read_done,
99 TP_PROTO(struct regmap *map, unsigned int reg, int count),
101 TP_ARGS(map, reg, count)
104 DEFINE_EVENT(regmap_block, regmap_hw_write_start,
106 TP_PROTO(struct regmap *map, unsigned int reg, int count),
108 TP_ARGS(map, reg, count)
111 DEFINE_EVENT(regmap_block, regmap_hw_write_done,
113 TP_PROTO(struct regmap *map, unsigned int reg, int count),
115 TP_ARGS(map, reg, count)
118 TRACE_EVENT(regcache_sync,
120 TP_PROTO(struct regmap *map, const char *type,
121 const char *status),
123 TP_ARGS(map, type, status),
125 TP_STRUCT__entry(
126 __string( name, regmap_name(map) )
127 __string( status, status )
128 __string( type, type )
131 TP_fast_assign(
132 __assign_str(name, regmap_name(map));
133 __assign_str(status, status);
134 __assign_str(type, type);
137 TP_printk("%s type=%s status=%s", __get_str(name),
138 __get_str(type), __get_str(status))
141 DECLARE_EVENT_CLASS(regmap_bool,
143 TP_PROTO(struct regmap *map, bool flag),
145 TP_ARGS(map, flag),
147 TP_STRUCT__entry(
148 __string( name, regmap_name(map) )
149 __field( int, flag )
152 TP_fast_assign(
153 __assign_str(name, regmap_name(map));
154 __entry->flag = flag;
157 TP_printk("%s flag=%d", __get_str(name),
158 (int)__entry->flag)
161 DEFINE_EVENT(regmap_bool, regmap_cache_only,
163 TP_PROTO(struct regmap *map, bool flag),
165 TP_ARGS(map, flag)
169 DEFINE_EVENT(regmap_bool, regmap_cache_bypass,
171 TP_PROTO(struct regmap *map, bool flag),
173 TP_ARGS(map, flag)
177 DECLARE_EVENT_CLASS(regmap_async,
179 TP_PROTO(struct regmap *map),
181 TP_ARGS(map),
183 TP_STRUCT__entry(
184 __string( name, regmap_name(map) )
187 TP_fast_assign(
188 __assign_str(name, regmap_name(map));
191 TP_printk("%s", __get_str(name))
194 DEFINE_EVENT(regmap_block, regmap_async_write_start,
196 TP_PROTO(struct regmap *map, unsigned int reg, int count),
198 TP_ARGS(map, reg, count)
201 DEFINE_EVENT(regmap_async, regmap_async_io_complete,
203 TP_PROTO(struct regmap *map),
205 TP_ARGS(map)
209 DEFINE_EVENT(regmap_async, regmap_async_complete_start,
211 TP_PROTO(struct regmap *map),
213 TP_ARGS(map)
217 DEFINE_EVENT(regmap_async, regmap_async_complete_done,
219 TP_PROTO(struct regmap *map),
221 TP_ARGS(map)
225 TRACE_EVENT(regcache_drop_region,
227 TP_PROTO(struct regmap *map, unsigned int from,
228 unsigned int to),
230 TP_ARGS(map, from, to),
232 TP_STRUCT__entry(
233 __string( name, regmap_name(map) )
234 __field( unsigned int, from )
235 __field( unsigned int, to )
238 TP_fast_assign(
239 __assign_str(name, regmap_name(map));
240 __entry->from = from;
241 __entry->to = to;
244 TP_printk("%s %u-%u", __get_str(name), (unsigned int)__entry->from,
245 (unsigned int)__entry->to)
248 #endif /* _TRACE_REGMAP_H */
250 #undef TRACE_INCLUDE_PATH
251 #define TRACE_INCLUDE_PATH .
253 #undef TRACE_INCLUDE_FILE
254 #define TRACE_INCLUDE_FILE trace
256 /* This part must be outside protection */
257 #include <trace/define_trace.h>