Re: [PATCH] regulator: fixed: Use more standard GPIO binding

From: Linus Walleij
Date: Sun Oct 07 2018 - 17:01:10 EST


On Fri, Oct 5, 2018 at 10:17 PM Rob Herring <robh@xxxxxxxxxx> wrote:

> BTW, 'enable-active-high' is also a bit strange as that should just be
> encoded into 'enable-gpio' flags. We should really deprecate that.

I have been struggling with this (and similar flags in other subsystems)
and the current plan is to contain them in current state, but push them
into the gpiolib-of.c to get it out of the respective subsystem.

The problem is that is "enable-active-high" is negative: if it is NOT
present the line is assumes to active low, which is NOT the case
for normal GPIOs (flag zero means active high).

Therefore the binding becomes ambigous: if the "enable-active-high"
is NOT present, and the gpio flag says it is active high, right
now it should result in active low behavior, and we have no way
of telling if a certain device tree want modern semantics instead,
specifying active high in the flag.

Hmmm...

We COULD enforce normal behaviour on a NEW property
"enable-gpios" though.

Let me think about that. That should be a clean migration path.

Yours,
Linus Walleij