diff options
| author | Mark Brown <broonie@linaro.org> | 2013-06-03 12:24:08 -0400 |
|---|---|---|
| committer | Mark Brown <broonie@linaro.org> | 2013-06-03 13:06:48 -0400 |
| commit | b92be6fecc9f1e8b927d99c12dad9f9dcd729727 (patch) | |
| tree | 2a17f17ab11dbd8ec38521cda8cc9f5d14394cda /drivers/base/regmap/regmap.c | |
| parent | d683b96b072dc4680fc74964eca77e6a23d1fa6e (diff) | |
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/regmap/regmap.c')
| -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 a941dcfe7590..2f1f3ff6c6bf 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) | |||
| 123 | if (map->volatile_table) | 123 | if (map->volatile_table) |
| 124 | return _regmap_check_range_table(map, reg, map->volatile_table); | 124 | return _regmap_check_range_table(map, reg, map->volatile_table); |
| 125 | 125 | ||
| 126 | return true; | 126 | if (map->cache_ops) |
| 127 | return false; | ||
| 128 | else | ||
| 129 | return true; | ||
| 127 | } | 130 | } |
| 128 | 131 | ||
| 129 | bool regmap_precious(struct regmap *map, unsigned int reg) | 132 | bool regmap_precious(struct regmap *map, unsigned int reg) |
