Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 365011
b: refs/heads/master
c: 5b3b448
h: refs/heads/master
i:
  365009: 3bac3ac
  365007: d836eb5
v: v3
  • Loading branch information
Mark Brown committed Apr 16, 2013
1 parent 9525a60 commit 3eaa4c8
Show file tree
Hide file tree
Showing 3 changed files with 57 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: 5a08d15602987bbdff3407d7645f95b7a70f1a6f
refs/heads/master: 5b3b44847590b3cbaafdf01d4ad260fa53d04167
8 changes: 8 additions & 0 deletions trunk/drivers/base/regmap/regmap.c
Original file line number Diff line number Diff line change
Expand Up @@ -1018,6 +1018,8 @@ int _regmap_raw_write(struct regmap *map, unsigned int reg,
if (!async)
return -ENOMEM;

trace_regmap_async_write_start(map->dev, reg, val_len);

async->work_buf = kzalloc(map->format.buf_size,
GFP_KERNEL | GFP_DMA);
if (!async->work_buf) {
Expand Down Expand Up @@ -1670,6 +1672,8 @@ void regmap_async_complete_cb(struct regmap_async *async, int ret)
struct regmap *map = async->map;
bool wake;

trace_regmap_async_io_complete(map->dev);

spin_lock(&map->async_lock);

list_del(&async->list);
Expand Down Expand Up @@ -1716,13 +1720,17 @@ int regmap_async_complete(struct regmap *map)
if (!map->bus->async_write)
return 0;

trace_regmap_async_complete_start(map->dev);

wait_event(map->async_waitq, regmap_async_is_done(map));

spin_lock_irqsave(&map->async_lock, flags);
ret = map->async_ret;
map->async_ret = 0;
spin_unlock_irqrestore(&map->async_lock, flags);

trace_regmap_async_complete_done(map->dev);

return ret;
}
EXPORT_SYMBOL_GPL(regmap_async_complete);
Expand Down
48 changes: 48 additions & 0 deletions trunk/include/trace/events/regmap.h
Original file line number Diff line number Diff line change
Expand Up @@ -175,6 +175,54 @@ DEFINE_EVENT(regmap_bool, regmap_cache_bypass,

);

DECLARE_EVENT_CLASS(regmap_async,

TP_PROTO(struct device *dev),

TP_ARGS(dev),

TP_STRUCT__entry(
__string( name, dev_name(dev) )
),

TP_fast_assign(
__assign_str(name, dev_name(dev));
),

TP_printk("%s", __get_str(name))
);

DEFINE_EVENT(regmap_block, regmap_async_write_start,

TP_PROTO(struct device *dev, unsigned int reg, int count),

TP_ARGS(dev, reg, count)
);

DEFINE_EVENT(regmap_async, regmap_async_io_complete,

TP_PROTO(struct device *dev),

TP_ARGS(dev)

);

DEFINE_EVENT(regmap_async, regmap_async_complete_start,

TP_PROTO(struct device *dev),

TP_ARGS(dev)

);

DEFINE_EVENT(regmap_async, regmap_async_complete_done,

TP_PROTO(struct device *dev),

TP_ARGS(dev)

);

#endif /* _TRACE_REGMAP_H */

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

0 comments on commit 3eaa4c8

Please sign in to comment.