Skip to contentSkip to conversation

gpio: Add IRQ support to ACCES 104-IDIO-16 driver

PATCH In review William Breathitt Gray 2 participants 2 messages Nov 3, 2015 – Nov 17, 2015

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH v2 1/1 gpio: Add IRQ support to ACCES 104-IDIO-16 driver

The ACCES 104-IDIO-16 series offers Change-of-State detection interrupt functionality; if Change-of-State detection is enabled, an interrupt is fired off if any input line changes state (i.e. goes from low to high, or from high to low). This patch adds support to handle these interrupts and allows the user to mask which GPIO lines are affected. The interrupt line number for the device may be set via the idio_16_irq module parameter.

---
Changes in v2:
- Remove includes for <linux/irq.h> and <linux/irqdomain.h>
- Rename uppercase variable names to lowercase
- Utilize the BIT macro
- Move IRQ acknowledgement code to irq_ack callback
- Use handle_edge_irq since this device only handles edge IRQs

 drivers/gpio/Kconfig            |   6 ++-
 drivers/gpio/gpio-104-idio-16.c | 112 +++++++++++++++++++++++++++++++++++++++-
 2 files changed, 116 insertions(+), 2 deletions(-)
drivers/gpio/Kconfig +5 -1
index b18bea0..18e1aa0 100644
@@ -496,8 +496,12 @@ menu "Port-mapped I/O GPIO drivers"
 
 config GPIO_104_IDIO_16
 	tristate "ACCES 104-IDIO-16 GPIO support"
+	select GPIOLIB_IRQCHIP
 	help
-	  Enables GPIO support for the ACCES 104-IDIO-16 family.
+	  Enables GPIO support for the ACCES 104-IDIO-16 family. The base port
+	  address for the device may be set via the idio_16_base module
+	  parameter. The interrupt line number for the device may be set via the
+	  idio_16_irq module parameter.
 
 config GPIO_F7188X
 	tristate "F71869, F71869A, F71882FG and F71889F GPIO support"
drivers/gpio/gpio-104-idio-16.c +111 -1

174 lines not on this page · raw message

Signature · 1 line
2.4.10
#1 lore raw
Quoted 8 lines · William Breathitt Gray

The ACCES 104-IDIO-16 series offers Change-of-State detection interrupt functionality; if Change-of-State detection is enabled, an interrupt is fired off if any input line changes state (i.e. goes from low to high, or from high to low). This patch adds support to handle these interrupts and allows the user to mask which GPIO lines are affected. The interrupt line number for the device may be set via the idio_16_irq module parameter.

Quoted 8 lines

---
Changes in v2:
- Remove includes for <linux/irq.h> and <linux/irqdomain.h>
- Rename uppercase variable names to lowercase
- Utilize the BIT macro
- Move IRQ acknowledgement code to irq_ack callback
- Use handle_edge_irq since this device only handles edge IRQs

Looks just good.

Patch applied for v4.5.

Yours,
Linus Walleij