Skip to content

pinctrl: Enable support for external GPIO interrupts

Neil Armstrong linux-amlogic linux-arm-kernel 1 version New

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest0 of 2 patches 0 repliesNew

Patches in v1 No applies recorded yet

None of the 2 patches the cover letter announces are in this archive.

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.

Read the v1 thread

Cover letter [PATCH 0/2] pinctrl: Enable support for external GPIO interrupts
Quoted 5 lines

From: Carlo Caione <[email protected]>

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.

Quoted 7 lines

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

Quoted 20 lines

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(-)
Signature · 7 lines
1.9.1


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel at lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel