Re: [PATCH] ASoC: WM8804: Retrieve the device revision and print it

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxxxxxxxxxxxxxxxxxxxx>
> ---
>  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@xxxxxxxxxxxxxxx>
-- 
Freelance Developer, SlimLogic Ltd
ASoC and Voltage Regulator Maintainer.
http://www.slimlogic.co.uk

_______________________________________________
Alsa-devel mailing list
Alsa-devel@xxxxxxxxxxxxxxxx
http://mailman.alsa-project.org/mailman/listinfo/alsa-devel


[Index of Archives]     [ALSA User]     [Linux Audio Users]     [Kernel Archive]     [Asterisk PBX]     [Photo Sharing]     [Linux Sound]     [Video 4 Linux]     [Gimp]     [Yosemite News]

  Powered by Linux