aboutsummaryrefslogtreecommitdiffstats
path: root/include/trace
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2011-10-25 07:57:45 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2011-10-25 07:57:45 -0400
commit4e7e2a2008f5d8c49791c412849d5b0232d39bb3 (patch)
tree32c3fa2d5cefb388689cb795225022769bf7b413 /include/trace
parent8a9ea3237e7eb5c25f09e429ad242ae5a3d5ea22 (diff)
parent7cccbdc84487616c3dbe493b04bfa1f362f4bc56 (diff)
Merge branch 'for-linus' of git://opensource.wolfsonmicro.com/regmap
* 'for-linus' of git://opensource.wolfsonmicro.com/regmap: (62 commits) mfd: Enable rbtree cache for wm831x devices regmap: Support some block operations on cached devices regmap: Allow caches for devices with no defaults regmap: Ensure rbtree syncs registers set to zero properly regmap: Allow rbtree to cache zero default values regmap: Warn on raw I/O as well as bulk reads that bypass cache regmap: Return a sensible error code if we fail to read the cache regmap: Use bsearch() to search the register defaults regmap: Fix doc comment regmap: Optimize the lookup path to use binary search regmap: Ensure we scream if we enable cache bypass/only at the same time regmap: Implement regcache_cache_bypass helper function regmap: Save/restore the bypass state upon syncing regmap: Lock the sync path, ensure we use the lockless _regmap_write() regmap: Fix apostrophe usage regmap: Make _regmap_write() global regmap: Fix lock used for regcache_cache_only() regmap: Grab the lock in regcache_cache_only() regmap: Modify map->cache_bypass directly regmap: Fix regcache_sync generic implementation ...
Diffstat (limited to 'include/trace')
-rw-r--r--include/trace/events/regmap.h136
1 files changed, 136 insertions, 0 deletions
diff --git a/include/trace/events/regmap.h b/include/trace/events/regmap.h
new file mode 100644
index 000000000000..1e3193b8fcc8
--- /dev/null
+++ b/include/trace/events/regmap.h
@@ -0,0 +1,136 @@
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
11struct regmap;
12
13/*
14 * Log register events
15 */
16DECLARE_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
40DEFINE_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
49DEFINE_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
58DECLARE_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
81DEFINE_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
88DEFINE_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
95DEFINE_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
102DEFINE_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
109TRACE_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>