regmap: sdw: check for invalid multi-register writes config
authorSrinivas Kandagatla <srinivas.kandagatla@linaro.org>
Tue, 23 May 2023 15:47:47 +0000 (16:47 +0100)
committerMark Brown <broonie@kernel.org>
Wed, 24 May 2023 10:21:51 +0000 (11:21 +0100)
commit95856d1f3c223c015780fffb8373a827fc4efd2e
tree6b564025daf872332334f7c47d71de5eb0a9b61b
parent3981514180c987a79ea98f0ae06a7cbf58a9ac0f
regmap: sdw: check for invalid multi-register writes config

SoundWire code as it is only supports Bulk register writes and
it does not support multi-register writes.

Any drivers that set can_multi_write and use regmap_multi_reg_write() will
easily endup with programming the hardware incorrectly without any errors.

So, add this check in bus code to be able to validate the drivers config.

Fixes: 522272047dc6 ("regmap: sdw: Remove 8-bit value size restriction")
Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
Link: https://lore.kernel.org/r/20230523154747.5429-1-srinivas.kandagatla@linaro.org
Signed-off-by: Mark Brown <broonie@kernel.org>
drivers/base/regmap/regmap-sdw.c