From: Thierry Reding <thierry.reding@gmail.com>
To: Linus Walleij <linus.walleij@linaro.org>
Cc: Alexandre Courbot <gnurou@gmail.com>,
linux-gpio@vger.kernel.org, linux-tegra@vger.kernel.org
Subject: [PATCH 10/12] gpio: Move irq_handler to struct gpio_irq_chip
Date: Mon, 3 Apr 2017 18:05:30 +0200 [thread overview]
Message-ID: <20170403160532.20282-11-thierry.reding@gmail.com> (raw)
In-Reply-To: <20170403160532.20282-1-thierry.reding@gmail.com>
From: Thierry Reding <treding@nvidia.com>
In order to consolidate the multiple ways to associate an IRQ chip with
a GPIO chip, move more fields into the new struct gpio_irq_chip.
Signed-off-by: Thierry Reding <treding@nvidia.com>
---
drivers/gpio/gpiolib.c | 6 ++----
include/linux/gpio/driver.h | 6 ++----
2 files changed, 4 insertions(+), 8 deletions(-)
diff --git a/drivers/gpio/gpiolib.c b/drivers/gpio/gpiolib.c
index cb4b35157aca..3b251d5c0e1a 100644
--- a/drivers/gpio/gpiolib.c
+++ b/drivers/gpio/gpiolib.c
@@ -1619,7 +1619,7 @@ int gpiochip_irq_map(struct irq_domain *d, unsigned int irq,
* category than their parents, so it won't report false recursion.
*/
irq_set_lockdep_class(irq, chip->irq.lock_key);
- irq_set_chip_and_handler(irq, chip->irq.chip, chip->irq_handler);
+ irq_set_chip_and_handler(irq, chip->irq.chip, chip->irq.handler);
/* Chips that use nested thread handlers have them marked */
if (chip->irq.nested)
irq_set_nested_thread(irq, 1);
@@ -1733,8 +1733,6 @@ static int gpiochip_add_irqchip(struct gpio_chip *gpiochip)
type = IRQ_TYPE_NONE;
}
- gpiochip->irq_handler = gpiochip->irq.handler;
-
gpiochip->to_irq = gpiochip_to_irq;
gpiochip->irq.default_type = type;
@@ -1921,7 +1919,7 @@ int gpiochip_irqchip_add_key(struct gpio_chip *gpiochip,
}
gpiochip->irq.chip = irqchip;
- gpiochip->irq_handler = handler;
+ gpiochip->irq.handler = handler;
gpiochip->irq.default_type = type;
gpiochip->to_irq = gpiochip_to_irq;
gpiochip->irq.lock_key = lock_key;
diff --git a/include/linux/gpio/driver.h b/include/linux/gpio/driver.h
index 4bc5b4b9cf0b..91aa808052f1 100644
--- a/include/linux/gpio/driver.h
+++ b/include/linux/gpio/driver.h
@@ -28,7 +28,8 @@ struct module;
* @domain: interrupt translation domain; responsible for mapping
* between GPIO hwirq number and linux irq number
* @domain_ops: table of interrupt domain operations for this IRQ chip
- * @handler: the interrupt handler for the GPIO chip's parent interrupts
+ * @handler: the IRQ handler to use (often a predefined IRQ core function) for
+ * GPIO IRQs, provided by GPIO driver
* @lock_key: per GPIO IRQ chip lockdep class
* @default_type: default IRQ triggering type applied during GPIO driver
* initialization, provided by GPIO driver
@@ -125,8 +126,6 @@ struct gpio_irq_chip {
* @bgpio_dir: shadowed direction register for generic GPIO to clear/set
* direction safely.
* @irq_base: first linux IRQ number assigned to GPIO IRQ chip (deprecated)
- * @irq_handler: the irq handler to use (often a predefined irq core function)
- * for GPIO IRQs, provided by GPIO driver
*
* A gpio_chip can help platforms abstract various sources of GPIOs so
* they can all be accessed through a common programing interface.
@@ -194,7 +193,6 @@ struct gpio_chip {
* to handle IRQs for most practical cases.
*/
unsigned int irq_base;
- irq_flow_handler_t irq_handler;
struct gpio_irq_chip irq;
#endif
--
2.12.0
next prev parent reply other threads:[~2017-04-03 16:05 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-04-03 16:05 [PATCH 00/12] gpio: Tight IRQ chip integration and Tegra186 support Thierry Reding
2017-04-03 16:05 ` [PATCH 02/12] gpio: Implement tighter IRQ chip integration Thierry Reding
[not found] ` <20170403160532.20282-1-thierry.reding-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2017-04-03 16:05 ` [PATCH 01/12] gpio: Use unsigned int for interrupt numbers Thierry Reding
[not found] ` <20170403160532.20282-2-thierry.reding-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2017-04-13 12:17 ` Linus Walleij
2017-04-03 16:05 ` [PATCH 03/12] gpio: Move irq_nested into struct gpio_irq_chip Thierry Reding
2017-04-03 16:05 ` [PATCH 04/12] gpio: Move irqdomain " Thierry Reding
2017-04-03 16:05 ` [PATCH 07/12] gpio: Move lock_key " Thierry Reding
2017-04-03 16:05 ` [PATCH 08/12] gpio: Move irq_chained_parent to " Thierry Reding
2017-04-03 16:05 ` [PATCH 09/12] gpio: Move irq_default_type " Thierry Reding
2017-04-03 16:05 ` [PATCH 11/12] gpio: Move irq_base " Thierry Reding
2017-04-03 16:05 ` [PATCH v3 12/12] gpio: Add Tegra186 support Thierry Reding
[not found] ` <20170403160532.20282-13-thierry.reding-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2017-04-13 12:38 ` Linus Walleij
[not found] ` <CACRpkdaQacEqqW9Vdn7mtnZMH_VvL1B-35VFV=PcORwgtLz2eg-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2017-04-13 15:19 ` Thierry Reding
2017-05-11 8:30 ` Linus Walleij
2017-04-13 12:22 ` [PATCH 00/12] gpio: Tight IRQ chip integration and " Linus Walleij
2017-04-03 16:05 ` [PATCH 05/12] gpio: Move irqchip into struct gpio_irq_chip Thierry Reding
2017-04-03 16:05 ` [PATCH 06/12] gpio: Move irq_valid_mask " Thierry Reding
2017-04-03 16:05 ` Thierry Reding [this message]
2017-04-06 22:34 ` [PATCH 00/12] gpio: Tight IRQ chip integration and Tegra186 support Thierry Reding
[not found] ` <20170406223449.GH27728-EkSeR96xj6Pcmrwk2tT4+A@public.gmane.org>
2017-04-13 12:23 ` Linus Walleij
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20170403160532.20282-11-thierry.reding@gmail.com \
--to=thierry.reding@gmail.com \
--cc=gnurou@gmail.com \
--cc=linus.walleij@linaro.org \
--cc=linux-gpio@vger.kernel.org \
--cc=linux-tegra@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).