[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAMuHMdUGGcjoX8TDDS5qGLtJZxizUK=BpasSQK3t1K-dhEgZCg@mail.gmail.com>
Date: Mon, 6 Jan 2020 09:23:08 +0100
From: Geert Uytterhoeven <geert@...ux-m68k.org>
To: Linus Walleij <linus.walleij@...aro.org>
Cc: Geert Uytterhoeven <geert+renesas@...der.be>,
Bartosz Golaszewski <bgolaszewski@...libre.com>,
Jonathan Corbet <corbet@....net>,
Rob Herring <robh+dt@...nel.org>,
Mark Rutland <mark.rutland@....com>,
Harish Jenny K N <harish_kandiga@...tor.com>,
Eugeniu Rosca <erosca@...adit-jv.com>,
Alexander Graf <graf@...zon.com>,
Peter Maydell <peter.maydell@...aro.org>,
Paolo Bonzini <pbonzini@...hat.com>,
Phil Reid <preid@...ctromag.com.au>,
Marc Zyngier <marc.zyngier@....com>,
Christoffer Dall <christoffer.dall@....com>,
Magnus Damm <magnus.damm@...il.com>,
"open list:GPIO SUBSYSTEM" <linux-gpio@...r.kernel.org>,
Linux Doc Mailing List <linux-doc@...r.kernel.org>,
"open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS"
<devicetree@...r.kernel.org>,
Linux-Renesas <linux-renesas-soc@...r.kernel.org>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
QEMU Developers <qemu-devel@...gnu.org>
Subject: Re: [PATCH v3 5/7] gpio: Add GPIO Aggregator/Repeater driver
Hi Linus,
On Sat, Jan 4, 2020 at 1:38 AM Linus Walleij <linus.walleij@...aro.org> wrote:
> Sorry for slowness... christmas.
Np. Happy New Year!
> On Thu, Dec 12, 2019 at 4:24 PM Geert Uytterhoeven <geert@...ux-m68k.org> wrote:
> > On Thu, Dec 12, 2019 at 3:34 PM Linus Walleij <linus.walleij@...aro.org> wrote:
> > > > + This can serve the following purposes:
> > > > + 1. Assign a collection of GPIOs to a user, or export them to a
> > > > + virtual machine,
> > >
> > > This is ambiguous. What is a "user"? A process calling from
> > > userspace? A device tree node?
> >
> > A user is an entity with a UID, typically listed in /etc/passwd.
> > This is similar to letting some, not all, people on the machine access
> > the CD-ROM drive.
>
> Ah I get it. Maybe we can say "assign permissions for a collection
> of GPIOs to a user".
OK
> > > I would write "assign a collection of GPIO lines from any lines on
> > > existing physical GPIO chips to form a new virtual GPIO chip"
> > >
> > > That should be to the point, right?
> >
> > Yes, that's WHAT it does. The WHY is the granular access control.
>
> So I guess we can write both?
OK.
> > > > + 3. Provide a generic driver for a GPIO-operated device, to be
> > > > + controlled from userspace using the GPIO chardev interface.
> > >
> > > I don't understand this, it needs to be elaborated. What is meant
> > > by a "GPIO-operated device" in this context? Example?
> >
> > E.g. a motor. Or a door opener.
> >
> > door-opener {
> > compatible = "mydoor,opener";
> >
> > gpios = <&gpio2 19 GPIO_ACTIVE_HIGH>;
> > };
> >
> > You don't need a full-featured kernel driver for that, so just bind the
> > gpio-aggregator to the door-opener, and control it through libgpiod.
>
> Yep it's a perfect industrial control example, I get it.
>
> Maybe we should blurb something about industrial control?
OK.
> The rest I think we cleared out else I will see it when I review again.
The remaining discussion point is "GPIO Repeater in Device Tree", i.e.
the GPIO inverter usecase, which might be solved better by adding a
GPIO_INVERTED flag.
Shall I rip that out, incorporate review comments, and report?
Thanks!
--
Gr{oetje,eeting}s,
Geert
--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@...ux-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
Powered by blists - more mailing lists