Skip to content

Commit

Permalink
regmap: Don't attempt block writes when syncing cache on single_rw de…
Browse files Browse the repository at this point in the history
…vices

If the device can't support block writes then don't attempt to use raw
syncing which will automatically generate block writes for adjacent
registers, use the existing _single() block syncing implementation.

Reported-by: Jarkko Nikula <[email protected]>
Tested-by: Jarkko Nikula <[email protected]>
Signed-off-by: Mark Brown <[email protected]>
Cc: [email protected]
  • Loading branch information
broonie committed Aug 31, 2014
1 parent 7d1311b commit 5c1ebe7
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/base/regmap/regcache.c
Original file line number Diff line number Diff line change
Expand Up @@ -698,7 +698,7 @@ int regcache_sync_block(struct regmap *map, void *block,
unsigned int block_base, unsigned int start,
unsigned int end)
{
if (regmap_can_raw_write(map))
if (regmap_can_raw_write(map) && !map->use_single_rw)
return regcache_sync_block_raw(map, block, cache_present,
block_base, start, end);
else
Expand Down

0 comments on commit 5c1ebe7

Please sign in to comment.