All of lore.kernel.org
 help / color / mirror / Atom feed
From: Andy Shevchenko <andy.shevchenko@gmail.com>
To: Linus Walleij <linus.walleij@linaro.org>
Cc: "open list:GPIO SUBSYSTEM" <linux-gpio@vger.kernel.org>,
	Bartosz Golaszewski <bgolaszewski@baylibre.com>,
	Geert Uytterhoeven <geert+renesas@glider.be>,
	Johan Hovold <johan@kernel.org>
Subject: Re: [PATCH] gpiolib: Disallow identical line names in the same chip
Date: Sun, 13 Dec 2020 17:00:29 +0200	[thread overview]
Message-ID: <CAHp75VfqhXmw=eFsJuUOb9-6GsvLUEW00ivQfe6TNSmWzLD2+A@mail.gmail.com> (raw)
In-Reply-To: <20201212003447.238474-1-linus.walleij@linaro.org>

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.

...

> +                               return -EINVAL;

> +                               return -EINVAL;

A nit: -EEXIST ?

-- 
With Best Regards,
Andy Shevchenko

  parent reply	other threads:[~2020-12-13 15:01 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 [this message]
2020-12-14  8:45   ` Bartosz Golaszewski
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='CAHp75VfqhXmw=eFsJuUOb9-6GsvLUEW00ivQfe6TNSmWzLD2+A@mail.gmail.com' \
    --to=andy.shevchenko@gmail.com \
    --cc=bgolaszewski@baylibre.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.