summaryrefslogtreecommitdiffstats
path: root/drivers/base
diff options
context:
space:
mode:
authorMark Brown <broonie@opensource.wolfsonmicro.com>2013-04-16 17:05:44 +0200
committerMark Brown <broonie@opensource.wolfsonmicro.com>2013-04-16 17:05:44 +0200
commitb508c80c553c03baf5c9ad5612ac8caceb13c5f4 (patch)
tree9a2047f94df087374f7ad3e9058f174ff5dad533 /drivers/base
parentLinux 3.9-rc7 (diff)
parentregmap: async: Add tracepoints for async I/O (diff)
downloadlinux-b508c80c553c03baf5c9ad5612ac8caceb13c5f4.tar.xz
linux-b508c80c553c03baf5c9ad5612ac8caceb13c5f4.zip
Merge remote-tracking branch 'regmap/topic/async' into regmap-next
Diffstat (limited to 'drivers/base')
-rw-r--r--drivers/base/regmap/regmap.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/drivers/base/regmap/regmap.c b/drivers/base/regmap/regmap.c
index 58cfb3232428..672ac082cafa 100644
--- a/drivers/base/regmap/regmap.c
+++ b/drivers/base/regmap/regmap.c
@@ -999,6 +999,8 @@ static 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) {
@@ -1642,6 +1644,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);
@@ -1688,6 +1692,8 @@ 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);
@@ -1695,6 +1701,8 @@ int regmap_async_complete(struct regmap *map)
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);