aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/base/regmap/regcache.c
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2014-10-07 20:57:56 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2014-10-07 20:57:56 -0400
commitc831dd7352c0eedb270b9b6430590da5991bb65c (patch)
tree89d808ddea1eeb039eeff2e5815d2ba3b55a1cba /drivers/base/regmap/regcache.c
parent2b425a3f112aa24666fc5f415c8bf0e9132bb6c0 (diff)
parentf5b313a2bcd4c436560c044c726d9ad84a3e4bb3 (diff)
Merge tag 'regmap-v3.18' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/regmap
Pull regmap updates from Mark Brown: "The main update this time around is the addition of a standard DT binding for specifying the endianness of devices. This allows drivers to support any endianness of device register map without any code, useful for configurable IP blocks. There's also a few bug fixes that I didn't get round to sending, none of them terribly severe or new, and a reduction in size for struct regmap" * tag 'regmap-v3.18' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/regmap: regmap: Fix debugfs-file 'registers' mode regmap: fix possible ZERO_SIZE_PTR pointer dereferencing error. regmap: debugfs: fix possbile NULL pointer dereference regmap: fix NULL pointer dereference in _regmap_write/read regmap: fix NULL pointer dereference in regmap_get_val_endian regmap: cache: Do not fail silently from regcache_sync calls regmap: change struct regmap's internal locks as union regmap: Split regmap_get_endian() in two functions regmap: of_regmap_get_endian() cleanup regmap: Fix DT endianess parsing logic regmap: Add explicit dependencies to catch "select" misuse regmap: Restore L: linux-kernel@vger.kernel.org entry regmap: Add the DT binding documentation for endianness regmap: add DT endianness binding support.
Diffstat (limited to 'drivers/base/regmap/regcache.c')
-rw-r--r--drivers/base/regmap/regcache.c13
1 files changed, 11 insertions, 2 deletions
diff --git a/drivers/base/regmap/regcache.c b/drivers/base/regmap/regcache.c
index 5617da6dc898..f1280dc356d0 100644
--- a/drivers/base/regmap/regcache.c
+++ b/drivers/base/regmap/regcache.c
@@ -269,8 +269,11 @@ static int regcache_default_sync(struct regmap *map, unsigned int min,
269 map->cache_bypass = 1; 269 map->cache_bypass = 1;
270 ret = _regmap_write(map, reg, val); 270 ret = _regmap_write(map, reg, val);
271 map->cache_bypass = 0; 271 map->cache_bypass = 0;
272 if (ret) 272 if (ret) {
273 dev_err(map->dev, "Unable to sync register %#x. %d\n",
274 reg, ret);
273 return ret; 275 return ret;
276 }
274 dev_dbg(map->dev, "Synced register %#x, value %#x\n", reg, val); 277 dev_dbg(map->dev, "Synced register %#x, value %#x\n", reg, val);
275 } 278 }
276 279
@@ -615,8 +618,11 @@ static int regcache_sync_block_single(struct regmap *map, void *block,
615 ret = _regmap_write(map, regtmp, val); 618 ret = _regmap_write(map, regtmp, val);
616 619
617 map->cache_bypass = 0; 620 map->cache_bypass = 0;
618 if (ret != 0) 621 if (ret != 0) {
622 dev_err(map->dev, "Unable to sync register %#x. %d\n",
623 regtmp, ret);
619 return ret; 624 return ret;
625 }
620 dev_dbg(map->dev, "Synced register %#x, value %#x\n", 626 dev_dbg(map->dev, "Synced register %#x, value %#x\n",
621 regtmp, val); 627 regtmp, val);
622 } 628 }
@@ -641,6 +647,9 @@ static int regcache_sync_block_raw_flush(struct regmap *map, const void **data,
641 map->cache_bypass = 1; 647 map->cache_bypass = 1;
642 648
643 ret = _regmap_raw_write(map, base, *data, count * val_bytes); 649 ret = _regmap_raw_write(map, base, *data, count * val_bytes);
650 if (ret)
651 dev_err(map->dev, "Unable to sync registers %#x-%#x. %d\n",
652 base, cur - map->reg_stride, ret);
644 653
645 map->cache_bypass = 0; 654 map->cache_bypass = 0;
646 655