linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: jszhang@marvell.com (Jisheng Zhang)
To: linux-arm-kernel@lists.infradead.org
Subject: "coupled" regulator support
Date: Mon, 18 Jul 2016 14:44:22 +0800	[thread overview]
Message-ID: <20160718144422.30be1e2f@xhacker> (raw)
In-Reply-To: <20160715125039.GI30372@sirena.org.uk>

Dear Mark,

On Fri, 15 Jul 2016 13:50:39 +0100 Mark Brown wrote:

> On Fri, Jul 15, 2016 at 08:01:13PM +0800, Jisheng Zhang wrote:
> 
> > regR can only be set to v1 if devA and devB all call for set voltage to v1
> > regR can set to v2 if devA or devB call for set voltage to v2  
> 
> > To support this situation, I'd like to add flag to regulator structure and
> > patch regulator_check_consumers() to check whether we are safe to set the vol  
> 
> Surely this is just what normal set voltage calls do?  If devA says
> set_voltage(v1, v2) but devB still has set_voltage(v2, v2) then we will
> leave the voltage at v2, we'll only allow it to be set to v1 if both
> consumers agree that this is a valid voltage.  It feels like there's
> something else going on here that I'm missing?

oops, sorry for not describing the situation clearly. Here are more details.

I'm implementing DVFS for devA and devB, devA and devB shares the same
voltage regulator. devA and devB are different devices, and they are
independent in DVFS.

v1 and v2 and both valid voltages, but here we have an explicit limitation:
we must take the "regulator shared" fact into consideration. Let's assume
the voltage is at v2, devA is not busy now, it wants to scale down freq, then
scale down voltage to v1, but if devB hasn't call for setting voltage to
v1, we can't scale down voltage now, we need to wait for devB sending out
the voltage scaling down request when it is not busy in future some time.
Obviously, the last user will succeed to scale down the voltage.

My solution is
to extend regulator_check_consumers() to check whether all consumers agree
to scaling down voltage or not.

Thanks,
Jisheng

  reply	other threads:[~2016-07-18  6:44 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-07-15 12:01 "coupled" regulator support Jisheng Zhang
2016-07-15 12:50 ` Mark Brown
2016-07-18  6:44   ` Jisheng Zhang [this message]
2016-07-18 18:05     ` Mark Brown
2016-07-21 10:45       ` Jisheng Zhang

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=20160718144422.30be1e2f@xhacker \
    --to=jszhang@marvell.com \
    --cc=linux-arm-kernel@lists.infradead.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 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).