ASoC: rt5682: Use a maple tree based register cache
authorMark Brown <broonie@kernel.org>
Tue, 25 Apr 2023 17:22:46 +0000 (18:22 +0100)
committerMark Brown <broonie@kernel.org>
Sun, 7 May 2023 23:48:46 +0000 (08:48 +0900)
commit582ed3162de0fb64f2ce5139a5bb49ee06ddd99c
tree7ab2a81579d4062ce60d2ce3cf0d495f09a9016c
parente09eb6ac4170ba3b46c642b4a88480376febbff1
ASoC: rt5682: Use a maple tree based register cache

regmap has introduced a maple tree based register cache which makes use of
this more advanced data structure which has been added to the kernel
recently. Maple trees are much flatter than rbtrees, meaning that they do
not grow to such depths when the register map is sparse which makes access
a bit more efficient. The maple tree cache type is still a bit of a work
in progress but should be effective for some devices already.

RT5682 seems like a good candidate for maple tree. It only supports single
register read/write operations so will gain minimal benefit from storing
the register data in device native format like rbtree does (none for
SoundWire) and has some sparsity in the register map which is a good fit
for maple tree.

Convert to use maple tree. There should be little if any visible difference
at runtime.

Signed-off-by: Mark Brown <broonie@kernel.org
Link: https://lore.kernel.org/r/20230419-asoc-rt5682-maple-v1-1-ed40369c9099@kernel.org
Signed-off-by: Mark Brown <broonie@kernel.org
sound/soc/codecs/rt5682-sdw.c
sound/soc/codecs/rt5682s.c