Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 294150
b: refs/heads/master
c: 5d5b7d4
h: refs/heads/master
v: v3
  • Loading branch information
Mark Brown committed Feb 23, 2012
1 parent 8d9cbb0 commit 26f0cab
Show file tree
Hide file tree
Showing 3 changed files with 39 additions and 1 deletion.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: a3c3774176838bbfa4f6e48133644903818e56dc
refs/heads/master: 5d5b7d4f80ed6e861c1c220fd57e3dad0912526e
2 changes: 2 additions & 0 deletions trunk/drivers/base/regmap/regcache.c
Original file line number Diff line number Diff line change
Expand Up @@ -313,6 +313,7 @@ void regcache_cache_only(struct regmap *map, bool enable)
mutex_lock(&map->lock);
WARN_ON(map->cache_bypass && enable);
map->cache_only = enable;
trace_regmap_cache_only(map->dev, enable);
mutex_unlock(&map->lock);
}
EXPORT_SYMBOL_GPL(regcache_cache_only);
Expand Down Expand Up @@ -350,6 +351,7 @@ void regcache_cache_bypass(struct regmap *map, bool enable)
mutex_lock(&map->lock);
WARN_ON(map->cache_only && enable);
map->cache_bypass = enable;
trace_regmap_cache_bypass(map->dev, enable);
mutex_unlock(&map->lock);
}
EXPORT_SYMBOL_GPL(regcache_cache_bypass);
Expand Down
36 changes: 36 additions & 0 deletions trunk/include/trace/events/regmap.h
Original file line number Diff line number Diff line change
Expand Up @@ -139,6 +139,42 @@ TRACE_EVENT(regcache_sync,
__get_str(type), __get_str(status))
);

DECLARE_EVENT_CLASS(regmap_bool,

TP_PROTO(struct device *dev, bool flag),

TP_ARGS(dev, flag),

TP_STRUCT__entry(
__string( name, dev_name(dev) )
__field( int, flag )
),

TP_fast_assign(
__assign_str(name, dev_name(dev));
__entry->flag = flag;
),

TP_printk("%s flag=%d", __get_str(name),
(int)__entry->flag)
);

DEFINE_EVENT(regmap_bool, regmap_cache_only,

TP_PROTO(struct device *dev, bool flag),

TP_ARGS(dev, flag)

);

DEFINE_EVENT(regmap_bool, regmap_cache_bypass,

TP_PROTO(struct device *dev, bool flag),

TP_ARGS(dev, flag)

);

#endif /* _TRACE_REGMAP_H */

/* This part must be outside protection */
Expand Down

0 comments on commit 26f0cab

Please sign in to comment.