Re: [PATCH] regulator: core: Fix the init of DT defined fixed regulators

From: Alban Bedel
Date: Mon May 19 2014 - 11:26:08 EST


On Mon, 19 May 2014 15:39:49 +0100
Mark Brown <broonie@xxxxxxxxxx> wrote:

> On Mon, May 19, 2014 at 01:12:34PM +0200, Alban Bedel wrote:
>
> > When a regulator is defined using DT and it has a single voltage the
> > regulator init always tries to apply this voltage. However this fails
> > if the regulator isn't settable. So skip this step if the regulator
> > doesn't provides any set method.
>
> No, this means we'll just ignore the voltage someone tried to set. A
> bigger question is why someone is trying to configure the voltage of a
> fixed voltage regulator in DT...

We have a platform where a TPS658621 has been replaced by a TPS658640
in newer version of the hardware. One of the few difference between both
regulator is that one output is now fixed. One could write a new DT that
doesn't "set" this output. But IMHO the current DT should still be usable
as the voltage declared for the now fixed regulator is still correct.

Would checking that the regulator is at the voltage declared in the DT
better? Or should I just add a pseudo set method to the regulator driver
that only accept the current voltage? That could also be implemented at
the core level using a default method for all regulators that have a get
but no set method.

Alban

Attachment: signature.asc
Description: PGP signature