2 #define TRACE_SYSTEM regmap
4 #if !defined(_TRACE_REGMAP_H) || defined(TRACE_HEADER_MULTI_READ)
5 #define _TRACE_REGMAP_H
7 #include <linux/device.h>
8 #include <linux/ktime.h>
9 #include <linux/tracepoint.h>
16 DECLARE_EVENT_CLASS(regmap_reg,
18 TP_PROTO(struct device *dev, unsigned int reg,
21 TP_ARGS(dev, reg, val),
24 __string( name, dev_name(dev) )
25 __field( unsigned int, reg )
26 __field( unsigned int, val )
30 __assign_str(name, dev_name(dev));
35 TP_printk("%s reg=%x val=%x", __get_str(name),
36 (unsigned int)__entry->reg,
37 (unsigned int)__entry->val)
40 DEFINE_EVENT(regmap_reg, regmap_reg_write,
42 TP_PROTO(struct device *dev, unsigned int reg,
45 TP_ARGS(dev, reg, val)
49 DEFINE_EVENT(regmap_reg, regmap_reg_read,
51 TP_PROTO(struct device *dev, unsigned int reg,
54 TP_ARGS(dev, reg, val)
58 DECLARE_EVENT_CLASS(regmap_block,
60 TP_PROTO(struct device *dev, unsigned int reg, int count),
62 TP_ARGS(dev, reg, count),
65 __string( name, dev_name(dev) )
66 __field( unsigned int, reg )
71 __assign_str(name, dev_name(dev));
73 __entry->count = count;
76 TP_printk("%s reg=%x count=%d", __get_str(name),
77 (unsigned int)__entry->reg,
81 DEFINE_EVENT(regmap_block, regmap_hw_read_start,
83 TP_PROTO(struct device *dev, unsigned int reg, int count),
85 TP_ARGS(dev, reg, count)
88 DEFINE_EVENT(regmap_block, regmap_hw_read_done,
90 TP_PROTO(struct device *dev, unsigned int reg, int count),
92 TP_ARGS(dev, reg, count)
95 DEFINE_EVENT(regmap_block, regmap_hw_write_start,
97 TP_PROTO(struct device *dev, unsigned int reg, int count),
99 TP_ARGS(dev, reg, count)
102 DEFINE_EVENT(regmap_block, regmap_hw_write_done,
104 TP_PROTO(struct device *dev, unsigned int reg, int count),
106 TP_ARGS(dev, reg, count)
109 TRACE_EVENT(regcache_sync,
111 TP_PROTO(struct device *dev, const char *type,
114 TP_ARGS(dev, type, status),
117 __string( name, dev_name(dev) )
118 __string( status, status )
119 __string( type, type )
124 __assign_str(name, dev_name(dev));
125 __assign_str(status, status);
126 __assign_str(type, type);
129 TP_printk("%s type=%s status=%s", __get_str(name),
130 __get_str(type), __get_str(status))
133 #endif /* _TRACE_REGMAP_H */
135 /* This part must be outside protection */
136 #include <trace/define_trace.h>