lkml.org 
[lkml]   [2020]   [Dec]   [8]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    From
    Date
    SubjectRe: Howto listen to/handle gpio state changes ? Re: [PATCH v2 2/2] drivers: gpio: add virtio-gpio guest driver
    On Sat, Dec 5, 2020 at 9:15 PM Enrico Weigelt, metux IT consult
    <lkml@metux.net> 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 IRQ range and calling generic_handle_irq(),
    > but then I'm getting unhanled IRQ trap.

    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:
    include/linux/irq_sim.h

    This is intended for simulating IRQs and both GPIO and IIO use it.
    I think this inserts IRQs from debugfs and I have no idea how
    flexible that is.

    If it is suitable for what you want to do I don't know but it's
    virtio so...

    Yours,
    Linus Walleij

    \
     
     \ /
      Last update: 2020-12-08 10:42    [W:4.243 / U:0.136 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site