linux-gpio.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v3 0/2] gpio: irq: support describing three-cell interrupts
@ 2025-03-25 22:06 Yixun Lan
  2025-03-25 22:06 ` [PATCH v3 1/2] irqdomain: support three-cell scheme interrupts Yixun Lan
                   ` (3 more replies)
  0 siblings, 4 replies; 11+ messages in thread
From: Yixun Lan @ 2025-03-25 22:06 UTC (permalink / raw)
  To: Linus Walleij, Bartosz Golaszewski, Thomas Gleixner
  Cc: Alex Elder, Inochi Amaoto, linux-kernel, linux-gpio, linux-riscv,
	spacemit, Yixun Lan

In this patch [1], the GPIO controller add support for describing
hardware with a three-cell scheme:

    gpios = <&gpio instance offset flags>;

It also result describing interrupts in three-cell as this in DT:

    node {
            interrupt-parent = <&gpio>;
            interrupts = <instance hwirq irqflag>;
    }

This series try to extend describing interrupts with three-cell scheme.

The first patch will add capability for parsing irq number and flag
from last two cells which eventually will support the three-cells
interrupt, the second patch support finding irqdomain according to
interrupt instance index.

Link: https://lore.kernel.org/all/20250225-gpio-ranges-fourcell-v3-0-860382ba4713@linaro.org [1]
Signed-off-by: Yixun Lan <dlan@gentoo.org>
---
Changes in v3:
- explicitly introduce *_twothreecell() to support 3 cell interrupt
- Link to v2: https://lore.kernel.org/r/20250302-04-gpio-irq-threecell-v2-0-34f13ad37ea4@gentoo.org

Changes in v2:
- introduce generic irq_domain_translate_cells(), other inline cells function 
- hide the OF-specific things into gpiolib-of.c|h
- Link to v1: https://lore.kernel.org/r/20250227-04-gpio-irq-threecell-v1-0-4ae4d91baadc@gentoo.org

---
Yixun Lan (2):
      irqdomain: support three-cell scheme interrupts
      gpiolib: support parsing gpio three-cell interrupts scheme

 drivers/gpio/gpiolib-of.c |  8 +++++++
 drivers/gpio/gpiolib-of.h |  6 +++++
 drivers/gpio/gpiolib.c    | 22 +++++++++++++++----
 include/linux/irqdomain.h | 20 ++++++++---------
 kernel/irq/irqdomain.c    | 56 +++++++++++++++++++++++++++++++++++++++++++++++
 5 files changed, 98 insertions(+), 14 deletions(-)
---
base-commit: 2014c95afecee3e76ca4a56956a936e23283f05b
change-id: 20250227-04-gpio-irq-threecell-66e1e073c806
prerequisite-change-id: 20250217-gpio-ranges-fourcell-85888ad219da:v3
prerequisite-patch-id: 9d4c8b05cc56d25bfb93f3b06420ba6e93340d31
prerequisite-patch-id: 7949035abd05ec02a9426bb17819d9108e66e0d7

Best regards,
-- 
Yixun Lan


^ permalink raw reply	[flat|nested] 11+ messages in thread

* [PATCH v3 1/2] irqdomain: support three-cell scheme interrupts
  2025-03-25 22:06 [PATCH v3 0/2] gpio: irq: support describing three-cell interrupts Yixun Lan
