Commit 1a25f261 authored by Mark Brown's avatar Mark Brown

regmap: Use async I/O for patch application

Try to speed up patch application a little using async I/O.
Signed-off-by: default avatarMark Brown <broonie@linaro.org>
parent 915f441b
...@@ -2029,6 +2029,7 @@ int regmap_register_patch(struct regmap *map, const struct reg_default *regs, ...@@ -2029,6 +2029,7 @@ int regmap_register_patch(struct regmap *map, const struct reg_default *regs,
bypass = map->cache_bypass; bypass = map->cache_bypass;
map->cache_bypass = true; map->cache_bypass = true;
map->async = true;
/* Write out first; it's useful to apply even if we fail later. */ /* Write out first; it's useful to apply even if we fail later. */
for (i = 0; i < num_regs; i++) { for (i = 0; i < num_regs; i++) {
...@@ -2052,10 +2053,13 @@ int regmap_register_patch(struct regmap *map, const struct reg_default *regs, ...@@ -2052,10 +2053,13 @@ int regmap_register_patch(struct regmap *map, const struct reg_default *regs,
} }
out: out:
map->async = false;
map->cache_bypass = bypass; map->cache_bypass = bypass;
map->unlock(map->lock_arg); map->unlock(map->lock_arg);
regmap_async_complete(map);
return ret; return ret;
} }
EXPORT_SYMBOL_GPL(regmap_register_patch); EXPORT_SYMBOL_GPL(regmap_register_patch);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment