All of lore.kernel.org
 help / color / mirror / Atom feed
From: "irqchip-bot for Marc Zyngier" <tip-bot2@linutronix.de>
To: linux-kernel@vger.kernel.org
Cc: Andy Shevchenko <andy.shevchenko@gmail.com>,
	Bartosz Golaszewski <brgl@bgdev.pl>,
	Marc Zyngier <maz@kernel.org>,
	tglx@linutronix.de
Subject: [irqchip: irq/irqchip-next] gpio: Expose the gpiochip_irq_re[ql]res helpers
Date: Tue, 19 Apr 2022 14:29:05 -0000	[thread overview]
Message-ID: <165037854540.4207.15429511817140847503.tip-bot2@tip-bot2> (raw)
In-Reply-To: <20220419141846.598305-3-maz@kernel.org>

The following commit has been merged into the irq/irqchip-next branch of irqchip:

Commit-ID:     704f08753b6dcd0e08c1953af0b2c7f3fac87111
Gitweb:        https://git.kernel.org/pub/scm/linux/kernel/git/maz/arm-platforms/704f08753b6dcd0e08c1953af0b2c7f3fac87111
Author:        Marc Zyngier <maz@kernel.org>
AuthorDate:    Tue, 19 Apr 2022 15:18:38 +01:00
Committer:     Marc Zyngier <maz@kernel.org>
CommitterDate: Tue, 19 Apr 2022 15:22:25 +01:00

gpio: Expose the gpiochip_irq_re[ql]res helpers

The GPIO subsystem has a couple of internal helpers to manage
resources on behalf of the irqchip. Expose them so that GPIO
drivers can use them directly.

Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Bartosz Golaszewski <brgl@bgdev.pl>
Signed-off-by: Marc Zyngier <maz@kernel.org>
Link: https://lore.kernel.org/r/20220419141846.598305-3-maz@kernel.org
---
 drivers/gpio/gpiolib.c      | 6 ++++--
 include/linux/gpio/driver.h | 4 ++++
 2 files changed, 8 insertions(+), 2 deletions(-)

diff --git a/drivers/gpio/gpiolib.c b/drivers/gpio/gpiolib.c
index 48191e6..36e436a 100644
--- a/drivers/gpio/gpiolib.c
+++ b/drivers/gpio/gpiolib.c
@@ -1423,19 +1423,21 @@ static int gpiochip_to_irq(struct gpio_chip *gc, unsigned int offset)
 	return irq_create_mapping(domain, offset);
 }
 
-static int gpiochip_irq_reqres(struct irq_data *d)
+int gpiochip_irq_reqres(struct irq_data *d)
 {
 	struct gpio_chip *gc = irq_data_get_irq_chip_data(d);
 
 	return gpiochip_reqres_irq(gc, d->hwirq);
 }
+EXPORT_SYMBOL(gpiochip_irq_reqres);
 
-static void gpiochip_irq_relres(struct irq_data *d)
+void gpiochip_irq_relres(struct irq_data *d)
 {
 	struct gpio_chip *gc = irq_data_get_irq_chip_data(d);
 
 	gpiochip_relres_irq(gc, d->hwirq);
 }