@ 2025-03-25 22:06 ` Yixun Lan
  2025-03-25 22:06 ` [PATCH v3 2/2] gpiolib: support parsing gpio three-cell interrupts scheme Yixun Lan
                   ` (2 subsequent siblings)
  3 siblings, 0 replies; 11+ messages in thread
From: Yixun Lan @ 2025-03-25 22:06 UTC (permalink / raw)
  To: Linus Walleij, Bartosz Golaszewski, Thomas Gleixner
  Cc: Alex Elder, Inochi Amaoto, linux-kernel, linux-gpio, linux-riscv,
	spacemit, Yixun Lan

Add new function *_twothreecell() to extend support to parse three-cell
interrupts which encoded as <instance hwirq irqflag>, the translate
function will retrieve irq number and flag from last two cells.

This API will be used in gpio irq driver which need to work with
two or three cells cases.

Signed-off-by: Yixun Lan <dlan@gentoo.org>
---
I've also adjusted function irq_domain_translate_{two,three}cell param in
file include/linux/irqdomain.h, to make it fit with 100 column style,
also sort them in one to three cells logical order.
---
 include/linux/irqdomain.h | 20 ++++++++---------
 kernel/irq/irqdomain.c    | 56 +++++++++++++++++++++++++++++++++++++++++++++++
 2 files changed, 66 insertions(+), 10 deletions(-)

diff --git a/include/linux/irqdomain.h b/include/linux/irqdomain.h
index e432b6a12a32f9f16ec1ea2fa8e24a649d55caae..ce77d1bf79b2931c28dee7456013d82b6552cb5e 100644
--- a/include/linux/irqdomain.h
+++ b/include/linux/irqdomain.h
@@ -571,16 +571,16 @@ int irq_domain_xlate_twocell(struct irq_domain *d, struct device_node *ctrlr,
 int irq_domain_xlate_onetwocell(struct irq_domain *d, struct device_node *ctrlr,
 			const u32 *intspec, unsigned int intsize,
 			irq_hw_number_t *out_hwirq, unsigned int *out_type);
-
-int irq_domain_translate_twocell(struct irq_domain *d,
-				 struct irq_fwspec *fwspec,
-				 unsigned long *out_hwirq,
-				 unsigned int *out_type);
-
-int irq_domain_translate_onecell(struct irq_domain *d,
-				 struct irq_fwspec *fwspec,
-				 unsigned long *out_hwirq,
-				 unsigned int *out_type);
+int irq_domain_xlate_twothreecell(struct irq_domain *d, struct device_node *ctrlr,
+				  const u32 *intspec, unsigned int intsize,
+				  irq_hw_number_t *out_hwirq, unsigned int *out_type);
+
+int irq_domain_translate_onecell(struct irq_domain *d, struct irq_fwspec *fwspec,
+				 unsigned long *out_hwirq, unsigned int *out_type);
+int irq_domain_translate_twocell(struct irq_domain *d, struct irq_fwspec *fwspec,
+				 unsigned long *out_hwirq, unsigned int *out_type);
+int irq_domain_translate_twothreecell(struct irq_domain *d, struct irq_fwspec *fwspec,
+				      unsigned long *out_hwirq, unsigned int *out_type);
 
 /* IPI functions */
 int irq_reserve_ipi(struct irq_domain *domain, const struct cpumask *dest);
diff --git a/kernel/irq/irqdomain.c b/kernel/irq/irqdomain.c
index ec6d8e72d980f604ded2bfa2143420e0e0095920..1c26ee119914dbd113b10f6d968e036ca887c793 100644
--- a/kernel/irq/irqdomain.c
+++ b/kernel/irq/irqdomain.c
@@ -1132,6 +1132,31 @@ int irq_domain_xlate_twocell(struct irq_domain *d, struct device_node *ctrlr,
 }
 EXPORT_SYMBOL_GPL(irq_domain_xlate_twocell);
 
+/**
+ * irq_domain_xlate_twothreecell() - Generic xlate for direct two or three cell bindings
+ * @d:		Interrupt domain involved in the translation
+ * @ctrlr:	The device tree node for the device whose interrupt is translated
+ * @intspec:	The interrupt specifier data from the device tree
+ * @intsize:	The number of entries in @intspec
+ * @out_hwirq:	Pointer to storage for the hardware interrupt number
+ * @out_type:	Pointer to storage for the interrupt type
+ *
+ * Device Tree IRQ specifier translation function which works with two or three cell
+ * bindings where the cell values map directly to the hwirq number
+ * and linux irq flags.
+ */
+int irq_domain_xlate_twothreecell(struct irq_domain *d, struct device_node *ctrlr,
+				  const u32 *intspec, unsigned int intsize,
+				  irq_hw_number_t *out_hwirq, unsigned int *out_type)
+{
+	struct irq_fwspec fwspec;
+
+	of_phandle_args_to_fwspec(ctrlr, intspec, intsize, &fwspec);
+
+	return irq_domain_translate_twothreecell(d, &fwspec, out_hwirq, out_type);
+}
+EXPORT_SYMBOL_GPL(irq_domain_xlate_twothreecell);
+
 /**
  * irq_domain_xlate_onetwocell() - Generic xlate for one or two cell bindings
  * @d:		Interrupt domain involved in the translation
@@ -1216,6 +1241,37 @@ int irq_domain_translate_twocell(struct irq_domain *d,
 }
 EXPORT_SYMBOL_GPL(irq_domain_translate_twocell);
 
+/**
+ * irq_domain_translate_twothreecell() - Generic translate for direct two or three cell
+ * bindings
+ * @d:		Interrupt domain involved in the translation
+ * @fwspec:	The firmware interrupt specifier to translate
+ * @out_hwirq:	Pointer to storage for the hardware interrupt number
+ * @out_type:	Pointer to storage for the interrupt type
+ *
+ * Device Tree IRQ specifier translation function which works with two or three cell
+ * bindings where the cell values map directly to the hwirq number
+ * and linux irq flags.
+ */
+int irq_domain_translate_twothreecell(struct irq_domain *d, struct irq_fwspec *fwspec,
+				      unsigned long *out_hwirq, unsigned int *out_type)
+{
+	if (fwspec->param_count == 2) {
+		*out_hwirq = fwspec->param[0];
+		*out_type = fwspec->param[1] & IRQ_TYPE_SENSE_MASK;
+		return 0;
+	}
+
+	if (fwspec->param_count == 3) {
+		*out_hwirq = fwspec->param[1];
+		*out_type = fwspec->param[2] & IRQ_TYPE_SENSE_MASK;
+		return 0;
+	}
+
+	return -EINVAL;
+}
+EXPORT_SYMBOL_GPL(irq_domain_translate_twothreecell);
+
 int irq_domain_alloc_descs(int virq, unsigned int cnt, irq_hw_number_t hwirq,
 			   int node, const struct irq_affinity_desc *affinity)
 {

-- 
2.48.1


^ permalink raw reply related	[flat|nested] 11+ messages in thread

* [PATCH v3 2/2] gpiolib: support parsing gpio three-cell interrupts scheme
  2025-03-25 22:06 [PATCH v3 0/2] gpio: irq: support describing three-cell interrupts Yixun Lan
  2025-03-25 22:06 ` [PATCH v3 1/2] irqdomain: support three-cell scheme interrupts Yixun Lan
@ 2025-03-25 22:06 ` Yixun Lan
  2025-04-07 10:33   ` Yixun Lan
  2025-04-08  9:03   ` Bartosz Golaszewski
  2025-04-08  7:23 ` [PATCH v3 0/2] gpio: irq: support describing three-cell interrupts Geert Uytterhoeven
  2025-04-15  7:32 ` Linus Walleij
  3 siblings, 2 replies; 11+ messages in thread
From: Yixun Lan @ 2025-03-25 22:06 UTC (permalink / raw)
  To: Linus Walleij, Bartosz Golaszewski, Thomas Gleixner
  Cc: Alex Elder, Inochi Amaoto, linux-kernel, linux-gpio, linux-riscv,
	spacemit, Yixun Lan

gpio irq which using three-cell scheme should always call
instance_match() function to find the correct irqdomain.

The select() function will be called with !DOMAIN_BUS_ANY,
so for specific gpio irq driver, it need to set bus token
explicitly, something like:
  irq_domain_update_bus_token(girq->domain, DOMAIN_BUS_WIRED);

Signed-off-by: Yixun Lan <dlan@gentoo.org>
---
 drivers/gpio/gpiolib-of.c |  8 ++++++++
 drivers/gpio/gpiolib-of.h |  6 ++++++
 drivers/gpio/gpiolib.c    | 22 ++++++++++++++++++----
 3 files changed, 32 insertions(+), 4 deletions(-)

diff --git a/drivers/gpio/gpiolib-of.c b/drivers/gpio/gpiolib-of.c
index 2e537ee979f3e2b6e8d5f86f3e121a66f2a8e083..e19904569fb1b71c1fff237132d17050ef02b074 100644
--- a/drivers/gpio/gpiolib-of.c
+++ b/drivers/gpio/gpiolib-of.c
@@ -1187,3 +1187,11 @@ void of_gpiochip_remove(struct gpio_chip *chip)
 {
 	of_node_put(dev_of_node(&chip->gpiodev->dev));
 }
+
+bool of_gpiochip_instance_match(struct gpio_chip *gc, unsigned int index)
+{
+	if (gc->of_node_instance_match)
+		return gc->of_node_instance_match(gc, index);
+
+	return false;
+}
diff --git a/drivers/gpio/gpiolib-of.h b/drivers/gpio/gpiolib-of.h
index 16d6ac8cb156c02232ea868b755bbdc46c78e3c7..3eebfac290c571e3b90e4437295db8eaacb021a3 100644
--- a/drivers/gpio/gpiolib-of.h
+++ b/drivers/gpio/gpiolib-of.h
@@ -22,6 +22,7 @@ struct gpio_desc *of_find_gpio(struct device_node *np,
 			       unsigned long *lookupflags);
 int of_gpiochip_add(struct gpio_chip *gc);
 void of_gpiochip_remove(struct gpio_chip *gc);
+bool of_gpiochip_instance_match(struct gpio_chip *gc, unsigned int index);
 int of_gpio_count(const struct fwnode_handle *fwnode, const char *con_id);
 #else
 static inline struct gpio_desc *of_find_gpio(struct device_node *np,
@@ -33,6 +34,11 @@ static inline struct gpio_desc *of_find_gpio(struct device_node *np,
 }
 static inline int of_gpiochip_add(struct gpio_chip *gc) { return 0; }
 static inline void of_gpiochip_remove(struct gpio_chip *gc) { }
+static inline bool of_gpiochip_instance_match(struct gpio_chip *gc,
+					      unsigned int index)
+{
+	return false;
+}
 static inline int of_gpio_count(const struct fwnode_handle *fwnode,
 				const char *con_id)
 {
diff --git a/drivers/gpio/gpiolib.c b/drivers/gpio/gpiolib.c
index 679ed764cb143c4b3357106de1570e8d38441372..0729d951ef1fb8431f80f98d09cfbb383c7dffab 100644
--- a/drivers/gpio/gpiolib.c
+++ b/drivers/gpio/gpiolib.c
@@ -1450,9 +1450,8 @@ static int gpiochip_hierarchy_irq_domain_translate(struct irq_domain *d,
 						   unsigned int *type)
 {
 	/* We support standard DT translation */
-	if (is_of_node(fwspec->fwnode) && fwspec->param_count == 2) {
-		return irq_domain_translate_twocell(d, fwspec, hwirq, type);
-	}
+	if (is_of_node(fwspec->fwnode))
+		return irq_domain_translate_twothreecell(d, fwspec, hwirq, type);
 
 	/* This is for board files and others not using DT */
 	if (is_fwnode_irqchip(fwspec->fwnode)) {
@@ -1754,11 +1753,26 @@ static void gpiochip_irq_unmap(struct irq_domain *d, unsigned int irq)
 	irq_set_chip_data(irq, NULL);
 }
 
+static int gpiochip_irq_select(struct irq_domain *d, struct irq_fwspec *fwspec,
+			       enum irq_domain_bus_token bus_token)
+{
+	struct fwnode_handle *fwnode = fwspec->fwnode;
+	struct gpio_chip *gc = d->host_data;
+	unsigned int index = fwspec->param[0];
+
+	if (fwspec->param_count == 3 && is_of_node(fwnode))
+		return of_gpiochip_instance_match(gc, index);
+
+	/* Fallback for twocells */
+	return (fwnode && (d->fwnode == fwnode) && (d->bus_token == bus_token));
+}
+
 static const struct irq_domain_ops gpiochip_domain_ops = {
 	.map	= gpiochip_irq_map,
 	.unmap	= gpiochip_irq_unmap,
+	.select	= gpiochip_irq_select,
 	/* Virtually all GPIO irqchips are twocell:ed */
-	.xlate	= irq_domain_xlate_twocell,
+	.xlate	= irq_domain_xlate_twothreecell,
 };
 
 static struct irq_domain *gpiochip_simple_create_domain(struct gpio_chip *gc)

-- 
2.48.1


^ permalink raw reply related	[flat|nested] 11+ messages in thread

* Re: [PATCH v3 2/2] gpiolib: support parsing gpio three-cell interrupts scheme
  2025-03-25 22:06 ` [PATCH v3 2/2] gpiolib: support parsing gpio three-cell interrupts scheme Yixun Lan
