Skip to content

Commit f5b313a

Browse files
committed
Merge remote-tracking branch 'regmap/topic/cache' into regmap-next
2 parents 45942c3 + f29a432 commit f5b313a

File tree

1 file changed

+11
-2
lines changed

1 file changed

+11
-2
lines changed

drivers/base/regmap/regcache.c

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -269,8 +269,11 @@ static int regcache_default_sync(struct regmap *map, unsigned int min,
269269
map->cache_bypass = 1;
270270
ret = _regmap_write(map, reg, val);
271271
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);
273275
return ret;
276+
}
274277
dev_dbg(map->dev, "Synced register %#x, value %#x\n", reg, val);
275278
}
276279

@@ -615,8 +618,11 @@ static int regcache_sync_block_single(struct regmap *map, void *block,
615618
ret = _regmap_write(map, regtmp, val);
616619

617620
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);
619624
return ret;
625+
}
620626
dev_dbg(map->dev, "Synced register %#x, value %#x\n",
621627
regtmp, val);
622628
}
@@ -641,6 +647,9 @@ static int regcache_sync_block_raw_flush(struct regmap *map, const void **data,
641647
map->cache_bypass = 1;
642648

643649
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);
644653

645654
map->cache_bypass = 0;
646655

0 commit comments

Comments
 (0)