]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
ASoC: cs35l56: Fix illegal writes to OTP_MEM registers
authorRichard Fitzgerald <rf@opensource.cirrus.com>
Tue, 28 Apr 2026 11:52:28 +0000 (12:52 +0100)
committerMark Brown <broonie@kernel.org>
Tue, 28 Apr 2026 23:41:14 +0000 (08:41 +0900)
commitbe102efb832ef7e30e4cd4c2edf22bbf64ddf35a
treed633a78e56579a4a6b84ad38e3544923fc4917d9
parent13d30682e8dee191ac04e93642f0372a723e8b0c
ASoC: cs35l56: Fix illegal writes to OTP_MEM registers

Mark the OTP_MEM registers as volatile so that regcache_sync() will not
attempt to write to them.

These registers hold a constant, and originally they were marked as
readable non-volatile so that this value would be read into the regmap
cache. The problem with this is regcache_sync() issues a write for any
cached register that does not have a reg_default.

Though these registers are constants and writing them in normal use
cannot change OTP, it is illegal for the host to write to them.

Fixes: e1830f66f6c6 ("ASoC: cs35l56: Add helper functions for amp calibration")
Signed-off-by: Richard Fitzgerald <rf@opensource.cirrus.com>
Link: https://patch.msgid.link/20260428115228.158252-1-rf@opensource.cirrus.com
Signed-off-by: Mark Brown <broonie@kernel.org>
sound/soc/codecs/cs35l56-shared.c