Re: [PATCH v5 00/20] gpio: cdev: add uAPI v2

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Thu, Sep 10, 2020 at 4:09 PM Andy Shevchenko
<andriy.shevchenko@xxxxxxxxxxxxxxx> wrote:
>
> On Tue, Sep 01, 2020 at 11:28:13AM +0200, Bartosz Golaszewski wrote:
> > On Sat, Aug 29, 2020 at 3:35 AM Kent Gibson <warthog618@xxxxxxxxx> wrote:
> > >
> > > On Fri, Aug 28, 2020 at 04:37:19PM +0200, Linus Walleij wrote:
> > > > On Fri, Aug 28, 2020 at 12:47 AM Kent Gibson <warthog618@xxxxxxxxx> wrote:
> > > >
> > > > > The particular use case I am considering is one I had been asked about -
> > > > > changing a requested line from input with edge detection to output, and
> > > > > vice versa. Losing interrupts isn't really an issue for this use case -
> > > > > it is expected.  Yet the current implementation requires a re-request.
> > > >
> > > > This is possible to do for in-kernel users, but I don't know if that makes
> > > > sense for userspace. It is for one-offs and prototyping after all, there
> > > > is no need (IMO) to make it overly convenient for users to implement
> > > > all kind of weirdness in userspace unless there is a very real use case.
> > > >
> > >
> > > Fair point - in fact it is the same one that made me reconsider why I
> > > was so concerned about potentially losing an edge event in a few rare
> > > corner cases.
> > >
> > > Another point for this change are that it actually simplifies the kernel
> > > code, as it takes as much code to detect and filter these cases as it
> > > does to include them in the normal flow.
> > >
> > > I had a play with it yesterday and the change removes two whole
> > > functions, gpio_v2_line_config_change_validate() and
> > > gpio_v2_line_config_has_edge_detection() at the expense of making
> > > debounce_update() a little more complicated. I'm happy to put together a
> > > v6 that incorporates those changes if there aren't any strenuous
> > > objections - we can always revert to v5.  Or I could mail the couple of
> > > patches I've made and if they seem reasonable then I could merge them
> > > into this set?
> > >
> > > Cheers,
> > > Kent.
> >
> > I personally like v6 more. The code is more elegant and we've also
> > tried limiting GPIO chardev features before and now we're doing v2 so
> > let's not make the same mistake twice. :)
> >
> > I'll try to review v6 in detail later today.
>
> Let me briefly review to this. Can you remind which patch has a top level
> description of what features are provided in comparison to uAPI v1?
> (Btw, do we have some kind of comparison table?)

We are now at v8 for this series. The cover letter contains a lot of
info and patch 4/20 defining the uAPI header explains v2 even more. I
think these are the most important parts. Any implementation details
can be fixed later as opposed to the API itself.

Bart



[Index of Archives]     [Linux SPI]     [Linux Kernel]     [Linux ARM (vger)]     [Linux ARM MSM]     [Linux Omap]     [Linux Arm]     [Linux Tegra]     [Fedora ARM]     [Linux for Samsung SOC]     [eCos]     [Linux Fastboot]     [Gcc Help]     [Git]     [DCCP]     [IETF Announce]     [Security]     [Linux MIPS]     [Yosemite Campsites]

  Powered by Linux