diff options
author | Mark Brown <broonie@linaro.org> | 2013-06-03 16:24:08 (GMT) |
---|---|---|
committer | Mark Brown <broonie@linaro.org> | 2013-06-03 17:06:48 (GMT) |
commit | b92be6fecc9f1e8b927d99c12dad9f9dcd729727 (patch) | |
tree | 2a17f17ab11dbd8ec38521cda8cc9f5d14394cda /drivers/base | |
parent | d683b96b072dc4680fc74964eca77e6a23d1fa6e (diff) | |
download | linux-b92be6fecc9f1e8b927d99c12dad9f9dcd729727.tar.xz |
regmap: core: Cache all registers by default when cache is enabled
Currently all register maps with a cache need to provide a volatile
callback since the default is to assume all registers are volatile.
This is not sensible if we have a cache so change the default to be
fully cached if a cache is provided.
Signed-off-by: Mark Brown <broonie@linaro.org>
Diffstat (limited to 'drivers/base')
-rw-r--r-- | drivers/base/regmap/regmap.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/drivers/base/regmap/regmap.c b/drivers/base/regmap/regmap.c index a941dcf..2f1f3ff 100644 --- a/drivers/base/regmap/regmap.c +++ b/drivers/base/regmap/regmap.c @@ -123,7 +123,10 @@ bool regmap_volatile(struct regmap *map, unsigned int reg) if (map->volatile_table) return _regmap_check_range_table(map, reg, map->volatile_table); - return true; + if (map->cache_ops) + return false; + else + return true; } bool regmap_precious(struct regmap *map, unsigned int reg) |