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]

 



On Wed, May 31, 2023 at 9:58 AM Uwe Kleine-König
<u.kleine-koenig@xxxxxxxxxxxxxx> wrote:
> 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:

...

> > 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.

This is not true.

> 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?

https://elixir.bootlin.com/linux/v6.4-rc4/source/drivers/gpio/gpiolib-acpi.c#L1262

...

> > > +       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?

Maybe yes, maybe no. Depends on what we want with this semantics
regarding OS/OD/OC/OE.
Strictly speaking all four should be defined. But it brings a lot of
duplication. I dunno.

-- 
With Best Regards,
Andy Shevchenko




[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