mirror of
https://github.com/team-infusion-developers/android_kernel_samsung_msm8976.git
synced 2024-11-01 10:33:27 +00:00
regmap: Save/restore the bypass state upon syncing
Signed-off-by: Dimitris Papastamos <dp@opensource.wolfsonmicro.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
This commit is contained in:
parent
13753a9088
commit
beb1a10f21
1 changed files with 5 additions and 0 deletions
|
@ -227,10 +227,13 @@ int regcache_sync(struct regmap *map)
|
|||
unsigned int val;
|
||||
unsigned int i;
|
||||
const char *name;
|
||||
unsigned int bypass;
|
||||
|
||||
BUG_ON(!map->cache_ops);
|
||||
|
||||
mutex_lock(&map->lock);
|
||||
/* Remember the initial bypass state */
|
||||
bypass = map->cache_bypass;
|
||||
dev_dbg(map->dev, "Syncing %s cache\n",
|
||||
map->cache_ops->name);
|
||||
name = map->cache_ops->name;
|
||||
|
@ -255,6 +258,8 @@ int regcache_sync(struct regmap *map)
|
|||
}
|
||||
out:
|
||||
trace_regcache_sync(map->dev, name, "stop");
|
||||
/* Restore the bypass state */
|
||||
map->cache_bypass = bypass;
|
||||
mutex_unlock(&map->lock);
|
||||
|
||||
return ret;
|
||||
|
|
Loading…
Reference in a new issue