All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] gpio: omap: Drop irq_base
@ 2023-02-15 21:38 Linus Walleij
  2023-02-16  8:21 ` Marc Zyngier
                   ` (2 more replies)
  0 siblings, 3 replies; 6+ messages in thread
From: Linus Walleij @ 2023-02-15 21:38 UTC (permalink / raw)
  To: linux-gpio, Bartosz Golaszewski
  Cc: Linus Walleij, Janusz Krzysztofik, Arnd Bergmann, Tony Lindgren,
	Marc Zyngier

The OMAP1 at one point was using static irqs but that time is gone,
OMAP1 uses sparse irqs like all other multiplatform targets so this
static allocation of descriptors should just go.

Cc: Janusz Krzysztofik <jmkrzyszt@gmail.com>
Cc: Arnd Bergmann <arnd@arndb.de>
Cc: Tony Lindgren <tony@atomide.com>
Cc: Marc Zyngier <maz@kernel.org>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
---
 drivers/gpio/gpio-omap.c | 15 ---------------
 1 file changed, 15 deletions(-)

diff --git a/drivers/gpio/gpio-omap.c b/drivers/gpio/gpio-omap.c
index 80ddc43fd875..292e62c06008 100644
--- a/drivers/gpio/gpio-omap.c
+++ b/drivers/gpio/gpio-omap.c
@@ -992,7 +992,6 @@ static int omap_gpio_chip_init(struct gpio_bank *bank, struct irq_chip *irqc,
 	struct gpio_irq_chip *irq;
 	static int gpio;
 	const char *label;
-	int irq_base = 0;
 	int ret;
 
 	/*
@@ -1024,19 +1023,6 @@ static int omap_gpio_chip_init(struct gpio_bank *bank, struct irq_chip *irqc,
 	}
 	bank->chip.ngpio = bank->width;
 
-#ifdef CONFIG_ARCH_OMAP1
-	/*
-	 * REVISIT: Once we have OMAP1 supporting SPARSE_IRQ, we can drop
-	 * irq_alloc_descs() since a base IRQ offset will no longer be needed.
-	 */
-	irq_base = devm_irq_alloc_descs(bank->chip.parent,
-					-1, 0, bank->width, 0);
-	if (irq_base < 0) {
-		dev_err(bank->chip.parent, "Couldn't allocate IRQ numbers\n");
-		return -ENODEV;
-	}
-#endif
-
 	/* MPUIO is a bit different, reading IRQ status clears it */
 	if (bank->is_mpuio && !bank->regs->wkup_en)
 		irqc->irq_set_wake = NULL;
@@ -1047,7 +1033,6 @@ static int omap_gpio_chip_init(struct gpio_bank *bank, struct irq_chip *irqc,
 	irq->default_type = IRQ_TYPE_NONE;
 	irq->num_parents = 1;
 	irq->parents = &bank->irq;
-	irq->first = irq_base;
 
 	ret = gpiochip_add_data(&bank->chip, bank);
 	if (ret)
-- 
2.34.1


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

* Re: [PATCH] gpio: omap: Drop irq_base
  2023-02-15 21:38 [PATCH] gpio: omap: Drop irq_base Linus Walleij
@ 2023-02-16  8:21 ` Marc Zyngier
  2023-02-16  9:35 ` Arnd Bergmann
  2023-02-16  9:35 ` Linus Walleij
  2 siblings, 0 replies; 6+ messages in thread
From: Marc Zyngier @ 2023-02-16  8:21 UTC (permalink / raw)
  To: Linus Walleij
  Cc: linux-gpio, Bartosz Golaszewski, Janusz Krzysztofik,
	Arnd Bergmann, Tony Lindgren

On Wed, 15 Feb 2023 21:38:43 +0000,
Linus Walleij <linus.walleij@linaro.org> wrote:
> 
> The OMAP1 at one point was using static irqs but that time is gone,
> OMAP1 uses sparse irqs like all other multiplatform targets so this
> static allocation of descriptors should just go.
> 
> Cc: Janusz Krzysztofik <jmkrzyszt@gmail.com>
> Cc: Arnd Bergmann <arnd@arndb.de>
> Cc: Tony Lindgren <tony@atomide.com>
> Cc: Marc Zyngier <maz@kernel.org>
> Signed-off-by: Linus Walleij <linus.walleij@linaro.org>

Acked-by: Marc Zyngier <maz@kernel.org>

	M.

-- 
Without deviation from the norm, progress is not possible.

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

* Re: [PATCH] gpio: omap: Drop irq_base
  2023-02-15 21:38 [PATCH] gpio: omap: Drop irq_base Linus Walleij
  2023-02-16  8:21 ` Marc Zyngier
@ 2023-02-16  9:35 ` Arnd Bergmann
  2023-02-16  9:35 ` Linus Walleij
  2 siblings, 0 replies; 6+ messages in thread
From: Arnd Bergmann @ 2023-02-16  9:35 UTC (permalink / raw)
  To: Linus Walleij, open list:GPIO SUBSYSTEM, Bartosz Golaszewski
  Cc: Janusz Krzysztofik, Tony Lindgren, Marc Zyngier

On Wed, Feb 15, 2023, at 22:38, Linus Walleij wrote:
> The OMAP1 at one point was using static irqs but that time is gone,
> OMAP1 uses sparse irqs like all other multiplatform targets so this
> static allocation of descriptors should just go.
>
> Cc: Janusz Krzysztofik <jmkrzyszt@gmail.com>
> Cc: Arnd Bergmann <arnd@arndb.de>
> Cc: Tony Lindgren <tony@atomide.com>
> Cc: Marc Zyngier <maz@kernel.org>
> Signed-off-by: Linus Walleij <linus.walleij@linaro.org>

Acked-by: Arnd Bergmann <arnd@arndb.de>

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

* Re: [PATCH] gpio: omap: Drop irq_base
  2023-02-15 21:38 [PATCH] gpio: omap: Drop irq_base Linus Walleij
  2023-02-16  8:21 ` Marc Zyngier
  2023-02-16  9:35 ` Arnd Bergmann
@ 2023-02-16  9:35 ` Linus Walleij
  2023-02-16 12:34   ` Bartosz Golaszewski
  2 siblings, 1 reply; 6+ messages in thread
From: Linus Walleij @ 2023-02-16  9:35 UTC (permalink / raw)
  To: linux-gpio, Bartosz Golaszewski
  Cc: Janusz Krzysztofik, Arnd Bergmann, Tony Lindgren, Marc Zyngier

On Wed, Feb 15, 2023 at 10:38 PM Linus Walleij <linus.walleij@linaro.org> wrote:

> The OMAP1 at one point was using static irqs but that time is gone,
> OMAP1 uses sparse irqs like all other multiplatform targets so this
> static allocation of descriptors should just go.
>
> Cc: Janusz Krzysztofik <jmkrzyszt@gmail.com>
> Cc: Arnd Bergmann <arnd@arndb.de>
> Cc: Tony Lindgren <tony@atomide.com>
> Cc: Marc Zyngier <maz@kernel.org>
> Signed-off-by: Linus Walleij <linus.walleij@linaro.org>

Incidentally this patch needs to be included in a bigger set of
immutable conversions (17 patches) that I will send out now.

This is because of contextual dependencies.

Bart: they should probably be merged as part of the big set
if the OMAP guys are OK with it.
Sorry for the inconvenience.

Yours,
Linus Walleij

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

* Re: [PATCH] gpio: omap: Drop irq_base
  2023-02-16  9:35 ` Linus Walleij
@ 2023-02-16 12:34   ` Bartosz Golaszewski
  2023-02-16 20:57     ` Linus Walleij
  0 siblings, 1 reply; 6+ messages in thread
From: Bartosz Golaszewski @ 2023-02-16 12:34 UTC (permalink / raw)
  To: Linus Walleij
  Cc: linux-gpio, Janusz Krzysztofik, Arnd Bergmann, Tony Lindgren,
	Marc Zyngier

On Thu, Feb 16, 2023 at 10:35 AM Linus Walleij <linus.walleij@linaro.org> wrote:
>
> On Wed, Feb 15, 2023 at 10:38 PM Linus Walleij <linus.walleij@linaro.org> wrote:
>
> > The OMAP1 at one point was using static irqs but that time is gone,
> > OMAP1 uses sparse irqs like all other multiplatform targets so this
> > static allocation of descriptors should just go.
> >
> > Cc: Janusz Krzysztofik <jmkrzyszt@gmail.com>
> > Cc: Arnd Bergmann <arnd@arndb.de>
> > Cc: Tony Lindgren <tony@atomide.com>
> > Cc: Marc Zyngier <maz@kernel.org>
> > Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
>
> Incidentally this patch needs to be included in a bigger set of
> immutable conversions (17 patches) that I will send out now.
>
> This is because of contextual dependencies.
>
> Bart: they should probably be merged as part of the big set
> if the OMAP guys are OK with it.
> Sorry for the inconvenience.
>

Can you resend all of them once v6.3-rc1 is tagged? I will not be
taking them in before the merge window, let's give them some time in
next first. Those sweeping driver conversions usually end up breaking
a thing or two.

Bart

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

* Re: [PATCH] gpio: omap: Drop irq_base
  2023-02-16 12:34   ` Bartosz Golaszewski
@ 2023-02-16 20:57     ` Linus Walleij
  0 siblings, 0 replies; 6+ messages in thread
From: Linus Walleij @ 2023-02-16 20:57 UTC (permalink / raw)
  To: Bartosz Golaszewski
  Cc: linux-gpio, Janusz Krzysztofik, Arnd Bergmann, Tony Lindgren,
	Marc Zyngier

On Thu, Feb 16, 2023 at 1:34 PM Bartosz Golaszewski <brgl@bgdev.pl> wrote:

> > Bart: they should probably be merged as part of the big set
> > if the OMAP guys are OK with it.
> > Sorry for the inconvenience.
> >
>
> Can you resend all of them once v6.3-rc1 is tagged?

Of course.

> I will not be
> taking them in before the merge window, let's give them some time in
> next first. Those sweeping driver conversions usually end up breaking
> a thing or two.

I was mainly posting them so that people test them and not convert
the same drivers since I'm already working on them, we can look at
these patches in 3 weeks.

Yours,
Linus Walleij

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

end of thread, other threads:[~2023-02-16 20:57 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-02-15 21:38 [PATCH] gpio: omap: Drop irq_base Linus Walleij
2023-02-16  8:21 ` Marc Zyngier
2023-02-16  9:35 ` Arnd Bergmann
2023-02-16  9:35 ` Linus Walleij
2023-02-16 12:34   ` Bartosz Golaszewski
2023-02-16 20:57     ` Linus Walleij

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.