Re: [PATCH 1/4] regulator: core: Support trying to get close to a certain voltage
From: Doug Anderson
Date: Thu Dec 11 2014 - 22:31:49 EST
Mark,
On Thu, Dec 11, 2014 at 4:24 PM, Mark Brown <broonie@xxxxxxxxxx> wrote:
> On Thu, Dec 11, 2014 at 11:55:55AM -0800, Doug Anderson wrote:
>> On Thu, Dec 11, 2014 at 9:09 AM, Mark Brown <broonie@xxxxxxxxxx> wrote:
>
>> > Please also bear in mind the need to handle shared supplies in your
>> > implementation.
>
>> I'm being dense, can you give more details? Do you want me to grab
>> the mutex or do something smarter like track the voltage / tolerance
>> requested by multiple clients and resolve them, or ...?
>
> I mean the latter - what happens if more than one consumer is trying to
> use the regulator? This is IIRC why _set_voltage_tol() uses the cheap
> and nasty implementation it does.
Ah, I see. I don't think I've ever encountered a case where there
were two consumers for a regulator that actually requested voltages...
...but isn't regulator_set_voltage_tol() broken there? If you have
two clients, A and B and a regulator that can go 1.0V to 5.0V in .05V
increments:
A requests 1.8V +/- .1V. We get 1.8V
B requests 1.7V +/- .05V.
The above could be achievable with a voltage of 1.75V but it won't
work with the current regulator_set_voltage_tol() I think.
> There's also the potential
> performance considerations for the DVS type applications now I think
> about it.
Iterating through voltages is really that slow? If so, perhaps we
could add some caching to keep track of what voltage we actually got
last time... I could also add an optimization to try the exact
requested voltage right away...
-Doug
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/