@ 2025-04-07 10:33   ` Yixun Lan
  2025-04-07 11:26     ` Bartosz Golaszewski
  2025-04-08  9:03   ` Bartosz Golaszewski
  1 sibling, 1 reply; 11+ messages in thread
From: Yixun Lan @ 2025-04-07 10:33 UTC (permalink / raw)
  To: Linus Walleij, Bartosz Golaszewski, Thomas Gleixner
  Cc: Alex Elder, Inochi Amaoto, linux-kernel, linux-gpio, linux-riscv,
	spacemit

Hi Linus Walleij:

On 06:06 Wed 26 Mar     , Yixun Lan wrote:
> gpio irq which using three-cell scheme should always call
> instance_match() function to find the correct irqdomain.
> 
> The select() function will be called with !DOMAIN_BUS_ANY,
> so for specific gpio irq driver, it need to set bus token
> explicitly, something like:
>   irq_domain_update_bus_token(girq->domain, DOMAIN_BUS_WIRED);
> 
> Signed-off-by: Yixun Lan <dlan@gentoo.org>
> ---
>  drivers/gpio/gpiolib-of.c |  8 ++++++++
>  drivers/gpio/gpiolib-of.h |  6 ++++++
>  drivers/gpio/gpiolib.c    | 22 ++++++++++++++++++----
>  3 files changed, 32 insertions(+), 4 deletions(-)
> 

  I'd assume this patch [2/2] will go via pinctrl's tree?
as patch [1/2] has been accepted by Thomas into tip tree [1]..
  Additonally need to pull that commit first? since it's a dependency

[1] https://git.kernel.org/pub/scm/linux/kernel/git/tip/tip.git/commit/?h=irq/core&id=0a02e1f4a54ace747304687ced3b76d159e58914

-- 
Yixun Lan (dlan)
Gentoo Linux Developer
GPG Key ID AABEFD55

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [PATCH v3 2/2] gpiolib: support parsing gpio three-cell interrupts scheme
  2025-04-07 10:33   ` Yixun Lan
@ 2025-04-07 11:26     ` Bartosz Golaszewski
  2025-04-08  8:47       ` Thomas Gleixner
  0 siblings, 1 reply; 11+ messages in thread
From: Bartosz Golaszewski @ 2025-04-07 11:26 UTC (permalink / raw)
  To: Yixun Lan
  Cc: Linus Walleij, Thomas Gleixner, Alex Elder, Inochi Amaoto,
	linux-kernel, linux-gpio, linux-riscv, spacemit

On Mon, Apr 7, 2025 at 12:33 PM Yixun Lan <dlan@gentoo.org> wrote:
>
> Hi Linus Walleij:
>
> On 06:06 Wed 26 Mar     , Yixun Lan wrote:
> > gpio irq which using three-cell scheme should always call
> > instance_match() function to find the correct irqdomain.
> >
> > The select() function will be called with !DOMAIN_BUS_ANY,
> > so for specific gpio irq driver, it need to set bus token
> > explicitly, something like:
> >   irq_domain_update_bus_token(girq->domain, DOMAIN_BUS_WIRED);
> >
> > Signed-off-by: Yixun Lan <dlan@gentoo.org>
> > ---
> >  drivers/gpio/gpiolib-of.c |  8 ++++++++
> >  drivers/gpio/gpiolib-of.h |  6 ++++++
> >  drivers/gpio/gpiolib.c    | 22 ++++++++++++++++++----
> >  3 files changed, 32 insertions(+), 4 deletions(-)
> >
>
>   I'd assume this patch [2/2] will go via pinctrl's tree?
> as patch [1/2] has been accepted by Thomas into tip tree [1]..
>   Additonally need to pull that commit first? since it's a dependency
>

