From f8bd822cbf953299b2957b45f6a43c08e7931ddc Mon Sep 17 00:00:00 2001 From: Mark Brown Date: Fri, 29 Mar 2013 19:32:28 +0000 Subject: regmap: cache: Factor out block sync The idea of holding blocks of registers in device format is shared between at least rbtree and lzo cache formats so split out the loop that does the sync from the rbtree code so optimisations on it can be reused. Signed-off-by: Mark Brown Reviewed-by: Dimitris Papastamos --- drivers/base/regmap/internal.h | 3 +++ 1 file changed, 3 insertions(+) (limited to 'drivers/base/regmap/internal.h') diff --git a/drivers/base/regmap/internal.h b/drivers/base/regmap/internal.h index b01fe59fbfe8..01fbe48e8155 100644 --- a/drivers/base/regmap/internal.h +++ b/drivers/base/regmap/internal.h @@ -191,6 +191,9 @@ int regcache_read(struct regmap *map, int regcache_write(struct regmap *map, unsigned int reg, unsigned int value); int regcache_sync(struct regmap *map); +int regcache_sync_block(struct regmap *map, void *block, + unsigned int block_base, unsigned int start, + unsigned int end); static inline const void *regcache_get_val_addr(struct regmap *map, const void *base, -- cgit v1.2.3