linux-arm-msm.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Michael Bohan <mbohan@codeaurora.org>
To: Mark Brown <broonie@opensource.wolfsonmicro.com>
Cc: rnayak@ti.com, lrg@ti.com, LKML <linux-kernel@vger.kernel.org>,
	linux-arm-msm@vger.kernel.org
Subject: Re: Regulator supplies when using Device Tree
Date: Mon, 02 Apr 2012 18:53:33 -0700	[thread overview]
Message-ID: <4F7A581D.2020303@codeaurora.org> (raw)
In-Reply-To: <20120402212232.GA3160@opensource.wolfsonmicro.com>

On 4/2/2012 2:22 PM, Mark Brown wrote:
> On Mon, Apr 02, 2012 at 10:35:22AM -0700, Michael Bohan wrote:
>> Some of our regulators take inputs from other regulators. Some
>> regulators take their input from the battery. We support both types
>
> Oh, if that's all it is that's totally normal and unsurprising.  Just
> tell the regulator API about the battery supply, typically people use
> a fixed regulator for this.  You don't have to specify a voltage when
> you use them.

One problem here is the added run-time overhead. This includes the 
callbacks for the battery device which serve no functional purpose. And 
then there's the contention for a single mutex on the battery regulator, 
which all regulators using it as a supply would have to contend for. 
That is actually a sizable number of devices in our configuration; And 
these operations are frequent and time sensitive.

Plus, then there's other complexities that arise here by introducing yet 
another regulator driver into the configuration. The 'fixed' regulator 
driver initializes at subsys_initcall, but our other regulator drivers 
are registered at arch_initcall. This is because with Device Tree 
configurations we are forced to explicitly register drivers in a precise 
sequence in order to satisfy device dependencies and early probe times. 
But using 'fixed' would complicate this process, since we don't have 
control over it.

And generally speaking, why incur a larger memory footprint by linking 
another driver when there's no technical need to?

Thus it seems like there are use cases to have a single driver that can 
support regulators with or without supplies specified. I see adding a 
few lines of ugly code in the driver more ideal than accepting the 
problems above. But it would be nice if the regulator Device Tree 
support could handle it natively.

Thanks,
Mike

-- 
Sent by an employee of the Qualcomm Innovation Center, Inc.
The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum.

  reply	other threads:[~2012-04-03  1:53 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-03-23  1:17 Regulator supplies when using Device Tree Michael Bohan
2012-03-26 13:00 ` Mark Brown
2012-03-28  1:38   ` Michael Bohan
2012-03-28 10:09     ` Mark Brown
2012-03-28 19:19       ` Michael Bohan
2012-03-28 19:33         ` Mark Brown
2012-03-29  0:06           ` Michael Bohan
2012-03-29  4:44             ` Rajendra Nayak
2012-03-29 11:08               ` Mark Brown
2012-03-29 11:11             ` Mark Brown
2012-03-30  1:18               ` Michael Bohan
2012-03-30 10:36                 ` Mark Brown
2012-04-02 17:35                   ` Michael Bohan
2012-04-02 21:22                     ` Mark Brown
2012-04-03  1:53                       ` Michael Bohan [this message]
2012-04-03 12:25                         ` 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=4F7A581D.2020303@codeaurora.org \
    --to=mbohan@codeaurora.org \
    --cc=broonie@opensource.wolfsonmicro.com \
    --cc=linux-arm-msm@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=lrg@ti.com \
    --cc=rnayak@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;
as well as URLs for NNTP newsgroup(s).