Linux Audio

Check our new training course

Yocto distribution development and maintenance

Need a Yocto distribution for your embedded project?
Loading...
v5.9
  1/* SPDX-License-Identifier: GPL-2.0 */
  2#undef TRACE_SYSTEM
  3#define TRACE_SYSTEM regmap
  4
  5#if !defined(_TRACE_REGMAP_H) || defined(TRACE_HEADER_MULTI_READ)
  6#define _TRACE_REGMAP_H
  7
  8#include <linux/ktime.h>
  9#include <linux/tracepoint.h>
 10
 11#include "internal.h"
 12
 13/*
 14 * Log register events
 15 */
 16DECLARE_EVENT_CLASS(regmap_reg,
 17
 18	TP_PROTO(struct regmap *map, unsigned int reg,
 19		 unsigned int val),
 20
 21	TP_ARGS(map, reg, val),
 22
 23	TP_STRUCT__entry(
 24		__string(	name,		regmap_name(map)	)
 25		__field(	unsigned int,	reg			)
 26		__field(	unsigned int,	val			)
 27	),
 28
 29	TP_fast_assign(
 30		__assign_str(name, regmap_name(map));
 31		__entry->reg = reg;
 32		__entry->val = val;
 33	),
 34
 35	TP_printk("%s reg=%x val=%x", __get_str(name),
 36		  (unsigned int)__entry->reg,
 37		  (unsigned int)__entry->val)
 38);
 39
 40DEFINE_EVENT(regmap_reg, regmap_reg_write,
 41
 42	TP_PROTO(struct regmap *map, unsigned int reg,
 43		 unsigned int val),
 44
 45	TP_ARGS(map, reg, val)
 46
 47);
 48
 49DEFINE_EVENT(regmap_reg, regmap_reg_read,
 50
 51	TP_PROTO(struct regmap *map, unsigned int reg,
 52		 unsigned int val),
 53
 54	TP_ARGS(map, reg, val)
 55
 56);
 57
 58DEFINE_EVENT(regmap_reg, regmap_reg_read_cache,
 59
 60	TP_PROTO(struct regmap *map, unsigned int reg,
 61		 unsigned int val),
 62
 63	TP_ARGS(map, reg, val)
 64
 65);
 66
 67DECLARE_EVENT_CLASS(regmap_block,
 68
 69	TP_PROTO(struct regmap *map, unsigned int reg, int count),
 70
 71	TP_ARGS(map, reg, count),
 72
 73	TP_STRUCT__entry(
 74		__string(	name,		regmap_name(map)	)
 75		__field(	unsigned int,	reg			)
 76		__field(	int,		count			)
 77	),
 78
 79	TP_fast_assign(
 80		__assign_str(name, regmap_name(map));
 81		__entry->reg = reg;
 82		__entry->count = count;
 83	),
 84
 85	TP_printk("%s reg=%x count=%d", __get_str(name),
 86		  (unsigned int)__entry->reg,
 87		  (int)__entry->count)
 88);
 89
 90DEFINE_EVENT(regmap_block, regmap_hw_read_start,
 91
 92	TP_PROTO(struct regmap *map, unsigned int reg, int count),
 93
 94	TP_ARGS(map, reg, count)
 95);
 96
 97DEFINE_EVENT(regmap_block, regmap_hw_read_done,
 98
 99	TP_PROTO(struct regmap *map, unsigned int reg, int count),
100
101	TP_ARGS(map, reg, count)
102);
103
104DEFINE_EVENT(regmap_block, regmap_hw_write_start,
105
106	TP_PROTO(struct regmap *map, unsigned int reg, int count),
107
108	TP_ARGS(map, reg, count)
109);
110
111DEFINE_EVENT(regmap_block, regmap_hw_write_done,
112
113	TP_PROTO(struct regmap *map, unsigned int reg, int count),
114
115	TP_ARGS(map, reg, count)
116);
117
118TRACE_EVENT(regcache_sync,
119
120	TP_PROTO(struct regmap *map, const char *type,
121		 const char *status),
122
123	TP_ARGS(map, type, status),
124
125	TP_STRUCT__entry(
126		__string(       name,           regmap_name(map)	)
127		__string(	status,		status			)
128		__string(	type,		type			)
129		__field(	int,		type			)
130	),
131
132	TP_fast_assign(
133		__assign_str(name, regmap_name(map));
134		__assign_str(status, status);
135		__assign_str(type, type);
136	),
137
138	TP_printk("%s type=%s status=%s", __get_str(name),
139		  __get_str(type), __get_str(status))
140);
141
142DECLARE_EVENT_CLASS(regmap_bool,
143
144	TP_PROTO(struct regmap *map, bool flag),
145
146	TP_ARGS(map, flag),
147
148	TP_STRUCT__entry(
149		__string(	name,		regmap_name(map)	)
150		__field(	int,		flag			)
151	),
152
153	TP_fast_assign(
154		__assign_str(name, regmap_name(map));
155		__entry->flag = flag;
156	),
157
158	TP_printk("%s flag=%d", __get_str(name),
159		  (int)__entry->flag)
160);
161
162DEFINE_EVENT(regmap_bool, regmap_cache_only,
163
164	TP_PROTO(struct regmap *map, bool flag),
165
166	TP_ARGS(map, flag)
167
168);
169
170DEFINE_EVENT(regmap_bool, regmap_cache_bypass,
171
172	TP_PROTO(struct regmap *map, bool flag),
173
174	TP_ARGS(map, flag)
175
176);
177
178DECLARE_EVENT_CLASS(regmap_async,
179
180	TP_PROTO(struct regmap *map),
181
182	TP_ARGS(map),
183
184	TP_STRUCT__entry(
185		__string(	name,		regmap_name(map)	)
186	),
187
188	TP_fast_assign(
189		__assign_str(name, regmap_name(map));
190	),
191
192	TP_printk("%s", __get_str(name))
193);
194
195DEFINE_EVENT(regmap_block, regmap_async_write_start,
196
197	TP_PROTO(struct regmap *map, unsigned int reg, int count),
198
199	TP_ARGS(map, reg, count)
200);
201
202DEFINE_EVENT(regmap_async, regmap_async_io_complete,
203
204	TP_PROTO(struct regmap *map),
205
206	TP_ARGS(map)
207
208);
209
210DEFINE_EVENT(regmap_async, regmap_async_complete_start,
211
212	TP_PROTO(struct regmap *map),
213
214	TP_ARGS(map)
215
216);
217
218DEFINE_EVENT(regmap_async, regmap_async_complete_done,
219
220	TP_PROTO(struct regmap *map),
221
222	TP_ARGS(map)
223
224);
225
226TRACE_EVENT(regcache_drop_region,
227
228	TP_PROTO(struct regmap *map, unsigned int from,
229		 unsigned int to),
230
231	TP_ARGS(map, from, to),
232
233	TP_STRUCT__entry(
234		__string(       name,           regmap_name(map)	)
235		__field(	unsigned int,	from			)
236		__field(	unsigned int,	to			)
237	),
238
239	TP_fast_assign(
240		__assign_str(name, regmap_name(map));
241		__entry->from = from;
242		__entry->to = to;
243	),
244
245	TP_printk("%s %u-%u", __get_str(name), (unsigned int)__entry->from,
246		  (unsigned int)__entry->to)
247);
248
249#endif /* _TRACE_REGMAP_H */
250
251#undef TRACE_INCLUDE_PATH
252#define TRACE_INCLUDE_PATH .
253
254#undef TRACE_INCLUDE_FILE
255#define TRACE_INCLUDE_FILE trace
256
257/* This part must be outside protection */
258#include <trace/define_trace.h>
v4.10.11
 
  1#undef TRACE_SYSTEM
  2#define TRACE_SYSTEM regmap
  3
  4#if !defined(_TRACE_REGMAP_H) || defined(TRACE_HEADER_MULTI_READ)
  5#define _TRACE_REGMAP_H
  6
  7#include <linux/ktime.h>
  8#include <linux/tracepoint.h>
  9
 10#include "internal.h"
 11
 12/*
 13 * Log register events
 14 */
 15DECLARE_EVENT_CLASS(regmap_reg,
 16
 17	TP_PROTO(struct regmap *map, unsigned int reg,
 18		 unsigned int val),
 19
 20	TP_ARGS(map, reg, val),
 21
 22	TP_STRUCT__entry(
 23		__string(	name,		regmap_name(map)	)
 24		__field(	unsigned int,	reg			)
 25		__field(	unsigned int,	val			)
 26	),
 27
 28	TP_fast_assign(
 29		__assign_str(name, regmap_name(map));
 30		__entry->reg = reg;
 31		__entry->val = val;
 32	),
 33
 34	TP_printk("%s reg=%x val=%x", __get_str(name),
 35		  (unsigned int)__entry->reg,
 36		  (unsigned int)__entry->val)
 37);
 38
 39DEFINE_EVENT(regmap_reg, regmap_reg_write,
 40
 41	TP_PROTO(struct regmap *map, unsigned int reg,
 42		 unsigned int val),
 43
 44	TP_ARGS(map, reg, val)
 45
 46);
 47
 48DEFINE_EVENT(regmap_reg, regmap_reg_read,
 49
 50	TP_PROTO(struct regmap *map, unsigned int reg,
 51		 unsigned int val),
 52
 53	TP_ARGS(map, reg, val)
 54
 55);
 56
 57DEFINE_EVENT(regmap_reg, regmap_reg_read_cache,
 58
 59	TP_PROTO(struct regmap *map, unsigned int reg,
 60		 unsigned int val),
 61
 62	TP_ARGS(map, reg, val)
 63
 64);
 65
 66DECLARE_EVENT_CLASS(regmap_block,
 67
 68	TP_PROTO(struct regmap *map, unsigned int reg, int count),
 69
 70	TP_ARGS(map, reg, count),
 71
 72	TP_STRUCT__entry(
 73		__string(	name,		regmap_name(map)	)
 74		__field(	unsigned int,	reg			)
 75		__field(	int,		count			)
 76	),
 77
 78	TP_fast_assign(
 79		__assign_str(name, regmap_name(map));
 80		__entry->reg = reg;
 81		__entry->count = count;
 82	),
 83
 84	TP_printk("%s reg=%x count=%d", __get_str(name),
 85		  (unsigned int)__entry->reg,
 86		  (int)__entry->count)
 87);
 88
 89DEFINE_EVENT(regmap_block, regmap_hw_read_start,
 90
 91	TP_PROTO(struct regmap *map, unsigned int reg, int count),
 92
 93	TP_ARGS(map, reg, count)
 94);
 95
 96DEFINE_EVENT(regmap_block, regmap_hw_read_done,
 97
 98	TP_PROTO(struct regmap *map, unsigned int reg, int count),
 99
100	TP_ARGS(map, reg, count)
101);
102
103DEFINE_EVENT(regmap_block, regmap_hw_write_start,
104
105	TP_PROTO(struct regmap *map, unsigned int reg, int count),
106
107	TP_ARGS(map, reg, count)
108);
109
110DEFINE_EVENT(regmap_block, regmap_hw_write_done,
111
112	TP_PROTO(struct regmap *map, unsigned int reg, int count),
113
114	TP_ARGS(map, reg, count)
115);
116
117TRACE_EVENT(regcache_sync,
118
119	TP_PROTO(struct regmap *map, const char *type,
120		 const char *status),
121
122	TP_ARGS(map, type, status),
123
124	TP_STRUCT__entry(
125		__string(       name,           regmap_name(map)	)
126		__string(	status,		status			)
127		__string(	type,		type			)
128		__field(	int,		type			)
129	),
130
131	TP_fast_assign(
132		__assign_str(name, regmap_name(map));
133		__assign_str(status, status);
134		__assign_str(type, type);
135	),
136
137	TP_printk("%s type=%s status=%s", __get_str(name),
138		  __get_str(type), __get_str(status))
139);
140
141DECLARE_EVENT_CLASS(regmap_bool,
142
143	TP_PROTO(struct regmap *map, bool flag),
144
145	TP_ARGS(map, flag),
146
147	TP_STRUCT__entry(
148		__string(	name,		regmap_name(map)	)
149		__field(	int,		flag			)
150	),
151
152	TP_fast_assign(
153		__assign_str(name, regmap_name(map));
154		__entry->flag = flag;
155	),
156
157	TP_printk("%s flag=%d", __get_str(name),
158		  (int)__entry->flag)
159);
160
161DEFINE_EVENT(regmap_bool, regmap_cache_only,
162
163	TP_PROTO(struct regmap *map, bool flag),
164
165	TP_ARGS(map, flag)
166
167);
168
169DEFINE_EVENT(regmap_bool, regmap_cache_bypass,
170
171	TP_PROTO(struct regmap *map, bool flag),
172
173	TP_ARGS(map, flag)
174
175);
176
177DECLARE_EVENT_CLASS(regmap_async,
178
179	TP_PROTO(struct regmap *map),
180
181	TP_ARGS(map),
182
183	TP_STRUCT__entry(
184		__string(	name,		regmap_name(map)	)
185	),
186
187	TP_fast_assign(
188		__assign_str(name, regmap_name(map));
189	),
190
191	TP_printk("%s", __get_str(name))
192);
193
194DEFINE_EVENT(regmap_block, regmap_async_write_start,
195
196	TP_PROTO(struct regmap *map, unsigned int reg, int count),
197
198	TP_ARGS(map, reg, count)
199);
200
201DEFINE_EVENT(regmap_async, regmap_async_io_complete,
202
203	TP_PROTO(struct regmap *map),
204
205	TP_ARGS(map)
206
207);
208
209DEFINE_EVENT(regmap_async, regmap_async_complete_start,
210
211	TP_PROTO(struct regmap *map),
212
213	TP_ARGS(map)
214
215);
216
217DEFINE_EVENT(regmap_async, regmap_async_complete_done,
218
219	TP_PROTO(struct regmap *map),
220
221	TP_ARGS(map)
222
223);
224
225TRACE_EVENT(regcache_drop_region,
226
227	TP_PROTO(struct regmap *map, unsigned int from,
228		 unsigned int to),
229
230	TP_ARGS(map, from, to),
231
232	TP_STRUCT__entry(
233		__string(       name,           regmap_name(map)	)
234		__field(	unsigned int,	from			)
235		__field(	unsigned int,	to			)
236	),
237
238	TP_fast_assign(
239		__assign_str(name, regmap_name(map));
240		__entry->from = from;
241		__entry->to = to;
242	),
243
244	TP_printk("%s %u-%u", __get_str(name), (unsigned int)__entry->from,
245		  (unsigned int)__entry->to)
246);
247
248#endif /* _TRACE_REGMAP_H */
249
250#undef TRACE_INCLUDE_PATH
251#define TRACE_INCLUDE_PATH .
252
253#undef TRACE_INCLUDE_FILE
254#define TRACE_INCLUDE_FILE trace
255
256/* This part must be outside protection */
257#include <trace/define_trace.h>