No, this should go through the GPIO tree but for that I'd need an
immutable tag with patch 1/2.

Bart

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [PATCH v3 0/2] gpio: irq: support describing three-cell interrupts
  2025-03-25 22:06 [PATCH v3 0/2] gpio: irq: support describing three-cell interrupts Yixun Lan
  2025-03-25 22:06 ` [PATCH v3 1/2] irqdomain: support three-cell scheme interrupts Yixun Lan
  2025-03-25 22:06 ` [PATCH v3 2/2] gpiolib: support parsing gpio three-cell interrupts scheme Yixun Lan
@ 2025-04-08  7:23 ` Geert Uytterhoeven
  2025-04-15  7:32 ` Linus Walleij
  3 siblings, 0 replies; 11+ messages in thread
From: Geert Uytterhoeven @ 2025-04-08  7:23 UTC (permalink / raw)
  To: Yixun Lan
  Cc: Linus Walleij, Bartosz Golaszewski, Thomas Gleixner, Alex Elder,
	Inochi Amaoto, linux-kernel, linux-gpio, linux-riscv, spacemit,
	open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS

CC devicetree

The first patch was already applied as commit 0a02e1f4a54ace74
("irqdomain: Support three-cell scheme interrupts") in irqchip/irq/core.

On Tue, 25 Mar 2025 at 23:08, Yixun Lan <dlan@gentoo.org> wrote:
> In this patch [1], the GPIO controller add support for describing
> hardware with a three-cell scheme:
>
>     gpios = <&gpio instance offset flags>;
>
> It also result describing interrupts in three-cell as this in DT:
>
>     node {
>             interrupt-parent = <&gpio>;
>             interrupts = <instance hwirq irqflag>;
>     }
>
> This series try to extend describing interrupts with three-cell scheme.
>
> The first patch will add capability for parsing irq number and flag
> from last two cells which eventually will support the three-cells
> interrupt, the second patch support finding irqdomain according to
> interrupt instance index.
>
> Link: https://lore.kernel.org/all/20250225-gpio-ranges-fourcell-v3-0-860382ba4713@linaro.org [1]
> Signed-off-by: Yixun Lan <dlan@gentoo.org>
> ---
> Changes in v3:
> - explicitly introduce *_twothreecell() to support 3 cell interrupt
> - Link to v2: https://lore.kernel.org/r/20250302-04-gpio-irq-threecell-v2-0-34f13ad37ea4@gentoo.org
>
> Changes in v2:
> - introduce generic irq_domain_translate_cells(), other inline cells function
> - hide the OF-specific things into gpiolib-of.c|h
> - Link to v1: https://lore.kernel.org/r/20250227-04-gpio-irq-threecell-v1-0-4ae4d91baadc@gentoo.org
>
> ---
> Yixun Lan (2):
>       irqdomain: support three-cell scheme interrupts
>       gpiolib: support parsing gpio three-cell interrupts scheme
>
>  drivers/gpio/gpiolib-of.c |  8 +++++++
>  drivers/gpio/gpiolib-of.h |  6 +++++
>  drivers/gpio/gpiolib.c    | 22 +++++++++++++++----
>  include/linux/irqdomain.h | 20 ++++++++---------
>  kernel/irq/irqdomain.c    | 56 +++++++++++++++++++++++++++++++++++++++++++++++
>  5 files changed, 98 insertions(+), 14 deletions(-)
> ---
> base-commit: 2014c95afecee3e76ca4a56956a936e23283f05b
> change-id: 20250227-04-gpio-irq-threecell-66e1e073c806
> prerequisite-change-id: 20250217-gpio-ranges-fourcell-85888ad219da:v3
> prerequisite-patch-id: 9d4c8b05cc56d25bfb93f3b06420ba6e93340d31
> prerequisite-patch-id: 7949035abd05ec02a9426bb17819d9108e66e0d7
>
> Best regards,
> --
> Yixun Lan

