Skip to content

Commit e595b32

Browse files
Dimitris Papastamosbroonie
authored andcommitted
ASoC: WM8804: Retrieve the device revision and print it
Be verbose and print out the device revision. Signed-off-by: Dimitris Papastamos <[email protected]> Acked-by: Liam Girdwood <[email protected]> Signed-off-by: Mark Brown <[email protected]>
1 parent f479fd9 commit e595b32

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

sound/soc/codecs/wm8804.c

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -643,6 +643,14 @@ static int wm8804_probe(struct snd_soc_codec *codec)
643643
goto err_reg_enable;
644644
}
645645

646+
ret = snd_soc_read(codec, WM8804_DEVREV);
647+
if (ret < 0) {
648+
dev_err(codec->dev, "Failed to read device revision: %d\n",
649+
ret);
650+
goto err_reg_enable;
651+
}
652+
dev_info(codec->dev, "revision %c\n", ret + 'A');
653+
646654
ret = wm8804_reset(codec);
647655
if (ret < 0) {
648656
dev_err(codec->dev, "Failed to issue reset: %d\n", ret);

0 commit comments

Comments
 (0)