Re: [PATCH v2 2/2] gpio: use "active" and "inactive" instead of "high" and "low" for output hogs

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

 



Hello Andy,

On Wed, May 31, 2023 at 12:51:34AM +0300, Andy Shevchenko wrote:
> On Tue, May 30, 2023 at 6:19 PM Uwe Kleine-König
> <u.kleine-koenig@xxxxxxxxxxxxxx> wrote:
> >
> > For active-low GPIOs the currently available nomenclature requires
> > regular explaination to the non-enlightened folks, e.g. because a hog
> 
> explanation
> 
> > defined as:
> >
> >         someline {
> >                 gpio-hog;
> >                 gpios = <24 GPIO_ACTIVE_LOW>;
> >                 output-high;
> >         }
> >
> > results in the line being set to the physical low level.
> >
> > So use the terms "active" and "inactive" which are less ambigous and
> 
> ambiguous

Damn, I should configure my editor to enable spell checking
automatically. Thanks.

> > keep the old names as synonyms. The above example can now be written as:
> >
> >         someline {
> >                 gpio-hog;
> >                 gpios = <24 GPIO_ACTIVE_LOW>;
> >                 output-active;
> >         }
> >
> > where it is less surprising that the output is set to a low level.
> 
> As I said before, this does not cover the ACPI case. Consider

I don't understand that concern. Currently there is nothing for ACPI
that parses "output-high" et al. So you want me to introduce support for
hogs defined by ACPI to fix the strange semantic for dt-defined hogs?
What am I missing?

> > +       GPIOD_OUT_LOW_OPEN_DRAIN = GPIOD_OUT_INACTIVE_OPEN_DRAIN,
> > +       GPIOD_OUT_HIGH_OPEN_DRAIN = GPIOD_OUT_ACTIVE_OPEN_DRAIN,
> 
> This one is an interesting case, because depending on the transistor
> polarity this may be active GND or VDD. All the same for OPEN_SOURCE
> which seems not defined (but should be equivalent to the opposite to
> the _DRAIN cases).

This is (also) orthogonal to my change, right?

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