alsa-devel.alsa-project.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] ASoC: WM8804: Retrieve the device revision and print it
@ 2010-10-04 14:29 Dimitris Papastamos
  2010-10-04 15:16 ` Mark Brown
  0 siblings, 1 reply; 5+ messages in thread
From: Dimitris Papastamos @ 2010-10-04 14:29 UTC (permalink / raw)
  To: Mark Brown, Liam Girdwood; +Cc: alsa-devel, patches

Be verbose and print out the device revision.

Signed-off-by: Dimitris Papastamos <dp@opensource.wolfsonmicro.com>
---
 sound/soc/codecs/wm8804.c |    8 ++++++++
 1 files changed, 8 insertions(+), 0 deletions(-)

diff --git a/sound/soc/codecs/wm8804.c b/sound/soc/codecs/wm8804.c
index 2657f5c..90c24ae 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 %d\n", ret);
+
 	ret = wm8804_reset(codec);
 	if (ret < 0) {
 		dev_err(codec->dev, "Failed to issue reset: %d\n", ret);
-- 
1.7.3.1

^ permalink raw reply related	[flat|nested] 5+ messages in thread

* Re: [PATCH] ASoC: WM8804: Retrieve the device revision and print it
  2010-10-04 14:29 Dimitris Papastamos
@ 2010-10-04 15:16 ` Mark Brown
  0 siblings, 0 replies; 5+ messages in thread
From: Mark Brown @ 2010-10-04 15:16 UTC (permalink / raw)
  To: Dimitris Papastamos; +Cc: alsa-devel, patches, Liam Girdwood

On Mon, Oct 04, 2010 at 03:29:08PM +0100, Dimitris Papastamos wrote:

> +	dev_info(codec->dev, "revision %d\n", ret);

Normally the revisions for Wolfson devices are alphabetic.

^ permalink raw reply	[flat|nested] 5+ messages in thread

* [PATCH] ASoC: WM8804: Retrieve the device revision and print it
@ 2010-10-04 15:28 Dimitris Papastamos
  2010-10-05 16:48 ` Liam Girdwood
  2010-10-05 16:58 ` Mark Brown
  0 siblings, 2 replies; 5+ messages in thread
From: Dimitris Papastamos @ 2010-10-04 15:28 UTC (permalink / raw)
  To: Mark Brown, Liam Girdwood; +Cc: alsa-devel, patches

Be verbose and print out the device revision.

Signed-off-by: Dimitris Papastamos <dp@opensource.wolfsonmicro.com>
---
 sound/soc/codecs/wm8804.c |    8 ++++++++
 1 files changed, 8 insertions(+), 0 deletions(-)

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);
-- 
1.7.3.1

^ permalink raw reply related	[flat|nested] 5+ messages in thread

* Re: [PATCH] ASoC: WM8804: Retrieve the device revision and print it
  2010-10-04 15:28 [PATCH] ASoC: WM8804: Retrieve the device revision and print it Dimitris Papastamos
@ 2010-10-05 16:48 ` Liam Girdwood
  2010-10-05 16:58 ` Mark Brown
  1 sibling, 0 replies; 5+ messages in thread
From: Liam Girdwood @ 2010-10-05 16:48 UTC (permalink / raw)
  To: Dimitris Papastamos; +Cc: alsa-devel, Mark Brown, patches

On Mon, 2010-10-04 at 16:28 +0100, Dimitris Papastamos wrote:
> Be verbose and print out the device revision.
> 
> Signed-off-by: Dimitris Papastamos <dp@opensource.wolfsonmicro.com>
> ---
>  sound/soc/codecs/wm8804.c |    8 ++++++++
>  1 files changed, 8 insertions(+), 0 deletions(-)
> 
> 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);

Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
-- 
Freelance Developer, SlimLogic Ltd
ASoC and Voltage Regulator Maintainer.
http://www.slimlogic.co.uk

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH] ASoC: WM8804: Retrieve the device revision and print it
  2010-10-04 15:28 [PATCH] ASoC: WM8804: Retrieve the device revision and print it Dimitris Papastamos
  2010-10-05 16:48 ` Liam Girdwood
@ 2010-10-05 16:58 ` Mark Brown
  1 sibling, 0 replies; 5+ messages in thread
From: Mark Brown @ 2010-10-05 16:58 UTC (permalink / raw)
  To: Dimitris Papastamos; +Cc: alsa-devel, patches, Liam Girdwood

On Mon, Oct 04, 2010 at 04:28:59PM +0100, Dimitris Papastamos wrote:
> Be verbose and print out the device revision.
> 
> Signed-off-by: Dimitris Papastamos <dp@opensource.wolfsonmicro.com>

Applied, thanks.

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2010-10-05 16:58 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-10-04 15:28 [PATCH] ASoC: WM8804: Retrieve the device revision and print it Dimitris Papastamos
2010-10-05 16:48 ` Liam Girdwood
2010-10-05 16:58 ` Mark Brown
  -- strict thread matches above, loose matches on Subject: below --
2010-10-04 14:29 Dimitris Papastamos
2010-10-04 15:16 ` Mark Brown

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).