From e6ca26abd37606ba4864f20c85d3fe4a2173b93f Mon Sep 17 00:00:00 2001 From: Phil Edworthy Date: Thu, 26 Apr 2018 17:19:47 +0100 Subject: gpio: dwapb: Add support for 1 interrupt per port A GPIO The DesignWare GPIO IP can be configured for either 1 interrupt or 1 per GPIO in port A, but the driver currently only supports 1 interrupt. See the DesignWare DW_apb_gpio Databook description of the 'GPIO_INTR_IO' parameter. This change allows the driver to work with up to 32 interrupts, it will get as many interrupts as specified in the DT 'interrupts' property. It doesn't do anything clever with the different interrupts, it just calls the same handler used for single interrupt hardware. ACPI companion code provided by Hoan Tran . This was tested on X-Gene by Hoan. Signed-off-by: Phil Edworthy Reviewed-by: Rob Herring Acked-by: Lee Jones Acked-by: Hoan Tran Signed-off-by: Linus Walleij --- include/linux/platform_data/gpio-dwapb.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'include/linux/platform_data') diff --git a/include/linux/platform_data/gpio-dwapb.h b/include/linux/platform_data/gpio-dwapb.h index 2dc7f4a8ab09..5a52d69c13f3 100644 --- a/include/linux/platform_data/gpio-dwapb.h +++ b/include/linux/platform_data/gpio-dwapb.h @@ -19,7 +19,8 @@ struct dwapb_port_property { unsigned int idx; unsigned int ngpio; unsigned int gpio_base; - unsigned int irq; + unsigned int irq[32]; + bool has_irq; bool irq_shared; }; -- cgit v1.2.3 From 02f6bf8717a359cabe042c632f3d03fc772450bf Mon Sep 17 00:00:00 2001 From: Phil Edworthy Date: Fri, 25 May 2018 16:11:34 +0100 Subject: gpio: dwapb: Fix rework support for 1 interrupt per port A GPIO Commit da069d5d2b814d9887989dcdb29fb0202eac8b38 ("gpio: dwapb: Rework support for 1 interrupt per port A GPIO"), was an incremental patch that was supposed to provide the delta between v5 and v6 patch set for adding support for 1 interupt per port A GPIO. v5 was applied, then some other feedback came afterwards. However, in my haste I managed to drop the changes made to dwapb_port_property struct. This patch includes those missing changes. Signed-off-by: Phil Edworthy Signed-off-by: Linus Walleij --- include/linux/platform_data/gpio-dwapb.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'include/linux/platform_data') diff --git a/include/linux/platform_data/gpio-dwapb.h b/include/linux/platform_data/gpio-dwapb.h index 5a52d69c13f3..419cfacb4b42 100644 --- a/include/linux/platform_data/gpio-dwapb.h +++ b/include/linux/platform_data/gpio-dwapb.h @@ -19,7 +19,7 @@ struct dwapb_port_property { unsigned int idx; unsigned int ngpio; unsigned int gpio_base; - unsigned int irq[32]; + int irq[32]; bool has_irq; bool irq_shared; }; -- cgit v1.2.3