Skip to content

Commit

Permalink
regmap: Drop check whether a register is readable in regcache_read
Browse files Browse the repository at this point in the history
One of the reasons for using a cache is to have a software shadow of a register
which is writable but not readable. This allows us to do a read-modify-write
operation on such a register.

Currently regcache checks whether a register is readable when performing a
cached read and returns an error if it is not. Drop this check, since it will
prevent us from using the cache for registers where read-back is not possible.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
  • Loading branch information
Lars-Peter Clausen authored and Mark Brown committed Nov 17, 2011
1 parent 064d4db commit b44d48c
Showing 1 changed file with 0 additions and 3 deletions.
3 changes: 0 additions & 3 deletions drivers/base/regmap/regcache.c
Original file line number Diff line number Diff line change
Expand Up @@ -199,9 +199,6 @@ int regcache_read(struct regmap *map,

BUG_ON(!map->cache_ops);

if (!regmap_readable(map, reg))
return -EIO;

if (!regmap_volatile(map, reg))
return map->cache_ops->read(map, reg, value);

Expand Down

0 comments on commit b44d48c

Please sign in to comment.