summaryrefslogtreecommitdiff
path: root/include/linux
diff options
context:
space:
mode:
authorMark Brown <broonie@opensource.wolfsonmicro.com>2013-05-08 16:55:22 +0400
committerMark Brown <broonie@opensource.wolfsonmicro.com>2013-05-12 18:46:47 +0400
commit697e85bc6a9aa44ecd73392586fe9cfd7e0467ba (patch)
treec07e5c212d9eed90f1d80bc5b923755a5f6888ea /include/linux
parentf722406faae2d073cc1d01063d1123c35425939e (diff)
downloadlinux-697e85bc6a9aa44ecd73392586fe9cfd7e0467ba.tar.xz
regmap: Add support for discarding parts of the register cache
Allow drivers to discard parts of the register cache, for example if part of the hardware has been reset. Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Diffstat (limited to 'include/linux')
-rw-r--r--include/linux/regmap.h9
1 files changed, 9 insertions, 0 deletions
diff --git a/include/linux/regmap.h b/include/linux/regmap.h
index 02d84e24b7c2..5067ee94eb92 100644
--- a/include/linux/regmap.h
+++ b/include/linux/regmap.h
@@ -394,6 +394,8 @@ bool regmap_can_raw_write(struct regmap *map);
int regcache_sync(struct regmap *map);
int regcache_sync_region(struct regmap *map, unsigned int min,
unsigned int max);
+int regcache_drop_region(struct regmap *map, unsigned int min,
+ unsigned int max);
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);
@@ -562,6 +564,13 @@ static inline int regcache_sync_region(struct regmap *map, unsigned int min,
return -EINVAL;
}
+static inline int regcache_drop_region(struct regmap *map, unsigned int min,
+ unsigned int max)
+{
+ WARN_ONCE(1, "regmap API is disabled");
+ return -EINVAL;
+}
+
static inline void regcache_cache_only(struct regmap *map, bool enable)
{
WARN_ONCE(1, "regmap API is disabled");