0001
0002 #undef TRACE_SYSTEM
0003 #define TRACE_SYSTEM regmap
0004
0005 #if !defined(_TRACE_REGMAP_H) || defined(TRACE_HEADER_MULTI_READ)
0006 #define _TRACE_REGMAP_H
0007
0008 #include <linux/ktime.h>
0009 #include <linux/tracepoint.h>
0010
0011 #include "internal.h"
0012
0013
0014
0015
0016 DECLARE_EVENT_CLASS(regmap_reg,
0017
0018 TP_PROTO(struct regmap *map, unsigned int reg,
0019 unsigned int val),
0020
0021 TP_ARGS(map, reg, val),
0022
0023 TP_STRUCT__entry(
0024 __string( name, regmap_name(map) )
0025 __field( unsigned int, reg )
0026 __field( unsigned int, val )
0027 ),
0028
0029 TP_fast_assign(
0030 __assign_str(name, regmap_name(map));
0031 __entry->reg = reg;
0032 __entry->val = val;
0033 ),
0034
0035 TP_printk("%s reg=%x val=%x", __get_str(name),
0036 (unsigned int)__entry->reg,
0037 (unsigned int)__entry->val)
0038 );
0039
0040 DEFINE_EVENT(regmap_reg, regmap_reg_write,
0041
0042 TP_PROTO(struct regmap *map, unsigned int reg,
0043 unsigned int val),
0044
0045 TP_ARGS(map, reg, val)
0046
0047 );
0048
0049 DEFINE_EVENT(regmap_reg, regmap_reg_read,
0050
0051 TP_PROTO(struct regmap *map, unsigned int reg,
0052 unsigned int val),
0053
0054 TP_ARGS(map, reg, val)
0055
0056 );
0057
0058 DEFINE_EVENT(regmap_reg, regmap_reg_read_cache,
0059
0060 TP_PROTO(struct regmap *map, unsigned int reg,
0061 unsigned int val),
0062
0063 TP_ARGS(map, reg, val)
0064
0065 );
0066
0067 DECLARE_EVENT_CLASS(regmap_block,
0068
0069 TP_PROTO(struct regmap *map, unsigned int reg, int count),
0070
0071 TP_ARGS(map, reg, count),
0072
0073 TP_STRUCT__entry(
0074 __string( name, regmap_name(map) )
0075 __field( unsigned int, reg )
0076 __field( int, count )
0077 ),
0078
0079 TP_fast_assign(
0080 __assign_str(name, regmap_name(map));
0081 __entry->reg = reg;
0082 __entry->count = count;
0083 ),
0084
0085 TP_printk("%s reg=%x count=%d", __get_str(name),
0086 (unsigned int)__entry->reg,
0087 (int)__entry->count)
0088 );
0089
0090 DEFINE_EVENT(regmap_block, regmap_hw_read_start,
0091
0092 TP_PROTO(struct regmap *map, unsigned int reg, int count),
0093
0094 TP_ARGS(map, reg, count)
0095 );
0096
0097 DEFINE_EVENT(regmap_block, regmap_hw_read_done,
0098
0099 TP_PROTO(struct regmap *map, unsigned int reg, int count),
0100
0101 TP_ARGS(map, reg, count)
0102 );
0103
0104 DEFINE_EVENT(regmap_block, regmap_hw_write_start,
0105
0106 TP_PROTO(struct regmap *map, unsigned int reg, int count),
0107
0108 TP_ARGS(map, reg, count)
0109 );
0110
0111 DEFINE_EVENT(regmap_block, regmap_hw_write_done,
0112
0113 TP_PROTO(struct regmap *map, unsigned int reg, int count),
0114
0115 TP_ARGS(map, reg, count)
0116 );
0117
0118 TRACE_EVENT(regcache_sync,
0119
0120 TP_PROTO(struct regmap *map, const char *type,
0121 const char *status),
0122
0123 TP_ARGS(map, type, status),
0124
0125 TP_STRUCT__entry(
0126 __string( name, regmap_name(map) )
0127 __string( status, status )
0128 __string( type, type )
0129 ),
0130
0131 TP_fast_assign(
0132 __assign_str(name, regmap_name(map));
0133 __assign_str(status, status);
0134 __assign_str(type, type);
0135 ),
0136
0137 TP_printk("%s type=%s status=%s", __get_str(name),
0138 __get_str(type), __get_str(status))
0139 );
0140
0141 DECLARE_EVENT_CLASS(regmap_bool,
0142
0143 TP_PROTO(struct regmap *map, bool flag),
0144
0145 TP_ARGS(map, flag),
0146
0147 TP_STRUCT__entry(
0148 __string( name, regmap_name(map) )
0149 __field( int, flag )
0150 ),
0151
0152 TP_fast_assign(
0153 __assign_str(name, regmap_name(map));
0154 __entry->flag = flag;
0155 ),
0156
0157 TP_printk("%s flag=%d", __get_str(name),
0158 (int)__entry->flag)
0159 );
0160
0161 DEFINE_EVENT(regmap_bool, regmap_cache_only,
0162
0163 TP_PROTO(struct regmap *map, bool flag),
0164
0165 TP_ARGS(map, flag)
0166
0167 );
0168
0169 DEFINE_EVENT(regmap_bool, regmap_cache_bypass,
0170
0171 TP_PROTO(struct regmap *map, bool flag),
0172
0173 TP_ARGS(map, flag)
0174
0175 );
0176
0177 DECLARE_EVENT_CLASS(regmap_async,
0178
0179 TP_PROTO(struct regmap *map),
0180
0181 TP_ARGS(map),
0182
0183 TP_STRUCT__entry(
0184 __string( name, regmap_name(map) )
0185 ),
0186
0187 TP_fast_assign(
0188 __assign_str(name, regmap_name(map));
0189 ),
0190
0191 TP_printk("%s", __get_str(name))
0192 );
0193
0194 DEFINE_EVENT(regmap_block, regmap_async_write_start,
0195
0196 TP_PROTO(struct regmap *map, unsigned int reg, int count),
0197
0198 TP_ARGS(map, reg, count)
0199 );
0200
0201 DEFINE_EVENT(regmap_async, regmap_async_io_complete,
0202
0203 TP_PROTO(struct regmap *map),
0204
0205 TP_ARGS(map)
0206
0207 );
0208
0209 DEFINE_EVENT(regmap_async, regmap_async_complete_start,
0210
0211 TP_PROTO(struct regmap *map),
0212
0213 TP_ARGS(map)
0214
0215 );
0216
0217 DEFINE_EVENT(regmap_async, regmap_async_complete_done,
0218
0219 TP_PROTO(struct regmap *map),
0220
0221 TP_ARGS(map)
0222
0223 );
0224
0225 TRACE_EVENT(regcache_drop_region,
0226
0227 TP_PROTO(struct regmap *map, unsigned int from,
0228 unsigned int to),
0229
0230 TP_ARGS(map, from, to),
0231
0232 TP_STRUCT__entry(
0233 __string( name, regmap_name(map) )
0234 __field( unsigned int, from )
0235 __field( unsigned int, to )
0236 ),
0237
0238 TP_fast_assign(
0239 __assign_str(name, regmap_name(map));
0240 __entry->from = from;
0241 __entry->to = to;
0242 ),
0243
0244 TP_printk("%s %u-%u", __get_str(name), (unsigned int)__entry->from,
0245 (unsigned int)__entry->to)
0246 );
0247
0248 #endif
0249
0250 #undef TRACE_INCLUDE_PATH
0251 #define TRACE_INCLUDE_PATH .
0252
0253 #undef TRACE_INCLUDE_FILE
0254 #define TRACE_INCLUDE_FILE trace
0255
0256
0257 #include <trace/define_trace.h>