Skip to content

Commit 231a1e3

Browse files
committed
Merge tag 'regmap-fix-v6.4-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/regmap
Pull regmap fix from Mark Brown: "Another fix for the maple tree cache, Takashi noticed that unlike other caches the maple tree cache didn't check for read only registers before trying to sync which would result in spurious syncs for read only registers where we don't have a default. This was due to the check being open coded in the caches, we now check in the shared 'does this register need sync' function so that is fixed for this and future caches" * tag 'regmap-fix-v6.4-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/regmap: regmap: regcache: Don't sync read-only registers
2 parents c926a55 + 44e4657 commit 231a1e3

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

drivers/base/regmap/regcache.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -284,6 +284,9 @@ static bool regcache_reg_needs_sync(struct regmap *map, unsigned int reg,
284284
{
285285
int ret;
286286

287+
if (!regmap_writeable(map, reg))
288+
return false;
289+
287290
/* If we don't know the chip just got reset, then sync everything. */
288291
if (!map->no_sync_defaults)
289292
return true;

0 commit comments

Comments
 (0)