Skip to content

Commit

Permalink
regmap: Warn on raw I/O as well as bulk reads that bypass cache
Browse files Browse the repository at this point in the history
As with the bulk reads we really should be able to make these play
nicely with the cache but warn for now.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Acked-by: Dimitris Papastamos <dp@opensource.wolfsonmicro.com>
  • Loading branch information
Mark Brown committed Oct 10, 2011
1 parent 6e6ace0 commit 04e016a
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions drivers/base/regmap/regmap.c
Original file line number Diff line number Diff line change
Expand Up @@ -377,6 +377,8 @@ int regmap_raw_write(struct regmap *map, unsigned int reg,
{
int ret;

WARN_ON(map->cache_type != REGCACHE_NONE);

mutex_lock(&map->lock);

ret = _regmap_raw_write(map, reg, val, val_len);
Expand Down Expand Up @@ -481,6 +483,8 @@ int regmap_raw_read(struct regmap *map, unsigned int reg, void *val,
{
int ret;

WARN_ON(map->cache_type != REGCACHE_NONE);

mutex_lock(&map->lock);

ret = _regmap_raw_read(map, reg, val, val_len);
Expand Down

0 comments on commit 04e016a

Please sign in to comment.