ASoC: WM8804: Retrieve the device revision and print it
Subsystems (3)
PATCH 1/1 ASoC: WM8804: Retrieve the device revision and print it
Be verbose and print out the device revision.
Signed-off-by Dimitris Papastamos <[email protected]>
--- sound/soc/codecs/wm8804.c | 8 ++++++++ 1 files changed, 8 insertions(+), 0 deletions(-)
sound/soc/codecs/wm8804.c +8 -0
@@ -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);
Signature · 1 line
1.7.3.1
Quoted 16 lines · Dimitris Papastamos
Be verbose and print out the device revision.
Signed-off-by Dimitris Papastamos <[email protected]>--- sound/soc/codecs/wm8804.c | 8 ++++++++ 1 files changed, 8 insertions(+), 0 deletions(-)sound/soc/codecs/wm8804.c +1
-0@@ -643,6 +643,14 @@ static int wm8804_probe(struct snd_soc_codec *codec) goto err_reg_enable; } + ret =snd_soc_read (codec,WM8804_DEVREV );
sound/soc/codecs/wm8804.c static int wm8804_probe(struct snd_soc_codec *codec) · line 656
Quoted 10 lines
sound/soc/codecs/wm8804.c +7
-0+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);
Acked-by Liam Girdwood <[email protected]>
Signature · 3 lines
Freelance Developer, SlimLogic Ltd ASoC and Voltage Regulator Maintainer. http://www.slimlogic.co.uk
Mark Brown
AppliedQuoted 3 lines · Dimitris Papastamos
Be verbose and print out the device revision.
Signed-off-by Dimitris Papastamos <[email protected]>
Applied, thanks.