Re: [PATCH] regulator: fixed: Default enable high on DT regulators

From: Mark Brown
Date: Thu Oct 04 2018 - 06:20:20 EST


On Wed, Oct 03, 2018 at 06:08:09PM +0000, Leonard Crestez wrote:
> On Wed, 2018-10-03 at 13:10 +0100, Mark Brown wrote:

> > No, that's definitely not desired. We don't want to change the state of
> > the regulator at all if we can avoid it unless the user explicitly asked
> > for it.

> That also makes sense, for a top level perspective. But
> reg_fixed_voltage_probe contains the following snippet:

...

> In theory it might be possible to request the GPIO while asking to keep
> the value from the bootloader? Maybe I'm confused but I don't see an
> easy way to do this through the GPIO api; functions for requesting in
> output mode all seem to also ask for the initial value.

There isn't one. You're not supposed to read back an output GPIO at all
unfortunately, it makes this sort of handover stuff a problem.

> GPIOD_ASIS looks close but it doesn't even adjust the direction.

That's new - it's probably closest to what we want but we need to be
able to read back the state as well and will want to make it output if
it isn't already.

Attachment: signature.asc
Description: PGP signature