OASIS Mailing List ArchivesView the OASIS mailing list archive below
or browse/search using MarkMail.

 


Help: OASIS Mailing Lists Help | MarkMail Help

virtio-dev message

[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]


Subject: Re: [PATCH V6 2/2] virtio-gpio: Add support for interrupts


On Mon, Jul 26, 2021 at 1:51 PM Viresh Kumar <viresh.kumar@linaro.org> wrote:
> On 26-07-21, 13:10, Arnd Bergmann wrote:
>
> > I would still hope that we can combine the irq_type, mask and request
>
> request ? you wanted to say "unmask" ?

No, I meant VIRTIO_GPIO_MSG_IRQ_TYPE,
VIRTIO_GPIO_MSG_IRQ_{UN,}MASK and virtio_gpio_irq_request messages.

All three can change the state between 'can interrupt' and 'can not interrupt',
so you only get notified if all three are in the active state (irq type != none,
mask disabled, request queued).

> > steps into either one or two steps. I think the minimalistic approach would
> > be to expand the message to include both the "mask" and "set-type"
> > operations, and this should work, as long as we define sensible semantics.
>
> I think we can easily merge unmask and set-type into a single message,
> since that will fit within the request structure used for most of the
> requests on the requestq. i.e. a single byte of data.
>
> mask() doesn't require irq-type, so it can live separately.

The question is whether it adds any value though. As far as I can tell,
it is completely redundant, duplicating either what is implied by
irq type==none, or what is implied by the request not being queued.

> > so an input can be configured as any of the five irq types, with
> > "IRQ_TYPE_NONE" implying that interrupts are disabled for this line.
> > This would still provide an extra way of masking the interrupt, so we just
> > need "set-direction" and "request event". In this case, setting the interrupt
> > type to "none" should probably cancel any pending irq and force the
> > message to be returned.
> >
> > You could actually take that further and fold the "set value" into "set
> > direction",
>
> At least gpio-direction-out already takes a value with it.

Ok.

        Arnd


[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]