ASoC: rt715: Use maple tree register cache
authorMark Brown <broonie@kernel.org>
Fri, 21 Apr 2023 16:35:46 +0000 (17:35 +0100)
committerMark Brown <broonie@kernel.org>
Sun, 7 May 2023 23:48:44 +0000 (08:48 +0900)
commit50f655429957702302c91835d84a03b9672862c2
tree2f0df308704e4cd69943b249fab2e90329709223
parent12b99ec3b9b6349a38223cf4d13818cb5cbdcd46
ASoC: rt715: Use maple tree 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.

RT715 seems like a good candidate for maple tree. It is a SoundWire MBQ
device and therefore supports only single register read/write operations
which do not use raw I/O and will therefore save the cost of converting
to and from device native format when accessing the cache while not having
a negative impact from the current lack of bulk operations in maple tree
cache sync. It has a moderately large and quite sparse register map which
is a good fit for storing in a 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/20230412-asoc-rt715-maple-v1-1-200a84835fde@kernel.org
Signed-off-by: Mark Brown <broonie@kernel.org
sound/soc/codecs/rt715-sdw.c