+EXPORT_SYMBOL(gpiochip_irq_relres);
 
 static void gpiochip_irq_mask(struct irq_data *d)
 {
diff --git a/include/linux/gpio/driver.h b/include/linux/gpio/driver.h
index 98c9351..066bcfd 100644
--- a/include/linux/gpio/driver.h
+++ b/include/linux/gpio/driver.h
@@ -579,6 +579,10 @@ void gpiochip_relres_irq(struct gpio_chip *gc, unsigned int offset);
 void gpiochip_disable_irq(struct gpio_chip *gc, unsigned int offset);
 void gpiochip_enable_irq(struct gpio_chip *gc, unsigned int offset);
 
+/* irq_data versions of the above */
+int gpiochip_irq_reqres(struct irq_data *data);
+void gpiochip_irq_relres(struct irq_data *data);
+
 /* Line status inquiry for drivers */
 bool gpiochip_line_is_open_drain(struct gpio_chip *gc, unsigned int offset);
 bool gpiochip_line_is_open_source(struct gpio_chip *gc, unsigned int offset);

  reply	other threads:[~2022-04-19 14:29 UTC|newest]

Thread overview: 60+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-04-19 14:18 [PATCH v3 00/10] gpiolib: Handle immutable irq_chip structures Marc Zyngier
2022-04-19 14:18 ` Marc Zyngier
2022-04-19 14:18 ` [PATCH v3 01/10] gpio: Don't fiddle with irqchips marked as immutable Marc Zyngier
2022-04-19 14:18   ` Marc Zyngier
2022-04-19 14:29   ` [irqchip: irq/irqchip-next] " irqchip-bot for Marc Zyngier
2022-04-19 14:18 ` [PATCH v3 02/10] gpio: Expose the gpiochip_irq_re[ql]res helpers Marc Zyngier
2022-04-19 14:18   ` Marc Zyngier
2022-04-19 14:29   ` irqchip-bot for Marc Zyngier [this message]
2022-04-19 14:18 ` [PATCH v3 03/10] gpio: Add helpers to ease the transition towards immutable irq_chip Marc Zyngier
2022-04-19 14:18   ` Marc Zyngier
2022-04-19 14:29   ` [irqchip: irq/irqchip-next] " irqchip-bot for Marc Zyngier
2022-04-19 14:18 ` [PATCH v3 04/10] gpio: tegra186: Make the irqchip immutable Marc Zyngier
2022-04-19 14:18   ` Marc Zyngier
2022-04-19 14:29   ` [irqchip: irq/irqchip-next] " irqchip-bot for Marc Zyngier
2022-04-19 14:18 ` [PATCH v3 05/10] gpio: pl061: " Marc Zyngier
2022-04-19 14:18   ` Marc Zyngier
2022-04-19 14:29   ` [irqchip: irq/irqchip-next] " irqchip-bot for Marc Zyngier
2022-04-19 14:18 ` [PATCH v3 06/10] pinctrl: apple-gpio: " Marc Zyngier
2022-04-19 14:18   ` Marc Zyngier
2022-04-19 14:29   ` [irqchip: irq/irqchip-next] " irqchip-bot for Marc Zyngier
2022-04-19 14:18 ` [PATCH v3 07/10] pinctrl: msmgpio: " Marc Zyngier
2022-04-19 14:18   ` Marc Zyngier
2022-04-19 14:29   ` [irqchip: irq/irqchip-next] " irqchip-bot for Marc Zyngier
2022-04-19 14:18 ` [PATCH v3 08/10] pinctrl: amd: " Marc Zyngier
2022-04-19 14:18   ` Marc Zyngier
2022-04-19 14:29   ` [irqchip: irq/irqchip-next] " irqchip-bot for Marc Zyngier
2022-04-19 14:18 ` [PATCH v3 09/10] gpio: Update TODO to mention immutable irq_chip structures Marc Zyngier
2022-04-19 14:18   ` Marc Zyngier
2022-04-19 14:28   ` [irqchip: irq/irqchip-next] " irqchip-bot for Marc Zyngier
2022-04-19 14:18 ` [PATCH v3 10/10] Documentation: Update the recommended pattern for GPIO irqchips Marc Zyngier
2022-04-19 14:18   ` Marc Zyngier
2022-04-19 14:28   ` [irqchip: irq/irqchip-next] " irqchip-bot for Marc Zyngier
2022-04-22 21:24 ` [PATCH v3 00/10] gpiolib: Handle immutable irq_chip structures Linus Walleij
2022-04-22 21:24   ` Linus Walleij
2022-04-23 10:30   ` Marc Zyngier
2022-04-23 10:30     ` Marc Zyngier
2022-04-26 10:24     ` Andy Shevchenko
2022-04-26 10:24       ` Andy Shevchenko
2022-04-26 21:59       ` Linus Walleij
2022-04-26 21:59         ` Linus Walleij
2022-05-04 21:21     ` Linus Walleij
2022-05-04 21:21       ` Linus Walleij
2022-05-05  8:09       ` Marc Zyngier
2022-05-05  8:09         ` Marc Zyngier
2022-05-05 12:58       ` Bartosz Golaszewski
2022-05-05 12:58         ` Bartosz Golaszewski
2022-05-05 14:50         ` Linus Walleij
2022-05-05 14:50           ` Linus Walleij
2022-05-12 17:08 ` Andy Shevchenko
2022-05-12 17:08   ` Andy Shevchenko
2022-05-12 17:35   ` Andy Shevchenko
2022-05-12 17:35     ` Andy Shevchenko
2022-05-12 22:18     ` Marc Zyngier
2022-05-12 22:18       ` Marc Zyngier
2022-05-13  8:43       ` Andy Shevchenko
2022-05-13  8:43         ` Andy Shevchenko
2022-05-13  8:51         ` Marc Zyngier
2022-05-13  8:51           ` Marc Zyngier
2022-05-12 22:15   ` Marc Zyngier
2022-05-12 22:15     ` Marc Zyngier

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=165037854540.4207.15429511817140847503.tip-bot2@tip-bot2 \
    --to=tip-bot2@linutronix.de \
    --cc=andy.shevchenko@gmail.com \
    --cc=brgl@bgdev.pl \
    --cc=linux-kernel@vger.kernel.org \
    --cc=maz@kernel.org \
    --cc=tglx@linutronix.de \
    /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 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.