From: Dimitris Papastamos Date: Mon, 4 Oct 2010 15:28:59 +0000 (+0100) Subject: ASoC: WM8804: Retrieve the device revision and print it X-Git-Tag: v2.6.37-rc1~82^2~8^2~42 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=e595b3252f4a53fc52227ca7a8b94199f9f319a9;p=profile%2Fivi%2Fkernel-x86-ivi.git ASoC: WM8804: Retrieve the device revision and print it Be verbose and print out the device revision. Signed-off-by: Dimitris Papastamos Acked-by: Liam Girdwood Signed-off-by: Mark Brown --- diff --git a/sound/soc/codecs/wm8804.c b/sound/soc/codecs/wm8804.c index 2657f5c..642b07c 100644 --- a/sound/soc/codecs/wm8804.c +++ b/sound/soc/codecs/wm8804.c @@ -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);