regmap: prevent noinc writes from clobbering cache
authorBen Wolsieffer <ben.wolsieffer@hefring.com>
Wed, 1 Nov 2023 14:29:27 +0000 (10:29 -0400)
committerMark Brown <broonie@kernel.org>
Wed, 1 Nov 2023 20:22:55 +0000 (20:22 +0000)
commit984a4afdc87a1fc226fd657b1cd8255c13d3fc1a
treef3b04c66377f7a41d3a7b157782005562214b841
parent6a2e332c2cbddd17d7dcb8f334953593f1324c8e
regmap: prevent noinc writes from clobbering cache

Currently, noinc writes are cached as if they were standard incrementing
writes, overwriting unrelated register values in the cache. Instead, we
want to cache the last value written to the register, as is done in the
accelerated noinc handler (regmap_noinc_readwrite).

Fixes: cdf6b11daa77 ("regmap: Add regmap_noinc_write API")
Signed-off-by: Ben Wolsieffer <ben.wolsieffer@hefring.com>
Link: https://lore.kernel.org/r/20231101142926.2722603-2-ben.wolsieffer@hefring.com
Signed-off-by: Mark Brown <broonie@kernel.org>
drivers/base/regmap/regmap.c