All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/2] pinctrl: Enable support for external GPIO interrupts
@ 2016-06-28  8:06 Neil Armstrong
  2016-06-29  8:53   ` Linus Walleij
  0 siblings, 1 reply; 10+ messages in thread
From: Neil Armstrong @ 2016-06-28  8:06 UTC (permalink / raw)
  To: linus-amlogic

> From: Carlo Caione <carlo@endlessm.com>
> 
> In Meson SoCs we have 8 independent GPIO interrupts that can be programmed to
> use any of the GPIOs in the chip as interrupt source.
> 
> These GPIOs are managed by GIC but they can be conditioned (and enabled) by
> some registers external to the GIC.
> 
> GPIOs |--[mux1 or mux2]--[polarity]--[filter]--[edge_select]--> GIC
> 
> The original work has been done by Beniamino. I cleaned it up, fixed a couple
> of bugs, added support for Meson8b and the fix for the .to_irq hook.

Hi Carlo, Linus,

I have another implementation idea about this subject, by using static GPIO-irq
association in DT instead of using a very complex dynamic allocation.

The idea is to add a simple property :
irqs-gpios = <>

To map a GPIO to the irqs, then we can either use the DT irq mapping or use the
gpiolib to_irq() if the gpio is in the table.

The relative drawback is that we will need DT changes to enable routing of a gpio
to an IRQ, but the complete system is based on a DT description anyway.

In this case, we could use gpiochip_irqchip.

Do you think this structure would be acceptable ?

Neil

> Beniamino Galvani (2):
>   pinctrl: meson: Enable GPIO IRQs
>   pinctrl: dt-binding: Extend meson documentation with GPIO IRQs support
> 
>  .../devicetree/bindings/pinctrl/meson,pinctrl.txt  |  12 +
>  drivers/pinctrl/Kconfig                            |   1 +
>  drivers/pinctrl/meson/pinctrl-meson.c              | 254 +++++++++++++++++++++
>  drivers/pinctrl/meson/pinctrl-meson.h              |  18 +-
>  drivers/pinctrl/meson/pinctrl-meson8.c             |  36 +--
>  drivers/pinctrl/meson/pinctrl-meson8b.c            |  36 +--
>  6 files changed, 326 insertions(+), 31 deletions(-)
> 
> -- 
> 1.9.1
> 
> 
> _______________________________________________
> linux-arm-kernel mailing list
> linux-arm-kernel at lists.infradead.org
> http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply	[flat|nested] 10+ messages in thread
* [PATCH 0/2] pinctrl: Enable support for external GPIO interrupts
@ 2015-05-25 11:00 Carlo Caione
  0 siblings, 0 replies; 10+ messages in thread
From: Carlo Caione @ 2015-05-25 11:00 UTC (permalink / raw)
  To: linux-arm-kernel

From: Carlo Caione <carlo@endlessm.com>

In Meson SoCs we have 8 independent GPIO interrupts that can be programmed to
use any of the GPIOs in the chip as interrupt source.

These GPIOs are managed by GIC but they can be conditioned (and enabled) by
some registers external to the GIC.

GPIOs |--[mux1 or mux2]--[polarity]--[filter]--[edge_select]--> GIC

The original work has been done by Beniamino. I cleaned it up, fixed a couple
of bugs, added support for Meson8b and the fix for the .to_irq hook.

Beniamino Galvani (2):
  pinctrl: meson: Enable GPIO IRQs
  pinctrl: dt-binding: Extend meson documentation with GPIO IRQs support

 .../devicetree/bindings/pinctrl/meson,pinctrl.txt  |  12 +
 drivers/pinctrl/Kconfig                            |   1 +
 drivers/pinctrl/meson/pinctrl-meson.c              | 254 +++++++++++++++++++++
 drivers/pinctrl/meson/pinctrl-meson.h              |  18 +-
 drivers/pinctrl/meson/pinctrl-meson8.c             |  36 +--
 drivers/pinctrl/meson/pinctrl-meson8b.c            |  36 +--
 6 files changed, 326 insertions(+), 31 deletions(-)

-- 
1.9.1

^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2016-07-04 11:21 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-06-28  8:06 [PATCH 0/2] pinctrl: Enable support for external GPIO interrupts Neil Armstrong
2016-06-29  8:53 ` Linus Walleij
2016-06-29  8:53   ` Linus Walleij
2016-06-29 14:07   ` Carlo Caione
2016-06-29 14:07     ` Carlo Caione
2016-06-29 14:41   ` Daniel Drake
2016-06-29 14:41     ` Daniel Drake
2016-07-04 11:21     ` Linus Walleij
2016-07-04 11:21       ` Linus Walleij
  -- strict thread matches above, loose matches on Subject: below --
2015-05-25 11:00 Carlo Caione

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.