regmap: Add the regcache_sync trace event
Signed-off-by: Dimitris Papastamos <dp@opensource.wolfsonmicro.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
This commit is contained in:
committed by
Mark Brown
parent
2cbbb579bc
commit
5936008901
@ -221,12 +221,18 @@ EXPORT_SYMBOL_GPL(regcache_write);
|
||||
*/
|
||||
int regcache_sync(struct regmap *map)
|
||||
{
|
||||
int ret;
|
||||
const char *name;
|
||||
|
||||
BUG_ON(!map->cache_ops);
|
||||
|
||||
if (map->cache_ops->sync) {
|
||||
dev_dbg(map->dev, "Syncing %s cache\n",
|
||||
map->cache_ops->name);
|
||||
return map->cache_ops->sync(map);
|
||||
name = map->cache_ops->name;
|
||||
trace_regcache_sync(map->dev, name, "start");
|
||||
ret = map->cache_ops->sync(map);
|
||||
trace_regcache_sync(map->dev, name, "stop");
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
Reference in New Issue
Block a user