Re: [PATCH v2] gpiolib: Disallow identical line names in the same chip

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

 



On Fri, Jan 8, 2021 at 4:04 PM Andy Shevchenko
<andy.shevchenko@xxxxxxxxx> wrote:
>
> On Fri, Jan 8, 2021 at 4:39 PM Flavio Suligoi <f.suligoi@xxxxxxx> wrote:
>
> ...
>
> > > > For example, something like the following:
> > > >
> > > > # gpiofind button_1
> > > > gpiochip0 20
> > > > gpiochip0 22 (duplicate)
> > >
> > > This cannot happen, as the duplicate is on the same gpiochip.
> >
> > Just a question:  I think that a duplicate name can be present
> > both in the same gpiochip
>
> No. This is against common sense. Can you have the same pin numbers on one chip?
>

You're correct logically but technically this definitely can happen.
As the DT examples from qualcomm show: you can have multiple pins
being called "nc" for "not connected". I'm still not sure what
assumptions user-space can make in this case. Should we have a list of
unsupported or illegal names to look up? Sounds sketchy.

Bartosz

> > and also in different gpiochips.
>
> Yes and it's fine.
>
> > The same gpio line name can be wrongly present on different gpiochips,
> > for example caused by a mistake writing an ACPI table.
>
> --
> 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