All of lore.kernel.org
 help / color / mirror / Atom feed
From: Dan Carpenter <dan.carpenter@oracle.com>
To: broonie@opensource.wolfsonmicro.com
Cc: alsa-devel@alsa-project.org
Subject: Re: ASoC: dapm: Allow regulators to bypass as well as disable when idle
Date: Thu, 27 Sep 2012 22:57:58 +0300	[thread overview]
Message-ID: <20120927195758.GA10652@elgon.mountain> (raw)

Hi Mark,

I had a question about patch c05b84d14b23: "ASoC: dapm: Allow regulators
to bypass as well as disable when idle" from Sep 7, 2012.

  1022          if (SND_SOC_DAPM_EVENT_ON(event)) {
  1023                  if (w->invert & SND_SOC_DAPM_REGULATOR_BYPASS) {
                            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

  1024                          ret = regulator_allow_bypass(w->regulator, true);
  1025                          if (ret != 0)
  1026                                  dev_warn(w->dapm->dev,
  1027                                           "Failed to bypass %s: %d\n",
  1028                                           w->name, ret);
  1029                  }
  1030  
  1031                  return regulator_enable(w->regulator);
  1032          } else {
  1033                  if (w->invert & SND_SOC_DAPM_REGULATOR_BYPASS) {
                            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Right now ->invert is a single bit bitfield.  We mostly test
"if (w->invert) {...".  Are we planning to add some more bits in there?

  1034                          ret = regulator_allow_bypass(w->regulator, false);
  1035                          if (ret != 0)
  1036                                  dev_warn(w->dapm->dev,
  1037                                           "Failed to unbypass %s: %d\n",
  1038                                           w->name, ret);
  1039                  }

regards,
dan carpenter

             reply	other threads:[~2012-09-27 19:58 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-09-27 19:57 Dan Carpenter [this message]
2012-09-28 10:42 ` ASoC: dapm: Allow regulators to bypass as well as disable when idle 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=20120927195758.GA10652@elgon.mountain \
    --to=dan.carpenter@oracle.com \
    --cc=alsa-devel@alsa-project.org \
    --cc=broonie@opensource.wolfsonmicro.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.