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. ... > + return -EINVAL; > + return -EINVAL; A nit: -EEXIST ? -- With Best Regards, Andy Shevchenko