regmap: cache: Fall back to register by register read for cache defaults
authorMark Brown <broonie@kernel.org>
Tue, 2 Feb 2016 12:16:51 +0000 (10:16 -0200)
committerMark Brown <broonie@kernel.org>
Tue, 2 Feb 2016 17:58:22 +0000 (17:58 +0000)
commit3245d460a1eb55b5c3ca31dde7b5c5ac71546edf
tree656fb73fa195f877a5e09f37ea60c145b67c56ef
parentbb2bb45d1be28987e6cb50f50e4819795537ab83
regmap: cache: Fall back to register by register read for cache defaults

If we are unable to read the cache defaults for a regmap then fall back
on attempting to read them word by word. This is going to be painfully
slow for large regmaps but might be adequate for smaller ones.

Signed-off-by: Mark Brown <broonie@kernel.org>
[maciej: Use cache_bypass around read and skipping of unreadable regs]
Signed-off-by: Maciej S. Szmigiero <mail@maciej.szmigiero.name>
Signed-off-by: Fabio Estevam <fabio.estevam@nxp.com>
Tested-by: Fabio Estevam <fabio.estevam@nxp.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
drivers/base/regmap/regcache.c