Skip to contentSkip to conversation

regmap: Use async I/O for patch application

PATCH New Mark Brown 1 participant 1 message Oct 10, 2013

Subsystems (2)
lore
Share & tools
lore

Mark Brown

author maintainer
#0 lore raw

PATCH 1/1 regmap: Use async I/O for patch application

From: Mark Brown <[email protected]>

Try to speed up patch application a little using async I/O.

---
 drivers/base/regmap/regmap.c | 4 ++++
 1 file changed, 4 insertions(+)
drivers/base/regmap/regmap.c +4 -0
index ccdac61..437f7f6 100644
@@ -2132,6 +2132,7 @@ int regmap_register_patch(struct regmap *map, const struct reg_default *regs,
 	bypass = map->cache_bypass;
 
 	map->cache_bypass = true;
+	map->async = true;
 
 	/* Write out first; it's useful to apply even if we fail later. */
 	for (i = 0; i < num_regs; i++) {
@@ -2155,10 +2156,13 @@ int regmap_register_patch(struct regmap *map, const struct reg_default *regs,
 	}
 
 out:
+	map->async = false;
 	map->cache_bypass = bypass;
 
 	map->unlock(map->lock_arg);
 
+	regmap_async_complete(map);
+
 	return ret;
 }
 EXPORT_SYMBOL_GPL(regmap_register_patch);
Signature · 1 line
1.8.4.rc3