alsa-devel.alsa-project.org archive mirror
 help / color / mirror / Atom feed
From: Mark Brown <broonie@opensource.wolfsonmicro.com>
To: Jerry Wong <Jerry.Wong@maximintegrated.com>
Cc: "alsa-devel@alsa-project.org" <alsa-devel@alsa-project.org>,
	"jwong@jwassociates.com" <jwong@jwassociates.com>
Subject: Re: [PATCH 002/002] ASoC: Replace max98090 Device Driver
Date: Fri, 25 Jan 2013 15:21:38 +0800	[thread overview]
Message-ID: <20130125072131.GA6403@opensource.wolfsonmicro.com> (raw)
In-Reply-To: <A453F1AE3B5DC14DB19666C506CE75A7108684F4C7@ITSVLEX06.it.maxim-ic.internal>

On Thu, Jan 24, 2013 at 03:28:54PM -0800, Jerry Wong wrote:

> This is an odd control that is a combination of an enum and a power
> management widget. The 0 value of the enum  turns power off.
> Not sure what is another choice. The enum value needs to be
> saved so it can be restored when DAPM turns the control on.

That doesn't appear to be what your control actually does - what happens
if someone writes ot the control while the widget is powered down?

> > +static const struct snd_kcontrol_new max98090_snd_controls[] = {
> > +       SOC_SINGLE("MIC Bias VCM Bandgap", M98090_REG_BIAS_CNTL,
> > +               M98090_VCM_MODE_SHIFT, M98090_VCM_MODE_NUM - 1, 0),

> > Why is this a user visible control?

> It is not controlled by DAPM. The low power function is taken care of by
> /SHDN\, so this retains the user choice of bandgap or divider reference.

Why would the user want this choice?

> > +static int max98090_runtime_resume(struct device *dev)
> > +{
> > +       struct max98090_priv *max98090 = dev_get_drvdata(dev);
> > +
> > +       regcache_cache_only(max98090->regmap, false);
> > +
> > +       max98090_reset(max98090);
> > +
> > +       regcache_sync(max98090->regmap);

> > Do you really need to reset the device here?  If anything I'd expect it
> > on suspend since the reset state is probably the lowest power state.

> Yes, for a soft reset where the device is not power cycled, DAPM has
> the device go in and out of the low power /SHDN\ state, and the old
> register values are retained. Without this, we would need to specify
> that the PMIC power cycle the chip.

This doesn't really answer my questions.  Why would it matter if the
PMIC has power cycled the chip, and if you do need to do this why is
resume the time to do it?

  parent reply	other threads:[~2013-01-25  7:27 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-01-14 15:13 [PATCH 002/002] ASoC: Replace max98090 Device Driver Jerry Wong
2013-01-17  2:53 ` Mark Brown
2013-01-23 17:33   ` Jerry Wong
     [not found] ` <A453F1AE3B5DC14DB19666C506CE75A7108684F4C7@ITSVLEX06.it.maxim-ic.internal>
2013-01-25  7:21   ` Mark Brown [this message]
2013-01-25 15:39     ` Jerry Wong
2013-01-25 17:02       ` Jerry Wong
2013-01-26  7:15         ` Mark Brown
2013-01-26  7:12       ` Mark Brown
     [not found]   ` <A453F1AE3B5DC14DB19666C506CE75A7108684F4ED@ITSVLEX06.it.maxim-ic.internal>
2013-02-01  5:13     ` Jerry Wong

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=20130125072131.GA6403@opensource.wolfsonmicro.com \
    --to=broonie@opensource.wolfsonmicro.com \
    --cc=Jerry.Wong@maximintegrated.com \
    --cc=alsa-devel@alsa-project.org \
    --cc=jwong@jwassociates.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;
as well as URLs for NNTP newsgroup(s).