diff options
| author | Srinivas Kandagatla <srinivas.kandagatla@oss.qualcomm.com> | 2026-09-08 09:28:05 +0100 |
|---|---|---|
| committer | Mark Brown <broonie@kernel.org> | 2026-09-08 19:54:50 +0100 |
| commit | 8ed9306885eb7e242ad0f859e1fbc2d822d3d0eb (patch) | |
| tree | 50ea24e81fcf6c3222921c079cb7d0d77e8c6c1e | |
| parent | 384bd7cf40530b32e838a38977902de6bc7f4d19 (diff) | |
| download | linux-next-8ed9306885eb7e242ad0f859e1fbc2d822d3d0eb.tar.gz linux-next-8ed9306885eb7e242ad0f859e1fbc2d822d3d0eb.zip | |
ASoC: codecs: lpass-tx-macro: switch cache to REGCACHE_MAPLE
REGCACHE_FLAT hides missing-default reads by returning the zero-
initialised cache slot instead of doing a bus read. The caller
can't tell that value apart from a real hardware value, so any
un-defaulted, readable, non-volatile register that gets read
silently returns wrong data. Since commit e062bdfdd6ad ("regmap:
warn users about uninitialized flat cache") regmap dev_warn_once()s
the first such miss, but any subsequent miss stays silent.
Switch to REGCACHE_MAPLE. A cache miss returns -ENOENT and the
regmap core falls back to a real bus read, so the caller always
gets the true hardware value. Write-cache behaviour is unchanged.
Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@oss.qualcomm.com>
Link: https://patch.msgid.link/20260908082806.648797-6-srinivas.kandagatla@oss.qualcomm.com
Signed-off-by: Mark Brown <broonie@kernel.org>
| -rw-r--r-- | sound/soc/codecs/lpass-tx-macro.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/sound/soc/codecs/lpass-tx-macro.c b/sound/soc/codecs/lpass-tx-macro.c index a8e83eb60ba2..6f362b196f47 100644 --- a/sound/soc/codecs/lpass-tx-macro.c +++ b/sound/soc/codecs/lpass-tx-macro.c @@ -602,7 +602,7 @@ static const struct regmap_config tx_regmap_config = { .reg_bits = 16, .val_bits = 32, .reg_stride = 4, - .cache_type = REGCACHE_FLAT, + .cache_type = REGCACHE_MAPLE, .max_register = TX_MAX_OFFSET, .reg_defaults = tx_defaults, .num_reg_defaults = ARRAY_SIZE(tx_defaults), |
