ASoC: cs35l41: Correct handling of some registers in the cache
authorCharles Keepax <ckeepax@opensource.cirrus.com>
Wed, 5 Jan 2022 11:30:22 +0000 (11:30 +0000)
committerMark Brown <broonie@kernel.org>
Wed, 5 Jan 2022 13:53:52 +0000 (13:53 +0000)
commit5f2f539901b0d9bda722637521a11b7f7cf753f1
tree5aa2bb80159e21429c733c19e8b6a258a7ddbd3e
parent56852cf4b2179fb90068a49538501f31c2de18ea
ASoC: cs35l41: Correct handling of some registers in the cache

It makes no sense to cache the test/user key registers, since they
require values written at specific times, mark them volatile. It is
probably best if they can't be accessed from user-space either, so
mark them precious as well.

The interrupt force, edge, polarity and debounce are all settings
applied to the IRQ rather than status bits and as such should not be
volatile.

The OTP trim values will require re-application in the event of a
cache sync and as such should not be volatile. The OTPID however
should be volatile.

The DSP scratch registers are used to read back an error/debug code
from the DSP on shutdown, as such these should be marked volatile.

Finally, add some missing defaults, add TST_FS_MON0, and allow the
DSP core control register to be cached.

Signed-off-by: Charles Keepax <ckeepax@opensource.cirrus.com>
Link: https://lore.kernel.org/r/20220105113026.18955-5-ckeepax@opensource.cirrus.com
Signed-off-by: Mark Brown <broonie@kernel.org>
sound/soc/codecs/cs35l41-lib.c