ASoC: SDCA: Fix some holes in the regmap readable/writeable helpers
authorCharles Keepax <ckeepax@opensource.cirrus.com>
Fri, 18 Jul 2025 13:54:31 +0000 (14:54 +0100)
committerMark Brown <broonie@kernel.org>
Thu, 24 Jul 2025 12:28:08 +0000 (13:28 +0100)
commit061fade7a67f6cdfe918a675270d84107abbef61
treedb221496e660a107876bd0a8b0d239445a7b0a2e
parentc58c35ef6ae62e36927f506a5afc66610b7261d9
ASoC: SDCA: Fix some holes in the regmap readable/writeable helpers

The current regmap readable/writeable helper functions always
allow the Next flag and allows any Control Number. Mask the Next
flag based on SDCA_ACCESS_MODE_DUAL which is the only Mode that
supports it. Also check that the Control Number is valid for
the given control.

Fixes: e3f7caf74b79 ("ASoC: SDCA: Add generic regmap SDCA helpers")
Signed-off-by: Charles Keepax <ckeepax@opensource.cirrus.com>
Link: https://patch.msgid.link/20250718135432.1048566-2-ckeepax@opensource.cirrus.com
Signed-off-by: Mark Brown <broonie@kernel.org>
sound/soc/sdca/sdca_regmap.c