summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorMark Brown <broonie@opensource.wolfsonmicro.com>2011-10-26 10:34:22 +0200
committerLokesh Pathak <lpathak@nvidia.com>2012-03-05 07:48:03 -0800
commit5b231be1b3bfdffa300f68c0d2fbd72df1b7f653 (patch)
treeb93582ee2b20589c3d4ec30abae0278cc0b413f0 /include
parentca83428e42838440aa62f9201a53f62afc8f540b (diff)
regmap: Track if the register cache is dirty and suppress unneeded syncs
Allow drivers to optimise out the register cache sync if they didn't need to do one. If the hardware is desynced from the register cache (by power loss for example) then the driver should call regcache_mark_dirty() to let the core know about this. Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com> (cherry picked from commit 8ae0d7e8a918e9603748abe9b31984fc5d96abb3) Change-Id: If3380b73669ebaaf474cf46fdd2f4339345c66a3 Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com> Reviewed-on: http://git-master/r/87549
Diffstat (limited to 'include')
-rw-r--r--include/linux/regmap.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/include/linux/regmap.h b/include/linux/regmap.h
index 13aca6248333..0cf66d8a6a7f 100644
--- a/include/linux/regmap.h
+++ b/include/linux/regmap.h
@@ -145,6 +145,7 @@ int regmap_update_bits_lazy(struct regmap *map, unsigned int reg,
int regcache_sync(struct regmap *map);
void regcache_cache_only(struct regmap *map, bool enable);
void regcache_cache_bypass(struct regmap *map, bool enable);
+void regcache_mark_dirty(struct regmap *map);
/**
* Description of an IRQ for the generic regmap irq_chip.