mirror of
https://github.com/torvalds/linux.git
synced 2024-12-03 17:41:22 +00:00
ASoC: WM8804: Retrieve the device revision and print it
Be verbose and print out the device revision. Signed-off-by: Dimitris Papastamos <dp@opensource.wolfsonmicro.com> Acked-by: Liam Girdwood <lrg@slimlogic.co.uk> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
This commit is contained in:
parent
f479fd93d4
commit
e595b3252f
@ -643,6 +643,14 @@ static int wm8804_probe(struct snd_soc_codec *codec)
|
||||
goto err_reg_enable;
|
||||
}
|
||||
|
||||
ret = snd_soc_read(codec, WM8804_DEVREV);
|
||||
if (ret < 0) {
|
||||
dev_err(codec->dev, "Failed to read device revision: %d\n",
|
||||
ret);
|
||||
goto err_reg_enable;
|
||||
}
|
||||
dev_info(codec->dev, "revision %c\n", ret + 'A');
|
||||
|
||||
ret = wm8804_reset(codec);
|
||||
if (ret < 0) {
|
||||
dev_err(codec->dev, "Failed to issue reset: %d\n", ret);
|
||||
|
Loading…
Reference in New Issue
Block a user