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

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

 



On Sun, Dec 13, 2020 at 4:00 PM Andy Shevchenko
<andy.shevchenko@xxxxxxxxx> wrote:
>
> On Sun, Dec 13, 2020 at 3:56 PM Linus Walleij <linus.walleij@xxxxxxxxxx> wrote:
> >
> > We need to make this namespace hierarchical: at least do not
> > allow two lines on the same chip to have the same name, this
> > is just too much flexibility. If we name a line on a chip,
> > name it uniquely on that chip.
> >
> > I don't know what happens if we just apply this, I *hope* there
> > are not a lot of systems out there breaking this simple and
> > intuitive rule.
> >
> > As a side effect, this makes the device tree naming code
> > scream a bit if names are not globally unique.
> >
> > I think there are not super-many device trees out there naming
> > their lines so let's fix this before the problem becomes
> > widespread.
>
> I think it is a right direction but the name space should be attached
> to the GPIO chip, globally it may be several GPIO chips on some boards
> which are doing the same thing semantically. So, the compound of
> gpiochipN:name should be unique globally.

I too like the idea of having the line names unique per chip. It'll
also make things easier for libgpiod.

Bartosz

>
> ...
>
> > +                               return -EINVAL;
>
> > +                               return -EINVAL;
>
> A nit: -EEXIST ?
>
> --
> 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