Re: [PATCH] gpiolib: don't support irq sharing for gpio edge detection

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

 



czw., 13 wrz 2018 o 11:13 Linus Walleij <linus.walleij@xxxxxxxxxx> napisał(a):
>
> On Mon, Aug 20, 2018 at 8:32 AM Uwe Kleine-König
> <u.kleine-koenig@xxxxxxxxxxxxxx> wrote:
>
> > Trying to work out the right event if it's not sure that the examined
> > gpio actually moved is impossible.
>
> I applied the patch with the following reasoning.
>
> 1) Uwe has a usecase and hardware that needs this so he can do
> what he needs to do. I.e. the patch corresponds to a practical need
> of a user.
>
> 2) Only theoretical counter-arguments.
>
> 3) Uwe clarified that it is fine to put IRQ sharing back if/when
> we support level-triggered IRQs from userspace. This makes a
> lot of sense to me.
>
> 4) Rough consensus and running code.
>
> I edited the subject and commit message to reflect that we are talking
> about the userspace events here, not in-kernel users.
>
> Edge triggers are tricky and I feel a bit uncertain about how we handle
> all kinds of electronics out there. I can think about a few design
> mistakes.
>
> At one point I had the feeling level interrupts on GPIO lines are
> completely bogus, but I guess they make some sense for an
> intelligent peripheral (like on I2C) with it own internal status
> register that you then go and handle in a thread.
>

Hi Linus, Uwe,

just FYI - this patch broke existing libgpiod tests in 4.20-rc1.

With this change, if user space requests a line for events of specific
type, let's say rising edge, both falling and rising edge events will
be emitted as rising edge.

Uwe: was this expected? I haven't checked with real HW yet, but it
seems strange.

Best regards,
Bartosz Golaszewski




[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