aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/regmap.h
diff options
context:
space:
mode:
authorMark Brown <broonie@opensource.wolfsonmicro.com>2011-11-29 20:10:36 +0000
committerMark Brown <broonie@opensource.wolfsonmicro.com>2011-11-29 20:15:50 +0000
commit018690d33ecf4aa1eb1415e38c40e2b0b6c7808e (patch)
tree3ae08fb9d199813840564fb392ebc9b4a5d8c230 /include/linux/regmap.h
parentMerge remote-tracking branch 'regmap/topic/irq' into regmap-next (diff)
downloadlinux-dev-018690d33ecf4aa1eb1415e38c40e2b0b6c7808e.tar.xz
linux-dev-018690d33ecf4aa1eb1415e38c40e2b0b6c7808e.zip
regmap: Allow regmap_update_bits() users to detect changes
Some users of regmap_update_bits() would like to be able to tell their users if they actually did an update so provide a variant which also returns a flag indicating if an update took place. We could return a tristate in the return value of regmap_update_bits() but this makes the API more cumbersome to use and doesn't fit with the general zero for success idiom we have. Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Diffstat (limited to 'include/linux/regmap.h')
-rw-r--r--include/linux/regmap.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/include/linux/regmap.h b/include/linux/regmap.h
index 81dfe0acb20c..a83e4a097abd 100644
--- a/include/linux/regmap.h
+++ b/include/linux/regmap.h
@@ -138,6 +138,9 @@ int regmap_bulk_read(struct regmap *map, unsigned int reg, void *val,
size_t val_count);
int regmap_update_bits(struct regmap *map, unsigned int reg,
unsigned int mask, unsigned int val);
+int regmap_update_bits_check(struct regmap *map, unsigned int reg,
+ unsigned int mask, unsigned int val,
+ bool *change);
int regcache_sync(struct regmap *map);
void regcache_cache_only(struct regmap *map, bool enable);