Thread (8 messages) 8 messages, 5 authors, 2023-04-13

Re: [PATCH] gpio: aggregator: Add interrupt support

From: Geert Uytterhoeven <geert@linux-m68k.org>
Date: 2021-10-05 06:53:13
Also in: linux-renesas-soc, lkml, virtualization

Hi Viresh,

On Tue, Oct 5, 2021 at 7:50 AM Viresh Kumar [off-list ref] wrote:
On 04-10-21, 14:44, Geert Uytterhoeven wrote:
quoted
Currently the GPIO Aggregator does not support interrupts.  This means
that kernel drivers going from a GPIO to an IRQ using gpiod_to_irq(),
and userspace applications using line events do not work.

Add interrupt support by providing a gpio_chip.to_irq() callback, which
just calls into the parent GPIO controller.

Note that this does not implement full interrupt controller (irq_chip)
support, so using e.g. gpio-keys with "interrupts" instead of "gpios"
still does not work.
Thanks for looking into this. I am not sure of the difference it makes
with and without full irq-chip, but lemme explain the use case that we
are concerned about with virtio.

Eventually the interrupt should be visible to userspace, with
something like libgpiod. Which can then send the information over
virtio to the guest.
Exactly, that was what I had in mind, too.
Will the interrupts be visible in userspace with your patch ?
Yes they are.
Before, gpiomon (test app from libgpiod) didn't work, now it does.

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
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help