public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Dimitris Papastamos <dp@opensource.wolfsonmicro.com>
To: Axel Lin <axel.lin@gmail.com>
Cc: linux-kernel@vger.kernel.org,
	Mark Brown <broonie@opensource.wolfsonmicro.com>,
	Liam Girdwood <lrg@ti.com>,
	alsa-devel@alsa-project.org
Subject: Re: [PATCH] ASoC: Writing register default value for the reset register
Date: Tue, 11 Oct 2011 13:33:05 +0100	[thread overview]
Message-ID: <20111011123305.GA2899@opensource.wolfsonmicro.com> (raw)
In-Reply-To: <1318326900.3526.2.camel@phoenix>

On Tue, Oct 11, 2011 at 05:55:00PM +0800, Axel Lin wrote:
> The WM8983 can be reset by performing a write of any value to
> the software reset register.
> To avoid writing to the software reset register while resume,
> we should write the same value in wm8983_reg_defs to software
> reset register in wm8983_probe().
> The write to the reset register is suppressed by the cache
> restore code when it skips writes of default registers.
> 
> Signed-off-by: Axel Lin <axel.lin@gmail.com>
> ---
>  sound/soc/codecs/wm8983.c |    2 +-
>  1 files changed, 1 insertions(+), 1 deletions(-)
> 
> diff --git a/sound/soc/codecs/wm8983.c b/sound/soc/codecs/wm8983.c
> index 17f04ec..93ee284 100644
> --- a/sound/soc/codecs/wm8983.c
> +++ b/sound/soc/codecs/wm8983.c
> @@ -1007,7 +1007,7 @@ static int wm8983_probe(struct snd_soc_codec *codec)
>  		return ret;
>  	}
>  
> -	ret = snd_soc_write(codec, WM8983_SOFTWARE_RESET, 0x8983);
> +	ret = snd_soc_write(codec, WM8983_SOFTWARE_RESET, 0);
>  	if (ret < 0) {
>  		dev_err(codec->dev, "Failed to issue reset: %d\n", ret);
>  		return ret;

We should probably just handle the reset register specially during
resume.

Thanks,
Dimitris

  reply	other threads:[~2011-10-11 12:33 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-10-11  9:55 [PATCH] ASoC: Writing register default value for the reset register Axel Lin
2011-10-11 12:33 ` Dimitris Papastamos [this message]
2011-10-11 13:31   ` Mark Brown
2011-10-11 14:16     ` Dimitris Papastamos
2011-10-11 13:33 ` Mark Brown

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20111011123305.GA2899@opensource.wolfsonmicro.com \
    --to=dp@opensource.wolfsonmicro.com \
    --cc=alsa-devel@alsa-project.org \
    --cc=axel.lin@gmail.com \
    --cc=broonie@opensource.wolfsonmicro.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=lrg@ti.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox