Re: [PATCH v2 2/2] irqchip: al-fic: Introduce Amazon's Annapurna Labs Fabric Interrupt Controller Driver

From: Benjamin Herrenschmidt
Date: Wed Jun 05 2019 - 18:06:49 EST


On Wed, 2019-06-05 at 13:22 +0100, Marc Zyngier wrote:
>
> > + * This is generally fixed depending on what pieces of HW it's wired up
> > + * to.
> > + *
> > + * We configure it based on the sensitivity of the first source
> > + * being setup, and reject any subsequent attempt at configuring it in a
> > + * different way.
>
> Is that a reliable guess? It also strikes me that the DT binding doesn't
> allow for the trigger type to be passed, meaning the individual drivers
> have to request the trigger as part of their request_irq() call. I'd
> rather you have a complete interrupt specifier in DT, and document the
> various limitations of the HW.

Actually the DT does, but Talel forgot to update the "example" part of
the binding patch. The description does say 2 cells.

This is the best approach imho (translation: I asked Talel to do it
this way :-) The other option which I don't like is to stick to
#interrupt-cells = 1, and have a separate property in the interrupt
controller node to indicate whether it needs to be configured as level
or edge.

These FICs are used for what is generally fixed wires inside the SoC,
so it doesn't matter much either way, but I prefer having it self
configured based on source just in case a future implementation doesn't
have the limitation of all inputs having the same trigger type.

Cheers,
Ben.