[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20140205181817.GG32298@sirena.org.uk>
Date: Wed, 5 Feb 2014 18:18:17 +0000
From: Mark Brown <broonie@...nel.org>
To: Bjorn Andersson <bjorn@...o.se>
Cc: Liam Girdwood <lgirdwood@...il.com>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
linux-arm-msm <linux-arm-msm@...r.kernel.org>,
"linux-arm-kernel@...ts.infradead.org"
<linux-arm-kernel@...ts.infradead.org>
Subject: Re: [PATCH] regulator: core: Make regulator object reflect
configured voltage
On Wed, Feb 05, 2014 at 10:00:15AM -0800, Bjorn Andersson wrote:
> On Tue, Feb 4, 2014 at 12:00 PM, Mark Brown <broonie@...nel.org> wrote:
> > So we should be changing the code to allow a set_voltage() that sets the
> > voltage to the existing voltage regardless of constraints allowing a
> > change then - that's what the underlying issue is. Your change wouldn't
> > cover the case where the hardware defualt is being used for example.
> Makes sense, but the only thing we could check for would be if min_uV
> == max_uV == current-voltage. That would work out fine for this use
> case, but do you think it would be good enough?
It should be fine to check for min_uV <= current-voltage <= max_uV
instead if CHANGE_VOLTAGE isn't available, so long as the existing
setting is in the range it's fine.
> The best thing I've come up with then is to add the following check in
> regulator_set_voltage().
> if (min_uV == max_uV && _regulator_get_voltage(rdev) == min_uV)
> goto out;
> Would this be acceptable? It's achieving the same thing as my patch,
> is more robust and covers the case of setting the voltage to the hw
> default value.
That sort of thing yes, just short circuit out the main logic in this
case.
Download attachment "signature.asc" of type "application/pgp-signature" (837 bytes)
Powered by blists - more mailing lists