Gr{oetje,eeting}s,

                        Geert

-- 
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org

In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
                                -- Linus Torvalds

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [PATCH v3 2/2] gpiolib: support parsing gpio three-cell interrupts scheme
  2025-04-07 11:26     ` Bartosz Golaszewski
@ 2025-04-08  8:47       ` Thomas Gleixner
  2025-04-08  8:59         ` Bartosz Golaszewski
  0 siblings, 1 reply; 11+ messages in thread
From: Thomas Gleixner @ 2025-04-08  8:47 UTC (permalink / raw)
  To: Bartosz Golaszewski, Yixun Lan
  Cc: Linus Walleij, Alex Elder, Inochi Amaoto, linux-kernel,
	linux-gpio, linux-riscv, spacemit

On Mon, Apr 07 2025 at 13:26, Bartosz Golaszewski wrote:
> On Mon, Apr 7, 2025 at 12:33 PM Yixun Lan <dlan@gentoo.org> wrote:
>> On 06:06 Wed 26 Mar     , Yixun Lan wrote:
>>   I'd assume this patch [2/2] will go via pinctrl's tree?
>> as patch [1/2] has been accepted by Thomas into tip tree [1]..
>>   Additonally need to pull that commit first? since it's a dependency
>>
>
> No, this should go through the GPIO tree but for that I'd need an
> immutable tag with patch 1/2.

Here you go:

   git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip.git irqdomain-04-08-25

Thanks,

        tglx

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [PATCH v3 2/2] gpiolib: support parsing gpio three-cell interrupts scheme
  2025-04-08  8:47       ` Thomas Gleixner
@ 2025-04-08  8:59         ` Bartosz Golaszewski
  0 siblings, 0 replies; 11+ messages in thread
From: Bartosz Golaszewski @ 2025-04-08  8:59 UTC (permalink / raw)
  To: Thomas Gleixner
  Cc: Yixun Lan, Linus Walleij, Alex Elder, Inochi Amaoto, linux-kernel,
	linux-gpio, linux-riscv, spacemit

On Tue, Apr 8, 2025 at 10:47 AM Thomas Gleixner <tglx@linutronix.de> wrote:
>
> On Mon, Apr 07 2025 at 13:26, Bartosz Golaszewski wrote:
> > On Mon, Apr 7, 2025 at 12:33 PM Yixun Lan <dlan@gentoo.org> wrote:
> >> On 06:06 Wed 26 Mar     , Yixun Lan wrote:
> >>   I'd assume this patch [2/2] will go via pinctrl's tree?
> >> as patch [1/2] has been accepted by Thomas into tip tree [1]..
> >>   Additonally need to pull that commit first? since it's a dependency
> >>
> >
> > No, this should go through the GPIO tree but for that I'd need an
> > immutable tag with patch 1/2.
>
> Here you go:
>
>    git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip.git irqdomain-04-08-25
>
> Thanks,
>
>         tglx

Thanks, pulled.

Bartosz

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [PATCH v3 2/2] gpiolib: support parsing gpio three-cell interrupts scheme
  2025-03-25 22:06 ` [PATCH v3 2/2] gpiolib: support parsing gpio three-cell interrupts scheme Yixun Lan
  2025-04-07 10:33   ` Yixun Lan
@ 2025-04-08  9:03   ` Bartosz Golaszewski
  2025-04-08 11:53     ` Yixun Lan
  1 sibling, 1 reply; 11+ messages in thread
From: Bartosz Golaszewski @ 2025-04-08  9:03 UTC (permalink / raw)
  To: Yixun Lan
  Cc: Linus Walleij, Thomas Gleixner, Alex Elder, Inochi Amaoto,
	linux-kernel, linux-gpio, linux-riscv, spacemit

On Tue, Mar 25, 2025 at 11:08 PM Yixun Lan <dlan@gentoo.org> wrote:
>
> gpio irq which using three-cell scheme should always call
> instance_match() function to find the correct irqdomain.
>
> The select() function will be called with !DOMAIN_BUS_ANY,
> so for specific gpio irq driver, it need to set bus token
> explicitly, something like:
>   irq_domain_update_bus_token(girq->domain, DOMAIN_BUS_WIRED);
>
> Signed-off-by: Yixun Lan <dlan@gentoo.org>
> ---

This doesn't apply on top of my gpio/for-next branch. Please rebase
your patch and resend. Patch 1/2 is already on that branch.

Bartosz

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [PATCH v3 2/2] gpiolib: support parsing gpio three-cell interrupts scheme
  2025-04-08  9:03   ` Bartosz Golaszewski
