pandora: defconfig: update
[pandora-kernel.git] / include / trace / events / regmap.h
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/device.h>
8 #include <linux/ktime.h>
9 #include <linux/tracepoint.h>
10
11 struct regmap;
12
13 /*
14  * Log register events
15  */
16 DECLARE_EVENT_CLASS(regmap_reg,
17
18         TP_PROTO(struct device *dev, unsigned int reg,
19                  unsigned int val),
20
21         TP_ARGS(dev, reg, val),
22
23         TP_STRUCT__entry(
24                 __string(       name,           dev_name(dev)   )
25                 __field(        unsigned int,   reg             )
26                 __field(        unsigned int,   val             )
27         ),
28
29         TP_fast_assign(
30                 __assign_str(name, dev_name(dev));
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
40 DEFINE_EVENT(regmap_reg, regmap_reg_write,
41
42         TP_PROTO(struct device *dev, unsigned int reg,
43                  unsigned int val),
44
45         TP_ARGS(dev, reg, val)
46
47 );
48
49 DEFINE_EVENT(regmap_reg, regmap_reg_read,
50
51         TP_PROTO(struct device *dev, unsigned int reg,
52                  unsigned int val),
53
54         TP_ARGS(dev, reg, val)
55
56 );
57
58 DECLARE_EVENT_CLASS(regmap_block,
59
60         TP_PROTO(struct device *dev, unsigned int reg, int count),
61
62         TP_ARGS(dev, reg, count),
63
64         TP_STRUCT__entry(
65                 __string(       name,           dev_name(dev)   )
66                 __field(        unsigned int,   reg             )
67                 __field(        int,            count           )
68         ),
69
70         TP_fast_assign(
71                 __assign_str(name, dev_name(dev));
72                 __entry->reg = reg;
73                 __entry->count = count;
74         ),
75
76         TP_printk("%s reg=%x count=%d", __get_str(name),
77                   (unsigned int)__entry->reg,
78                   (int)__entry->count)
79 );
80
81 DEFINE_EVENT(regmap_block, regmap_hw_read_start,
82
83         TP_PROTO(struct device *dev, unsigned int reg, int count),
84
85         TP_ARGS(dev, reg, count)
86 );
87
88 DEFINE_EVENT(regmap_block, regmap_hw_read_done,
89
90         TP_PROTO(struct device *dev, unsigned int reg, int count),
91
92         TP_ARGS(dev, reg, count)
93 );
94
95 DEFINE_EVENT(regmap_block, regmap_hw_write_start,
96
97         TP_PROTO(struct device *dev, unsigned int reg, int count),
98
99         TP_ARGS(dev, reg, count)
100 );
101
102 DEFINE_EVENT(regmap_block, regmap_hw_write_done,
103
104         TP_PROTO(struct device *dev, unsigned int reg, int count),
105
106         TP_ARGS(dev, reg, count)
107 );
108
109 TRACE_EVENT(regcache_sync,
110
111         TP_PROTO(struct device *dev, const char *type,
112                  const char *status),
113
114         TP_ARGS(dev, type, status),
115
116         TP_STRUCT__entry(
117                 __string(       name,           dev_name(dev)   )
118                 __string(       status,         status          )
119                 __string(       type,           type            )
120                 __field(        int,            type            )
121         ),
122
123         TP_fast_assign(
124                 __assign_str(name, dev_name(dev));
125                 __assign_str(status, status);
126                 __assign_str(type, type);
127         ),
128
129         TP_printk("%s type=%s status=%s", __get_str(name),
130                   __get_str(type), __get_str(status))
131 );
132
133 #endif /* _TRACE_REGMAP_H */
134
135 /* This part must be outside protection */
136 #include <trace/define_trace.h>