e077eb460c1c0fd4f020597a5b930aaae4fef1fa
[lttng-modules.git] / include / instrumentation / events / regmap.h
1 // SPDX-FileCopyrightText: 2012 Andrew Gabbasov <andrew_gabbasov@mentor.com>
2 //
3 // SPDX-License-Identifier: GPL-2.0-only
4
5 #undef TRACE_SYSTEM
6 #define TRACE_SYSTEM regmap
7
8 #if !defined(LTTNG_TRACE_REGMAP_H) || defined(TRACE_HEADER_MULTI_READ)
9 #define LTTNG_TRACE_REGMAP_H
10
11 #include <lttng/tracepoint-event.h>
12 #include <linux/ktime.h>
13 #include <lttng/kernel-version.h>
14
15 #ifndef _TRACE_REGMAP_DEF_
16 #define _TRACE_REGMAP_DEF_
17 struct device;
18 struct regmap;
19 #endif
20
21 /*
22 * Log register events
23 */
24 LTTNG_TRACEPOINT_EVENT_CLASS(regmap_reg,
25
26 TP_PROTO(struct regmap *map, unsigned int reg,
27 unsigned int val),
28
29 TP_ARGS(map, reg, val),
30
31 TP_FIELDS(
32 ctf_string(name, regmap_name(map))
33 ctf_integer(unsigned int, reg, reg)
34 ctf_integer(unsigned int, val, val)
35 )
36 )
37 LTTNG_TRACEPOINT_EVENT_INSTANCE(regmap_reg, regmap_reg_write,
38
39 TP_PROTO(struct regmap *map, unsigned int reg,
40 unsigned int val),
41
42 TP_ARGS(map, reg, val)
43 )
44
45 LTTNG_TRACEPOINT_EVENT_INSTANCE(regmap_reg, regmap_reg_read,
46
47 TP_PROTO(struct regmap *map, unsigned int reg,
48 unsigned int val),
49
50 TP_ARGS(map, reg, val)
51 )
52
53 LTTNG_TRACEPOINT_EVENT_INSTANCE(regmap_reg, regmap_reg_read_cache,
54
55 TP_PROTO(struct regmap *map, unsigned int reg,
56 unsigned int val),
57
58 TP_ARGS(map, reg, val)
59 )
60
61 LTTNG_TRACEPOINT_EVENT_CLASS(regmap_block,
62
63 TP_PROTO(struct regmap *map, unsigned int reg, int count),
64
65 TP_ARGS(map, reg, count),
66
67 TP_FIELDS(
68 ctf_string(name, regmap_name(map))
69 ctf_integer(unsigned int, reg, reg)
70 ctf_integer(int, count, count)
71 )
72 )
73
74 LTTNG_TRACEPOINT_EVENT_INSTANCE(regmap_block, regmap_hw_read_start,
75
76 TP_PROTO(struct regmap *map, unsigned int reg, int count),
77
78 TP_ARGS(map, reg, count)
79 )
80
81 LTTNG_TRACEPOINT_EVENT_INSTANCE(regmap_block, regmap_hw_read_done,
82
83 TP_PROTO(struct regmap *map, unsigned int reg, int count),
84
85 TP_ARGS(map, reg, count)
86 )
87
88 LTTNG_TRACEPOINT_EVENT_INSTANCE(regmap_block, regmap_hw_write_start,
89
90 TP_PROTO(struct regmap *map, unsigned int reg, int count),
91
92 TP_ARGS(map, reg, count)
93 )
94
95 LTTNG_TRACEPOINT_EVENT_INSTANCE(regmap_block, regmap_hw_write_done,
96
97 TP_PROTO(struct regmap *map, unsigned int reg, int count),
98
99 TP_ARGS(map, reg, count)
100 )
101
102 LTTNG_TRACEPOINT_EVENT_MAP(regcache_sync,
103
104 regmap_regcache_sync,
105
106 TP_PROTO(struct regmap *map, const char *type,
107 const char *status),
108
109 TP_ARGS(map, type, status),
110
111 TP_FIELDS(
112 ctf_string(name, regmap_name(map))
113 ctf_string(status, status)
114 ctf_string(type, type)
115 )
116 )
117
118 LTTNG_TRACEPOINT_EVENT_CLASS(regmap_bool,
119
120 TP_PROTO(struct regmap *map, bool flag),
121
122 TP_ARGS(map, flag),
123
124 TP_FIELDS(
125 ctf_string(name, regmap_name(map))
126 ctf_integer(int, flag, flag)
127 )
128 )
129
130 LTTNG_TRACEPOINT_EVENT_INSTANCE(regmap_bool, regmap_cache_only,
131
132 TP_PROTO(struct regmap *map, bool flag),
133
134 TP_ARGS(map, flag)
135 )
136
137 LTTNG_TRACEPOINT_EVENT_INSTANCE(regmap_bool, regmap_cache_bypass,
138
139 TP_PROTO(struct regmap *map, bool flag),
140
141 TP_ARGS(map, flag)
142
143 )
144
145 #endif /* LTTNG_TRACE_REGMAP_H */
146
147 /* This part must be outside protection */
148 #include <lttng/define_trace.h>
This page took 0.044748 seconds and 5 git commands to generate.