@ 2025-04-08 11:53     ` Yixun Lan
  0 siblings, 0 replies; 11+ messages in thread
From: Yixun Lan @ 2025-04-08 11:53 UTC (permalink / raw)
  To: Bartosz Golaszewski
  Cc: Linus Walleij, Thomas Gleixner, Alex Elder, Inochi Amaoto,
	linux-kernel, linux-gpio, linux-riscv, spacemit

Hi Bartosz:

On 11:03 Tue 08 Apr     , Bartosz Golaszewski wrote:
> On Tue, Mar 25, 2025 at 11:08 PM Yixun Lan <dlan@gentoo.org> wrote:
> >
> > gpio irq which using three-cell scheme should always call
> > instance_match() function to find the correct irqdomain.
> >
> > The select() function will be called with !DOMAIN_BUS_ANY,
> > so for specific gpio irq driver, it need to set bus token
> > explicitly, something like:
> >   irq_domain_update_bus_token(girq->domain, DOMAIN_BUS_WIRED);
> >
> > Signed-off-by: Yixun Lan <dlan@gentoo.org>
> > ---
> 
> This doesn't apply on top of my gpio/for-next branch. Please rebase
> your patch and resend. Patch 1/2 is already on that branch.
> 
Ok, will do, thanks

-- 
Yixun Lan (dlan)
Gentoo Linux Developer
GPG Key ID AABEFD55

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [PATCH v3 0/2] gpio: irq: support describing three-cell interrupts
  2025-03-25 22:06 [PATCH v3 0/2] gpio: irq: support describing three-cell interrupts Yixun Lan
                   ` (2 preceding siblings ...)
  2025-04-08  7:23 ` [PATCH v3 0/2] gpio: irq: support describing three-cell interrupts Geert Uytterhoeven
@ 2025-04-15  7:32 ` Linus Walleij
  3 siblings, 0 replies; 11+ messages in thread
From: Linus Walleij @ 2025-04-15  7:32 UTC (permalink / raw)
  To: Yixun Lan
  Cc: Bartosz Golaszewski, Thomas Gleixner, Alex Elder, Inochi Amaoto,
	linux-kernel, linux-gpio, linux-riscv, spacemit

Hi Yixun,

On Tue, Mar 25, 2025 at 11:07 PM Yixun Lan <dlan@gentoo.org> wrote:

> In this patch [1], the GPIO controller add support for describing
> hardware with a three-cell scheme:

Sorry for replying so late, I was a bit busy.

I'm very happy with how this threecell IRQ support ended up,
and thanks a lot for driving the infrastructure for it!

Yours,
Linus Walleij

^ permalink raw reply	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2025-04-15  7:32 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-03-25 22:06 [PATCH v3 0/2] gpio: irq: support describing three-cell interrupts Yixun Lan
2025-03-25 22:06 ` [PATCH v3 1/2] irqdomain: support three-cell scheme interrupts Yixun Lan
2025-03-25 22:06 ` [PATCH v3 2/2] gpiolib: support parsing gpio three-cell interrupts scheme Yixun Lan
2025-04-07 10:33   ` Yixun Lan
2025-04-07 11:26     ` Bartosz Golaszewski
2025-04-08  8:47       ` Thomas Gleixner
2025-04-08  8:59         ` Bartosz Golaszewski
2025-04-08  9:03   ` Bartosz Golaszewski
2025-04-08 11:53     ` Yixun Lan
2025-04-08  7:23 ` [PATCH v3 0/2] gpio: irq: support describing three-cell interrupts Geert Uytterhoeven
2025-04-15  7:32 ` Linus Walleij

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).