All of lore.kernel.org
 help / color / mirror / Atom feed
From: Mark Brown <broonie@opensource.wolfsonmicro.com>
To: aghayal@codeaurora.org
Cc: linux-arm-msm@vger.kernel.org, collinsd@codeaurora.org,
	tsoni@codeaurora.org
Subject: Re: Shared regulator usage
Date: Mon, 26 Nov 2012 13:47:19 +0000	[thread overview]
Message-ID: <20121126134719.GI9411@opensource.wolfsonmicro.com> (raw)
In-Reply-To: <1b9aae54f83056035d83c049a7ac1876.squirrel@www.codeaurora.org>

[-- Attachment #1: Type: text/plain, Size: 1345 bytes --]

On Mon, Nov 26, 2012 at 05:13:37AM -0800, aghayal@codeaurora.org wrote:

> For example:
> Consumer (A) cpu-freq sets the voltage range to {1.275v, 1.375v}. The
> regulator framework eventually sets the regulator to 1.275v. Consumer (B)
> recommends a lower the voltage say (1.25v) and executes set_volatge on
> {1.25v, 1.25v}. This is where regulator_check_consumers() fails as it does
> not meet the (A)'s constraint.

Well, of course.  What else would you expect to happen in this case?

> We are looking for the right way to handle such a situation using
> regulator framework, considering this to be a valid usecase. One way we
> could think of is having one of the driver (say cpu-freq) register a
> virtual regulator device and have the other driver be its consumer. This
> way all the regulator calls to the physical hardware will be routed though
> one primary driver which can take care of the adjustments. The problem
> with such approach would be scalability for a new consumer, i.e. adding
> another consumer for the primary driver would present a similar problem as
> the original one.

Why not just fix your consumers to request the voltage ranges they
actually want?  Clearly in your above example one of the consumers can
support a wider voltage range than it is actually requesting so it
should just request that voltage range.

[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 836 bytes --]

  reply	other threads:[~2012-11-26 13:47 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-11-26 13:13 Shared regulator usage aghayal
2012-11-26 13:47 ` Mark Brown [this message]
2012-11-27 11:15   ` Anirudh Ghayal
2012-11-27 11:32     ` Mark Brown
2012-11-27 15:17     ` Kevin Hilman
2012-11-27 15:17       ` Kevin Hilman

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=20121126134719.GI9411@opensource.wolfsonmicro.com \
    --to=broonie@opensource.wolfsonmicro.com \
    --cc=aghayal@codeaurora.org \
    --cc=collinsd@codeaurora.org \
    --cc=linux-arm-msm@vger.kernel.org \
    --cc=tsoni@codeaurora.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.