Blame view

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