From: Bartosz Golaszewski <bgolaszewski@baylibre.com>
To: Andy Shevchenko <andy.shevchenko@gmail.com>
Cc: Linus Walleij <linus.walleij@linaro.org>,
"open list:GPIO SUBSYSTEM" <linux-gpio@vger.kernel.org>,
Geert Uytterhoeven <geert+renesas@glider.be>,
Johan Hovold <johan@kernel.org>
Subject: Re: [PATCH] gpiolib: Disallow identical line names in the same chip
Date: Mon, 14 Dec 2020 09:45:24 +0100 [thread overview]
Message-ID: <CAMpxmJW8kOfsCMDS3hUXUu-XRHFeXU2UnDXvJWsEy3EVvBMszg@mail.gmail.com> (raw)
In-Reply-To: <CAHp75VfqhXmw=eFsJuUOb9-6GsvLUEW00ivQfe6TNSmWzLD2+A@mail.gmail.com>
On Sun, Dec 13, 2020 at 4:00 PM Andy Shevchenko
<andy.shevchenko@gmail.com> wrote:
>
> On Sun, Dec 13, 2020 at 3:56 PM Linus Walleij <linus.walleij@linaro.org> 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
next prev parent reply other threads:[~2020-12-14 8:46 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-12-12 0:34 [PATCH] gpiolib: Disallow identical line names in the same chip Linus Walleij
2020-12-12 9:23 ` Geert Uytterhoeven
2020-12-12 12:51 ` Linus Walleij
2020-12-14 9:23 ` Johan Hovold
2020-12-13 15:00 ` Andy Shevchenko
2020-12-14 8:45 ` Bartosz Golaszewski [this message]
2020-12-14 9:17 ` Linus Walleij
2020-12-14 9:29 ` Johan Hovold
2020-12-14 22:39 ` Linus Walleij
2020-12-15 8:24 ` Geert Uytterhoeven
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=CAMpxmJW8kOfsCMDS3hUXUu-XRHFeXU2UnDXvJWsEy3EVvBMszg@mail.gmail.com \
--to=bgolaszewski@baylibre.com \
--cc=andy.shevchenko@gmail.com \
--cc=geert+renesas@glider.be \
--cc=johan@kernel.org \
--cc=linus.walleij@linaro.org \
--cc=linux-gpio@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).