linux-gpio.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Bartosz Golaszewski <bgolaszewski@baylibre.com>
To: Andy Shevchenko <andy.shevchenko@gmail.com>
Cc: Flavio Suligoi <f.suligoi@asem.it>,
	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 v2] gpiolib: Disallow identical line names in the same chip
Date: Wed, 6 Jan 2021 15:25:43 +0100	[thread overview]
Message-ID: <CAMpxmJUZqFtsFo=fZ6F+fcy3mvY10s0=mo3_Z5cx=6H5qcpUxA@mail.gmail.com> (raw)
In-Reply-To: <CAHp75VcVN5Af3t-OYdO9MOXk14LV+zYQtusqft8twi_u83yZ6g@mail.gmail.com>

On Wed, Jan 6, 2021 at 2:34 PM Andy Shevchenko
<andy.shevchenko@gmail.com> wrote:
>
> On Wed, Jan 6, 2021 at 12:09 PM Bartosz Golaszewski
> <bgolaszewski@baylibre.com> wrote:
> > On Wed, Jan 6, 2021 at 12:24 AM Linus Walleij <linus.walleij@linaro.org> wrote:
> > > On Tue, Jan 5, 2021 at 6:28 PM Andy Shevchenko
> > > <andy.shevchenko@gmail.com> wrote:
> > > > On Tue, Jan 5, 2021 at 10:31 AM 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.
> > > > >
> > > > > This does not affect device tree and other gpiochips that
> > > > > get named from device properties: the uniqueness
> > > > > per-chip however affect all hotplugged devices such as
> > > > > GPIO expanders on USB.
> > > >
> > > > ...
> > > >
> > > > > [Dropped warning for globally unique]
> > > >
> > > > > + * - Allow names to not be globally unique but warn about it.
> > > >
> > > > Is the second part of this sentence still ture?
> > > > Maybe I missed a warning we are talking about here?
> > >
> > > Oops old text, Bartosz if this looks OK otherwise can you fix
> > > this when applying? (Just delete that line.)
>
> > I can do it alright. But in the context of user-space I think this
> > doesn't really change anything. DT users still can use non-unique
> > names and libgpiod still has to account for that if the API is to be
> > considered correct. Is this change really useful?
>
> IMHO it is useful and the earliest we do the better.
>

I'm wondering if user-space should make this assumption too then. That
a non-unique name is either an error or signifies some special value
(N/A).

> > How does it affect
> > ACPI users that already define non-unique names?
>
> I suppose that in ACPI we don't have many users that do it on their
> own (for IoT Intel platforms GPIO expanders have unique names).
> Also see above. I prefer to have a bug report with a clear source of
> the issue (like a table that the user can't / won't change which
> predates the date of kernel release with a patch.
>
> +cc: to the user who lately was active in the area.
>
> Flavio, perhaps one more rule to the gpio-line-names property has to
> be added into documentation (Bart, same to DT docs?):
>  - names inside one chip must be unique
>

Once we have a proper, core yaml binding for all GPIO devices, we'll
be able to even enforce it if we agree on a set of exceptions.

Bart

  reply	other threads:[~2021-01-06 14:26 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-01-05  8:27 [PATCH v2] gpiolib: Disallow identical line names in the same chip Linus Walleij
2021-01-05 17:29 ` Andy Shevchenko
2021-01-05 23:23   ` Linus Walleij
2021-01-06 10:09     ` Bartosz Golaszewski
2021-01-06 13:34       ` Andy Shevchenko
2021-01-06 14:25         ` Bartosz Golaszewski [this message]
2021-01-06 16:14           ` Andy Shevchenko
2021-01-07 10:03         ` R: " Flavio Suligoi
2021-01-07 10:12           ` Andy Shevchenko
2021-01-07 13:12             ` R: " Flavio Suligoi
2021-01-08 10:40         ` Flavio Suligoi
2021-01-08 15:03           ` Andy Shevchenko
2021-01-07 10:45       ` Linus Walleij
2021-01-07 13:49         ` R: " Flavio Suligoi
2021-01-07 13:55           ` Geert Uytterhoeven
2021-01-08 14:39             ` R: " Flavio Suligoi
2021-01-08 14:41               ` Geert Uytterhoeven
2021-01-08 14:43                 ` R: " Flavio Suligoi
2021-01-08 15:05               ` Andy Shevchenko
2021-01-15 14:30                 ` Bartosz Golaszewski
     [not found]                   ` <CAHp75Vd017YY8HU-Ai7jnQEJ4PEgiU4VXn-jhLBKwERmsG_5MA@mail.gmail.com>
2021-01-15 17:31                     ` 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='CAMpxmJUZqFtsFo=fZ6F+fcy3mvY10s0=mo3_Z5cx=6H5qcpUxA@mail.gmail.com' \
    --to=bgolaszewski@baylibre.com \
    --cc=andy.shevchenko@gmail.com \
    --cc=f.suligoi@asem.it \
    --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).