Re: [PATCH V2] media: i2c: Add ADV761X support

Laurent Pinchart
2013-11-27T17:22:40Z

On Wednesday 27 November 2013 15:50:18 Lars-Peter Clausen wrote:
> On 11/27/2013 01:14 PM, Hans Verkuil wrote:
> [...]
>
> >>> For our systems the adv7604 interrupts is not always hooked up to a gpio
> >>> irq, instead a register has to be read to figure out which device
> >>> actually produced the irq.
> >>
> >> Where is that register located ? Shouldn't it be modeled as an interrupt
> >> controller ?
> >
> > It's a PCIe interrupt whose handler needs to read several FPGA registers
> > in order to figure out which interrupt was actually triggered. I don't
> > know enough about interrupt controller to understand whether it can be
> > modeled as a 'standard' interrupt.
>
> This sounds as if it should be implemented as a irq_chip driver. There are a
> couple of examples in drivers/irqchip/

Exactly, that was my point. A piece of hardware that takes several interrupt
inputs, includes mask and flag registers and generate a single interrupt
towards the system is an interrupt controller and should have be handled by
the Linux irqchip infrastructure.

--
Regards,

Laurent Pinchart