ASoC: wm8940: Read chip ID when wm8940 codec probing
authorLukasz Majewski <lukma@denx.de>
Fri, 16 Dec 2022 09:46:24 +0000 (10:46 +0100)
committerMark Brown <broonie@kernel.org>
Sun, 25 Dec 2022 23:33:30 +0000 (23:33 +0000)
commita5c26ee572d94337baf9c944b7b4881a2db62d37
tree95a14b77677c61a342dba4a1bc0218fb147b26af
parent294833fc9eb4e9d6c69f8d158cd991d641e59908
ASoC: wm8940: Read chip ID when wm8940 codec probing

The wm8940 provides the chip ID information via I2C. In this
patch this information is read and if not matching expected
value, the probe function is aborted.

This prevents from using (i.e. inserting) other wm89* modules
which use the same I2C bus address.

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Acked-by: Charles Keepax <ckeepax@opensource.cirrus.com>
Link: https://lore.kernel.org/r/20221216094624.3849278-3-lukma@denx.de
Signed-off-by: Mark Brown <broonie@kernel.org>
sound/soc/codecs/wm8940.c
sound/soc/codecs/wm8940.h