mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Yu-Chun Lin <eleanor.lin@realtek.com>
To: <linusw@kernel.org>, <andriy.shevchenko@intel.com>,
	<mwalle@kernel.org>, <brgl@kernel.org>, <tychang@realtek.com>,
	<wbg@kernel.org>, <mathieu.dubois-briand@bootlin.com>,
	<nuno.sa@analog.com>, <Michael.Hennerich@analog.com>,
	<jic23@kernel.org>, <andy@kernel.org>,
	<u.kleine-koenig@baylibre.com>, <dakr@kernel.org>,
	<bhelgaas@google.com>, <o-takashi@sakamocchi.jp>
Cc: <eleanor.lin@realtek.com>, <dlechner@baylibre.com>,
	<linux-kernel@vger.kernel.org>, <linux-gpio@vger.kernel.org>,
	<linux@analog.com>, <linux-iio@vger.kernel.org>,
	<cy.huang@realtek.com>, <james.tai@realtek.com>,
	Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Subject: [PATCH v7 8/9] gpio: regmap: Add IRQ enable/disable helpers
Date: Thu, 23 Jul 2026 11:42:25 +0800	[thread overview]
Message-ID: <20260723034237.2501507-9-eleanor.lin@realtek.com> (raw)
In-Reply-To: <20260723034237.2501507-1-eleanor.lin@realtek.com>

Add gpio_regmap_enable_irq() and gpio_regmap_disable_irq(). Since struct
gpio_regmap is opaque, drivers cannot access the embedded gpio_chip directly.

Reviewed-by: Michael Walle <mwalle@kernel.org>
Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Suggested-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Signed-off-by: Yu-Chun Lin <eleanor.lin@realtek.com>
---
Changes in v7:
- Add Reviewed-by tags from Michael and Andy.
---
 drivers/gpio/gpio-regmap.c  | 12 ++++++++++++
 include/linux/gpio/regmap.h |  5 +++++
 2 files changed, 17 insertions(+)

diff --git a/drivers/gpio/gpio-regmap.c b/drivers/gpio/gpio-regmap.c
index 98cfdd890069..75b70aa1eb5b 100644
--- a/drivers/gpio/gpio-regmap.c
+++ b/drivers/gpio/gpio-regmap.c
@@ -357,6 +357,18 @@ void *gpio_regmap_get_drvdata(struct gpio_regmap *gpio)
 }
 EXPORT_SYMBOL_GPL(gpio_regmap_get_drvdata);
 
+void gpio_regmap_enable_irq(struct gpio_regmap *gpio, irq_hw_number_t hwirq)
+{
+	gpiochip_enable_irq(&gpio->gpio_chip, hwirq);
+}
+EXPORT_SYMBOL_GPL(gpio_regmap_enable_irq);
+
+void gpio_regmap_disable_irq(struct gpio_regmap *gpio, irq_hw_number_t hwirq)
+{
+	gpiochip_disable_irq(&gpio->gpio_chip, hwirq);
+}
+EXPORT_SYMBOL_GPL(gpio_regmap_disable_irq);
+
 /**
  * gpio_regmap_register() - Register a generic regmap GPIO controller
  * @config: configuration for gpio_regmap
diff --git a/include/linux/gpio/regmap.h b/include/linux/gpio/regmap.h
index 4bf4319ec12e..483b5deadda9 100644
--- a/include/linux/gpio/regmap.h
+++ b/include/linux/gpio/regmap.h
@@ -3,6 +3,8 @@
 #ifndef _LINUX_GPIO_REGMAP_H
 #define _LINUX_GPIO_REGMAP_H
 
+#include <linux/types.h>
+
 struct device;
 struct fwnode_handle;
 struct gpio_regmap;
@@ -172,4 +174,7 @@ void *gpio_regmap_get_drvdata(struct gpio_regmap *gpio);
 int gpio_regmap_reqres_irq(struct gpio_regmap *gpio, unsigned int offset);
 void gpio_regmap_relres_irq(struct gpio_regmap *gpio, unsigned int offset);
 
+void gpio_regmap_enable_irq(struct gpio_regmap *gpio, irq_hw_number_t hwirq);
+void gpio_regmap_disable_irq(struct gpio_regmap *gpio, irq_hw_number_t hwirq);
+
 #endif /* _LINUX_GPIO_REGMAP_H */
-- 
2.43.0


  parent reply	other threads:[~2026-07-23  3:43 UTC|newest]

Thread overview: 29+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-07-23  3:42 [PATCH v7 0/9] gpio: realtek: Add support for Realtek DHC RTD1625 Yu-Chun Lin
2026-07-23  3:42 ` [PATCH v7 1/9] Revert "gpio: realtek: Add driver for Realtek DHC RTD1625 SoC" Yu-Chun Lin
2026-07-23 21:09   ` Linus Walleij
2026-07-23  3:42 ` [PATCH v7 2/9] gpio: regmap: Provide default IRQ resource request and release callbacks Yu-Chun Lin
2026-07-23 21:10   ` Linus Walleij
2026-07-23  3:42 ` [PATCH v7 3/9] gpio: regmap: Apply default resource callbacks for regmap IRQ chip Yu-Chun Lin
2026-07-23 16:36   ` Mathieu Dubois-Briand
2026-07-23 21:11   ` Linus Walleij
2026-07-23  3:42 ` [PATCH v7 4/9] gpio: regmap: Order kernel-doc descriptions with the actual appearance Yu-Chun Lin
2026-07-23 21:11   ` Linus Walleij
2026-07-23  3:42 ` [PATCH v7 5/9] gpio: regmap: Add gpio_regmap_operation to extend reg_mask_xlate callback Yu-Chun Lin
2026-07-23  6:51   ` Michael Walle
2026-07-23 11:14     ` Yu-Chun Lin [林祐君]
2026-07-23 11:20       ` Michael Walle
2026-07-24  5:47         ` Yu-Chun Lin [林祐君]
2026-07-24 10:22   ` William Breathitt Gray
2026-07-25 21:47   ` Jonathan Cameron
2026-07-23  3:42 ` [PATCH v7 6/9] gpio: regmap: Add value_xlate callback Yu-Chun Lin
2026-07-23  6:54   ` Michael Walle
2026-07-23 21:14   ` Linus Walleij
2026-07-23  3:42 ` [PATCH v7 7/9] gpio: regmap: Add set_config callback Yu-Chun Lin
2026-07-23  7:01   ` Michael Walle
2026-07-23 21:15   ` Linus Walleij
2026-07-23  3:42 ` Yu-Chun Lin [this message]
2026-07-23 21:15   ` [PATCH v7 8/9] gpio: regmap: Add IRQ enable/disable helpers Linus Walleij
2026-07-23  3:42 ` [PATCH v7 9/9] gpio: realtek: Add driver for Realtek DHC RTD1625 SoC Yu-Chun Lin
2026-07-23 16:22   ` Mathieu Dubois-Briand
2026-07-24  5:49     ` Yu-Chun Lin [林祐君]
2026-07-25 13:56   ` 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=20260723034237.2501507-9-eleanor.lin@realtek.com \
    --to=eleanor.lin@realtek.com \
    --cc=Michael.Hennerich@analog.com \
    --cc=andriy.shevchenko@intel.com \
    --cc=andriy.shevchenko@linux.intel.com \
    --cc=andy@kernel.org \
    --cc=bhelgaas@google.com \
    --cc=brgl@kernel.org \
    --cc=cy.huang@realtek.com \
    --cc=dakr@kernel.org \
    --cc=dlechner@baylibre.com \
    --cc=james.tai@realtek.com \
    --cc=jic23@kernel.org \
    --cc=linusw@kernel.org \
    --cc=linux-gpio@vger.kernel.org \
    --cc=linux-iio@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux@analog.com \
    --cc=mathieu.dubois-briand@bootlin.com \
    --cc=mwalle@kernel.org \
    --cc=nuno.sa@analog.com \
    --cc=o-takashi@sakamocchi.jp \
    --cc=tychang@realtek.com \
    --cc=u.kleine-koenig@baylibre.com \
    --cc=wbg@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

all inboxes | Powered by JetHome®