All of lore.kernel.org
 help / color / mirror / Atom feed
From: Geert Uytterhoeven <geert@linux-m68k.org>
To: Linus Walleij <linus.walleij@linaro.org>
Cc: Rodolfo Giometti <giometti@enneenne.com>,
	Geert Uytterhoeven <geert+renesas@glider.be>,
	"open list:GPIO SUBSYSTEM" <linux-gpio@vger.kernel.org>,
	Bartosz Golaszewski <bgolaszewski@baylibre.com>
Subject: Re: [RFC] GPIO User I/O
Date: Mon, 6 Jul 2020 23:00:48 +0200	[thread overview]
Message-ID: <CAMuHMdUtguuu4FWU4nRS=pBUyEwKM1JZ8DYPdCQHXBYN0i_Frg@mail.gmail.com> (raw)
In-Reply-To: <CACRpkdZPjJSryJc+RtYjRN=X7xKMcao5pYek1fUM2+sE9xgdFQ@mail.gmail.com>

On Mon, Jul 6, 2020 at 10:38 PM Linus Walleij <linus.walleij@linaro.org> wrote:
> On Mon, Jul 6, 2020 at 5:33 PM Rodolfo Giometti <giometti@enneenne.com> wrote:
> > > With Geert's GPIO aggregator userspace and device tree can conjure
> > > special per-usecase gpio chips as pointed out by Drew: this is
> > > very useful when you want some kernel-managed yet
> > > usecase-specific GPIO lines in a special "container" chip.
> > > To me this is the best of two worlds. (Kernelspace and userspace.)
> >
> > Maybe this is the "best of two worlds" as you say but the problem is that board
> > manufactures need a way to well-define how a GPIO line must be used for within
> > the device-tree and without the need of patches! In this point of view neither
> > the "driver_override" way nor adding a compatible value to
> > gpio_aggregator_dt_ids[] can help (this last solution requires a patch for each
> > board!). That's why at the moment they prefer not specify these GPIO lines at
> > all or (improperly) use the gpio-leds and gpio-uinput interfaces to keep it
> > simple...
>
> I think the idea is to add a very generic DT compatible to the
> gpio_aggregator_dt_ids[]. That way, any DT can use the aggregator
> to create a new chip with named lines etc.
>
> But Geert can speak of that.

The idea is to describe the real device in DT, and add it's compatible value
to gpio_aggregator_dt_ids[], or enable support for it dynamically using
driver_override.
The former indeed requires modifying the driver.
Note that if you ever want to write a pure kernelspace driver, you do need
a proper compatible value anyway.

I do agree that it's annoying to have "gpio-leds", but not "gpio-motors"
or "gpio-relays".  However, you can always propose bindings for the
latter, and, when they have been accepted, add those compatible
values to upstream gpio_aggregator_dt_ids[].

Gr{oetje,eeting}s,

                        Geert


--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org

In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
                                -- Linus Torvalds

  reply	other threads:[~2020-07-06 21:01 UTC|newest]

Thread overview: 28+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-07-06 12:19 [RFC] GPIO User I/O Rodolfo Giometti
2020-07-06 13:35 ` Drew Fustini
2020-07-06 18:19   ` Rodolfo Giometti
2020-07-06 13:43 ` Linus Walleij
2020-07-06 15:33   ` Rodolfo Giometti
2020-07-06 20:38     ` Linus Walleij
2020-07-06 21:00       ` Geert Uytterhoeven [this message]
2020-07-07  7:17         ` Rodolfo Giometti
2020-07-07  7:41           ` Geert Uytterhoeven
2020-07-07  9:56             ` Rodolfo Giometti
2020-07-09 14:11               ` [RFC] GPIO lines [was: GPIO User I/O] Rodolfo Giometti
2020-07-11 15:21                 ` Linus Walleij
2020-07-13 14:20                   ` Rodolfo Giometti
2020-07-13 21:26                     ` Linus Walleij
2020-07-14 14:01                       ` [RFC v2 " Rodolfo Giometti
2020-07-16 13:38                         ` Linus Walleij
2020-07-16 15:15                           ` Rodolfo Giometti
2020-07-19 18:35                             ` Andy Shevchenko
2020-07-20  7:38                               ` Rodolfo Giometti
2020-07-20  8:17                               ` Linus Walleij
2021-04-26  8:44                                 ` Rodolfo Giometti
2021-04-26  8:48                                   ` Andy Shevchenko
2021-04-26  9:16                                     ` Rodolfo Giometti
2021-04-26  9:31                                   ` Linus Walleij
2021-04-26  9:43                                     ` Rodolfo Giometti
2021-04-26 10:12                                       ` Linus Walleij
2021-04-26 11:20                                         ` Rodolfo Giometti
     [not found]           ` <CAEf4M_C5ztHoiu4uGiiqxLF7uW6wbyxdg43cs=YgArszMfbXcw@mail.gmail.com>
2020-07-07  8:47             ` [RFC] GPIO User I/O 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='CAMuHMdUtguuu4FWU4nRS=pBUyEwKM1JZ8DYPdCQHXBYN0i_Frg@mail.gmail.com' \
    --to=geert@linux-m68k.org \
    --cc=bgolaszewski@baylibre.com \
    --cc=geert+renesas@glider.be \
    --cc=giometti@enneenne.com \
    --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.