Merge branch 'fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/evalenti/linux...
[linux/fpc-iii.git] / drivers / base / regmap / trace.h
blob64586a1c5a4293ec93448d2d090bb21d19be3dd2
1 #undef TRACE_SYSTEM
2 #define TRACE_SYSTEM regmap
4 #if !defined(_TRACE_REGMAP_H) || defined(TRACE_HEADER_MULTI_READ)
5 #define _TRACE_REGMAP_H
7 #include <linux/ktime.h>
8 #include <linux/tracepoint.h>
10 #include "internal.h"
13 * Log register events
15 DECLARE_EVENT_CLASS(regmap_reg,
17 TP_PROTO(struct regmap *map, unsigned int reg,
18 unsigned int val),
20 TP_ARGS(map, reg, val),
22 TP_STRUCT__entry(
23 __string( name, regmap_name(map) )
24 __field( unsigned int, reg )
25 __field( unsigned int, val )
28 TP_fast_assign(
29 __assign_str(name, regmap_name(map));
30 __entry->reg = reg;
31 __entry->val = val;
34 TP_printk("%s reg=%x val=%x", __get_str(name),
35 (unsigned int)__entry->reg,
36 (unsigned int)__entry->val)
39 DEFINE_EVENT(regmap_reg, regmap_reg_write,
41 TP_PROTO(struct regmap *map, unsigned int reg,
42 unsigned int val),
44 TP_ARGS(map, reg, val)
48 DEFINE_EVENT(regmap_reg, regmap_reg_read,
50 TP_PROTO(struct regmap *map, unsigned int reg,
51 unsigned int val),
53 TP_ARGS(map, reg, val)
57 DEFINE_EVENT(regmap_reg, regmap_reg_read_cache,
59 TP_PROTO(struct regmap *map, unsigned int reg,
60 unsigned int val),
62 TP_ARGS(map, reg, val)
66 DECLARE_EVENT_CLASS(regmap_block,
68 TP_PROTO(struct regmap *map, unsigned int reg, int count),
70 TP_ARGS(map, reg, count),
72 TP_STRUCT__entry(
73 __string( name, regmap_name(map) )
74 __field( unsigned int, reg )
75 __field( int, count )
78 TP_fast_assign(
79 __assign_str(name, regmap_name(map));
80 __entry->reg = reg;
81 __entry->count = count;
84 TP_printk("%s reg=%x count=%d", __get_str(name),
85 (unsigned int)__entry->reg,
86 (int)__entry->count)
89 DEFINE_EVENT(regmap_block, regmap_hw_read_start,
91 TP_PROTO(struct regmap *map, unsigned int reg, int count),
93 TP_ARGS(map, reg, count)
96 DEFINE_EVENT(regmap_block, regmap_hw_read_done,
98 TP_PROTO(struct regmap *map, unsigned int reg, int count),
100 TP_ARGS(map, reg, count)
103 DEFINE_EVENT(regmap_block, regmap_hw_write_start,
105 TP_PROTO(struct regmap *map, unsigned int reg, int count),
107 TP_ARGS(map, reg, count)
110 DEFINE_EVENT(regmap_block, regmap_hw_write_done,
112 TP_PROTO(struct regmap *map, unsigned int reg, int count),
114 TP_ARGS(map, reg, count)
117 TRACE_EVENT(regcache_sync,
119 TP_PROTO(struct regmap *map, const char *type,
120 const char *status),
122 TP_ARGS(map, type, status),
124 TP_STRUCT__entry(
125 __string( name, regmap_name(map) )
126 __string( status, status )
127 __string( type, type )
128 __field( int, 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>