diff options
author | Mark Brown <broonie@opensource.wolfsonmicro.com> | 2012-03-14 17:15:48 +0400 |
---|---|---|
committer | Mark Brown <broonie@opensource.wolfsonmicro.com> | 2012-03-14 17:15:48 +0400 |
commit | addfd8a09e1f434a73b3d87d36ef050c73511d2b (patch) | |
tree | 22dd5a1f108dcd123797dbe9f5aa45e8d3faa492 /drivers/base/regmap/regcache.c | |
parent | eae4b51b21f7452b0b53a9848f48c02cb0fac336 (diff) | |
parent | df00c79f78d8b0ad788daf689ea461ace9d0811f (diff) | |
download | linux-addfd8a09e1f434a73b3d87d36ef050c73511d2b.tar.xz |
Merge remote-tracking branch 'regmap/topic/bulk' into regmap-next
Diffstat (limited to 'drivers/base/regmap/regcache.c')
-rw-r--r-- | drivers/base/regmap/regcache.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/drivers/base/regmap/regcache.c b/drivers/base/regmap/regcache.c index fb84d711fbb4..938cb1d2ea26 100644 --- a/drivers/base/regmap/regcache.c +++ b/drivers/base/regmap/regcache.c @@ -35,12 +35,17 @@ static int regcache_hw_init(struct regmap *map) return -EINVAL; if (!map->reg_defaults_raw) { + u32 cache_bypass = map->cache_bypass; dev_warn(map->dev, "No cache defaults, reading back from HW\n"); + + /* Bypass the cache access till data read from HW*/ + map->cache_bypass = 1; tmp_buf = kmalloc(map->cache_size_raw, GFP_KERNEL); if (!tmp_buf) return -EINVAL; ret = regmap_bulk_read(map, 0, tmp_buf, map->num_reg_defaults_raw); + map->cache_bypass = cache_bypass; if (ret < 0) { kfree(tmp_buf); return ret; |