Re: Howto listen to/handle gpio state changes ? Re: [PATCH v2 2/2] drivers: gpio: add virtio-gpio guest driver

2020-12-10 Thread Grygorii Strashko
On 09/12/2020 22:38, Arnd Bergmann wrote: On Wed, Dec 9, 2020 at 9:22 PM Grygorii Strashko wrote: On 09/12/2020 14:53, Linus Walleij wrote: On Wed, Dec 9, 2020 at 12:19 PM Arnd Bergmann wrote: On Wed, Dec 9, 2020 at 9:51 AM Linus Walleij wrote: On Tue, Dec 8, 2020 at 3:07 PM Enrico

Re: Howto listen to/handle gpio state changes ? Re: [PATCH v2 2/2] drivers: gpio: add virtio-gpio guest driver

2020-12-09 Thread Arnd Bergmann
On Wed, Dec 9, 2020 at 9:22 PM Grygorii Strashko wrote: > On 09/12/2020 14:53, Linus Walleij wrote: > > On Wed, Dec 9, 2020 at 12:19 PM Arnd Bergmann wrote: > >> On Wed, Dec 9, 2020 at 9:51 AM Linus Walleij > >> wrote: > >>> On Tue, Dec 8, 2020 at 3:07 PM Enrico Weigelt, metux IT consult >

Re: Howto listen to/handle gpio state changes ? Re: [PATCH v2 2/2] drivers: gpio: add virtio-gpio guest driver

2020-12-09 Thread Grygorii Strashko
On 09/12/2020 14:53, Linus Walleij wrote: On Wed, Dec 9, 2020 at 12:19 PM Arnd Bergmann wrote: On Wed, Dec 9, 2020 at 9:51 AM Linus Walleij wrote: On Tue, Dec 8, 2020 at 3:07 PM Enrico Weigelt, metux IT consult wrote: What we need to understand is if your new usecase is an outlier so

Re: Howto listen to/handle gpio state changes ? Re: [PATCH v2 2/2] drivers: gpio: add virtio-gpio guest driver

2020-12-09 Thread Linus Walleij
On Wed, Dec 9, 2020 at 12:19 PM Arnd Bergmann wrote: > On Wed, Dec 9, 2020 at 9:51 AM Linus Walleij wrote: > > On Tue, Dec 8, 2020 at 3:07 PM Enrico Weigelt, metux IT consult > > wrote: > > > What we need to understand is if your new usecase is an outlier > > so it is simplest modeled by a

Re: Howto listen to/handle gpio state changes ? Re: [PATCH v2 2/2] drivers: gpio: add virtio-gpio guest driver

2020-12-09 Thread Arnd Bergmann
On Wed, Dec 9, 2020 at 9:51 AM Linus Walleij wrote: > On Tue, Dec 8, 2020 at 3:07 PM Enrico Weigelt, metux IT consult > wrote: > What we need to understand is if your new usecase is an outlier > so it is simplest modeled by a "mock" irq_chip or we have to design > something new altogether like

Re: Howto listen to/handle gpio state changes ? Re: [PATCH v2 2/2] drivers: gpio: add virtio-gpio guest driver

2020-12-09 Thread Linus Walleij
On Tue, Dec 8, 2020 at 3:07 PM Enrico Weigelt, metux IT consult wrote: > I've been looking for some more direct notification callback for gpio > consumers: here the consumer would register itself as a listener on > some gpio_desc and called back when something changes (with data what > exactly

Re: Howto listen to/handle gpio state changes ? Re: [PATCH v2 2/2] drivers: gpio: add virtio-gpio guest driver

2020-12-08 Thread Grygorii Strashko
On 08/12/2020 16:04, Enrico Weigelt, metux IT consult wrote: On 08.12.20 10:38, Linus Walleij wrote: Hi, This is Bartosz territory, but the gpio-mockup.c driver will insert IRQs into the system, he went and added really core stuff into kernel/irq to make this happen. Notice that in Kconfig

Re: Howto listen to/handle gpio state changes ? Re: [PATCH v2 2/2] drivers: gpio: add virtio-gpio guest driver

2020-12-08 Thread Enrico Weigelt, metux IT consult
On 08.12.20 10:38, Linus Walleij wrote: Hi, > This is Bartosz territory, but the gpio-mockup.c driver will insert > IRQs into the system, he went and added really core stuff > into kernel/irq to make this happen. Notice that in Kconfig > it does: > > select IRQ_SIM > > Then this is used: >

Re: Howto listen to/handle gpio state changes ? Re: [PATCH v2 2/2] drivers: gpio: add virtio-gpio guest driver

2020-12-08 Thread Linus Walleij
On Sat, Dec 5, 2020 at 9:15 PM Enrico Weigelt, metux IT consult wrote: > The virtio-gpio device/host can raise a signal on line state change. > Kinda IRQ, but not actually running through real IRQs, instead by a > message running though queue. (hmm, kida MSI ? :o). > > I've tried allocating an

Howto listen to/handle gpio state changes ? Re: [PATCH v2 2/2] drivers: gpio: add virtio-gpio guest driver

2020-12-05 Thread Enrico Weigelt, metux IT consult
On 03.12.20 20:11, Enrico Weigelt, metux IT consult wrote: Friends, I've still got a problem w/ signal/irq handling: The virtio-gpio device/host can raise a signal on line state change. Kinda IRQ, but not actually running through real IRQs, instead by a message running though queue. (hmm, kida