Re: [PATCH v2 1/2] dt-bindings: gpio: introduce hog properties with less ambiguity

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed, May 31, 2023 at 08:18:14AM +0200, Alexander Stein wrote:
> Hi,
> 
> Am Dienstag, 30. Mai 2023, 17:19:45 CEST schrieb Uwe Kleine-König:
> > For active low lines the semantic of output-low and output-high is hard
> > to grasp because there is a double negation involved and so output-low
> > is actually a request to drive the line high (aka inactive).
> > 
> > So introduce output-inactive and output-active with the same semantic as
> > output-low and output-high respectively have today, but with a more
> > sensible name.
> > 
> > Signed-off-by: Uwe Kleine-König <u.kleine-koenig@xxxxxxxxxxxxxx>
> > ---
> >  Documentation/devicetree/bindings/gpio/gpio.txt | 16 +++++++++++-----
> >  1 file changed, 11 insertions(+), 5 deletions(-)
> > 
> > diff --git a/Documentation/devicetree/bindings/gpio/gpio.txt
> > b/Documentation/devicetree/bindings/gpio/gpio.txt index
> > d82c32217fff..2f037bbd3ffa 100644
> > --- a/Documentation/devicetree/bindings/gpio/gpio.txt
> > +++ b/Documentation/devicetree/bindings/gpio/gpio.txt
> > @@ -209,15 +209,21 @@ Required properties:
> >  - gpios:      Store the GPIO information (id, flags, ...) for each GPIO to
> >  	      affect. Shall contain an integer multiple of the number of 
> cells
> >  	      specified in its parent node (GPIO controller node).
> > +
> >  Only one of the following properties scanned in the order shown below.
> >  This means that when multiple properties are present they will be searched
> >  in the order presented below and the first match is taken as the intended
> >  configuration.
> > -- input:      A property specifying to set the GPIO direction as input.
> > -- output-low  A property specifying to set the GPIO direction as output
> > with -	      the value low.
> > -- output-high A property specifying to set the GPIO direction as output
> > with -	      the value high.
> > +- input:             A property specifying to set the GPIO direction as
> > input. +- output-inactive:   A property specifying to set the GPIO
> > direction as output +		     with the inactive value 
> (depending on the
> > line's polarity, +		     which is active-high by default)
> > +- output-active:     A property specifying to set the GPIO direction as
> > output +		     with the active value.
> 
> I know this is essentially just renaming currently existing properties.
> But these mutual exclusive (boolean) properties make it impossible to change 
> them in DT overlay. Any ideas how to support changing the output level onGPIO 
> hogs in DT overlay?

The universal way to address this would be to make it possible in dtbos
to delete properties (and nodes).

Best regards
Uwe

-- 
Pengutronix e.K.                           | Uwe Kleine-König            |
Industrial Linux Solutions                 | https://www.pengutronix.de/ |

Attachment: signature.asc
Description: PGP signature


[Index of Archives]     [Linux SPI]     [Linux Kernel]     [Linux ARM (vger)]     [Linux ARM MSM]     [Linux Omap]     [Linux Arm]     [Linux Tegra]     [Fedora ARM]     [Linux for Samsung SOC]     [eCos]     [Linux Fastboot]     [Gcc Help]     [Git]     [DCCP]     [IETF Announce]     [Security]     [Linux MIPS]     [Yosemite Campsites]

  Powered by Linux