All of lore.kernel.org
 help / color / mirror / Atom feed
From: Mark Brown <broonie@opensource.wolfsonmicro.com>
To: Stephen Warren <swarren@wwwdotorg.org>
Cc: Oder Chiou <oder_chiou@realtek.com>,
	"alsa-devel@alsa-project.org" <alsa-devel@alsa-project.org>,
	Stephen Warren <swarren@nvidia.com>,
	Liam Girdwood <lgirdwood@gmail.com>,
	Mark Brown <broonie@kernel.org>, Bard <bardliao@realtek.com>,
	Flove <flove@realtek.com>
Subject: Re: [PATCH] ASoC: add RT5640 CODEC driver
Date: Wed, 17 Apr 2013 20:13:58 +0100	[thread overview]
Message-ID: <20130417191358.GA19873@opensource.wolfsonmicro.com> (raw)
In-Reply-To: <516EF05E.6060606@wwwdotorg.org>

On Wed, Apr 17, 2013 at 12:56:30PM -0600, Stephen Warren wrote:
> On 04/17/2013 12:52 PM, Mark Brown wrote:

> > Not if you do it at the other end - do it during device registration.
> > If nothing is set up then feed the regulator API whatever the default
> > configuration is for the device, otherwise use what you were given.
> > The consumer side can't tell where the configuration came from and will
> > always have one.

> > This does mean you need to do the regulator driver if you support
> > non-default configurations but that's no bad thing.

> OK, so something like:

> During DT parsing:

> if (!dt_property_exits())
>     // regulator API call to set up a dummy regulator for this device

You should probably have an actual regulator for the regulator that's
physically there and doing things but yes.  If (as one should) you're
supporting platform data as well then the DT code should just work with
no extra effort.

The WM8994 code I posted recently does all this, the regulator side is
in -next though Samuel didn't pick up the DT stuff yet and non-default
configurations just aren't supported except with platform data since I
am not aware of any such designs.

> The one thing I may have forgotten to mention here for the LDO1 case is
> that if we don't explicitly support regulators right away, then instead
> the driver needs to explicitly request a GPIO to control the LDO1_EN
> input on the chip; without that, the device won't even respond to I2C
> accesses. And hence, that GPIO also needs to be described in device
> tree. The other regulators could certainly all work as you're pointing out.

That's expected, yes - you can just define a property for the GPIO and
move it over to being handled by a proper regulator driver when you
write one.

  reply	other threads:[~2013-04-17 19:13 UTC|newest]

Thread overview: 28+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <1364340938-17175-1-git-send-email-swarren@wwwdotorg.org>
2013-03-27  1:15 ` [PATCH] ASoC: add RT5640 CODEC driver Mark Brown
2013-03-27 22:50   ` Stephen Warren
2013-03-27 23:07     ` Mark Brown
     [not found]       ` <1121E117AD4ECE49880A389A396215BB8718BB370D@rtitmbs7.realtek.com.tw>
     [not found]         ` <516DD0D4.5070409@wwwdotorg.org>
2013-04-17 14:01           ` Mark Brown
2013-04-17 15:18             ` Stephen Warren
2013-04-17 15:28               ` Mark Brown
2013-04-17 16:25                 ` Stephen Warren
2013-04-17 18:52                   ` Mark Brown
2013-04-17 18:56                     ` Stephen Warren
2013-04-17 19:13                       ` Mark Brown [this message]
     [not found] <1366121437-19396-1-git-send-email-bardliao@realtek.com>
     [not found] ` <20130416143807.GJ26958@opensource.wolfsonmicro.com>
2013-04-22  7:03   ` Bard
2013-04-22 14:06     ` Mark Brown
     [not found] <1369983899-13580-1-git-send-email-bardliao@realtek.com>
2013-06-03 15:35 ` Mark Brown
2013-06-04  6:39   ` Bard Liao
2013-06-04  9:53     ` Mark Brown
     [not found] ` <1121E117AD4ECE49880A389A396215BB8A8969924B@rtitmbs7.realtek.com.tw>
2013-06-03 15:48   ` Stephen Warren
2013-06-04  6:23     ` Bard Liao
2013-06-04 21:51 ` Stephen Warren
2013-06-04 22:05   ` Stephen Warren
2013-06-05 10:02   ` Bard Liao
     [not found] <1370927416-12216-1-git-send-email-bardliao@realtek.com>
2013-06-11  9:12 ` Mark Brown
2013-06-11 17:36   ` Stephen Warren
2013-06-12  7:47   ` Bard Liao
2013-06-11 17:41 ` Stephen Warren
2013-06-12  7:56   ` Bard Liao
2013-06-12 15:31   ` Mark Brown
2013-06-11 20:43 ` Stephen Warren
2013-06-12 16:42 ` 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=20130417191358.GA19873@opensource.wolfsonmicro.com \
    --to=broonie@opensource.wolfsonmicro.com \
    --cc=alsa-devel@alsa-project.org \
    --cc=bardliao@realtek.com \
    --cc=broonie@kernel.org \
    --cc=flove@realtek.com \
    --cc=lgirdwood@gmail.com \
    --cc=oder_chiou@realtek.com \
    --cc=swarren@nvidia.com \
    --cc=swarren@wwwdotorg.org \
    /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.