Re: [PATCH] gpio: add TS-5500 DIO headers support

From: Linus Walleij
Date: Thu Dec 06 2012 - 14:24:57 EST


On Thu, Dec 6, 2012 at 4:49 AM, Vivien Didelot
<vivien.didelot@xxxxxxxxxxxxxxxxxxxx> wrote:

> I looked at some drivers and if I'm not mistaken, this case is
> different. Technologic Systems platforms (such as the TS-5500) have
> several pin blocks. Each block has input-only, input-output or
> output-only pins. Only one pin per block is connected to an interrupt
> line. But sadly, these interrupt-connected lines are input only.
> Here are the details about the TS-5500 pin block "DIO1":
>
> http://wiki.embeddedarm.com/wiki/TS-5500#DIO1_Header

Aha I get it now. How odd ... OK we need to support this too.

> That's why I previously used a dio1_irq platform data field, to return
> the interrupt connected to the IRQ-able pin for any GPIO on DIO1, in the
> gpio_to_irq() implementation.

OK I get it.

> A Linux IRQ per pin doesn't seem to be possible because the
> irq_create_mapping() documentation says that "Only one mapping per
> hardware interrupt is permitted." Should I still implement the
> irq_chip/irqdomain for a single IRQ per block? For each pin?
> What do you think about this implementation?

So basically there are in total three pins and yeah this is too
little and too strange to warrant an irqdomain so go ahead
with it as it looks and fix the other comments. I'm happy with
keeping this now.

Linus Walleij
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/