ASoC: WM8804: Retrieve the device revision and print it
authorDimitris Papastamos <dp@opensource.wolfsonmicro.com>
Mon, 4 Oct 2010 15:28:59 +0000 (16:28 +0100)
committerMark Brown <broonie@opensource.wolfsonmicro.com>
Tue, 5 Oct 2010 16:57:10 +0000 (09:57 -0700)
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>
sound/soc/codecs/wm8804.c

index 2657f5c7ff08bd4e4737b5fb0b5eef6a4ff44cf5..642b07ceddfaaf10b44e74280547f9a3b3e448af 100644 (file)
@@ -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);