All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] pinctrl: pinctrl-at91-pio4: Set irq handler and data in one go
@ 2020-11-08 18:01 Martin Kaiser
  2020-11-09 11:26 ` Andy Shevchenko
  2020-11-11 14:47 ` Linus Walleij
  0 siblings, 2 replies; 5+ messages in thread
From: Martin Kaiser @ 2020-11-08 18:01 UTC (permalink / raw)
  To: Ludovic Desroches, Linus Walleij, Nicolas Ferre, Alexandre Belloni
  Cc: linux-gpio, linux-kernel, Martin Kaiser

Replace the two separate calls for setting the irq handler and data with a
single irq_set_chained_handler_and_data() call.

Signed-off-by: Martin Kaiser <martin@kaiser.cx>
---
 drivers/pinctrl/pinctrl-at91-pio4.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/pinctrl/pinctrl-at91-pio4.c b/drivers/pinctrl/pinctrl-at91-pio4.c
index 578b387100d9..157fea808629 100644
--- a/drivers/pinctrl/pinctrl-at91-pio4.c
+++ b/drivers/pinctrl/pinctrl-at91-pio4.c
@@ -1127,8 +1127,8 @@ static int atmel_pinctrl_probe(struct platform_device *pdev)
 			return -EINVAL;
 		}
 		atmel_pioctrl->irqs[i] = res->start;
-		irq_set_chained_handler(res->start, atmel_gpio_irq_handler);
-		irq_set_handler_data(res->start, atmel_pioctrl);
+		irq_set_chained_handler_and_data(res->start,
+			atmel_gpio_irq_handler, atmel_pioctrl);
 		dev_dbg(dev, "bank %i: irq=%pr\n", i, res);
 	}
 
-- 
2.20.1


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

* Re: [PATCH] pinctrl: pinctrl-at91-pio4: Set irq handler and data in one go
  2020-11-08 18:01 [PATCH] pinctrl: pinctrl-at91-pio4: Set irq handler and data in one go Martin Kaiser
@ 2020-11-09 11:26 ` Andy Shevchenko
  2020-11-10  9:08   ` Nicolas Ferre
  2020-11-11 14:47 ` Linus Walleij
  1 sibling, 1 reply; 5+ messages in thread
From: Andy Shevchenko @ 2020-11-09 11:26 UTC (permalink / raw)
  To: Martin Kaiser
  Cc: Ludovic Desroches, Linus Walleij, Nicolas Ferre,
	Alexandre Belloni, open list:GPIO SUBSYSTEM,
	Linux Kernel Mailing List

On Sun, Nov 8, 2020 at 8:05 PM Martin Kaiser <martin@kaiser.cx> wrote:
>
> Replace the two separate calls for setting the irq handler and data with a
> single irq_set_chained_handler_and_data() call.

Can it be rewritten to use the GPIO core facility of instantiating IRQ chip?

-- 
With Best Regards,
Andy Shevchenko

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

* Re: [PATCH] pinctrl: pinctrl-at91-pio4: Set irq handler and data in one go
  2020-11-09 11:26 ` Andy Shevchenko
@ 2020-11-10  9:08   ` Nicolas Ferre
  2020-11-11 14:53     ` Linus Walleij
  0 siblings, 1 reply; 5+ messages in thread
From: Nicolas Ferre @ 2020-11-10  9:08 UTC (permalink / raw)
  To: Andy Shevchenko, Martin Kaiser, Ludovic Desroches
  Cc: Linus Walleij, Alexandre Belloni, open list:GPIO SUBSYSTEM,
	Linux Kernel Mailing List

On 09/11/2020 at 12:26, Andy Shevchenko wrote:
> On Sun, Nov 8, 2020 at 8:05 PM Martin Kaiser <martin@kaiser.cx> wrote:
>>
>> Replace the two separate calls for setting the irq handler and data with a
>> single irq_set_chained_handler_and_data() call.
> 
> Can it be rewritten to use the GPIO core facility of instantiating IRQ chip?

I have the feeling it's out of scope for this (tiny) patch.

Regards,
-- 
Nicolas Ferre

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

* Re: [PATCH] pinctrl: pinctrl-at91-pio4: Set irq handler and data in one go
  2020-11-08 18:01 [PATCH] pinctrl: pinctrl-at91-pio4: Set irq handler and data in one go Martin Kaiser
  2020-11-09 11:26 ` Andy Shevchenko
@ 2020-11-11 14:47 ` Linus Walleij
  1 sibling, 0 replies; 5+ messages in thread
From: Linus Walleij @ 2020-11-11 14:47 UTC (permalink / raw)
  To: Martin Kaiser
  Cc: Ludovic Desroches, Nicolas Ferre, Alexandre Belloni,
	open list:GPIO SUBSYSTEM, linux-kernel

On Sun, Nov 8, 2020 at 7:01 PM Martin Kaiser <martin@kaiser.cx> wrote:

> Replace the two separate calls for setting the irq handler and data with a
> single irq_set_chained_handler_and_data() call.
>
> Signed-off-by: Martin Kaiser <martin@kaiser.cx>

Patch applied as kernel looks better after than before.

Yours,
Linus Walleij

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

* Re: [PATCH] pinctrl: pinctrl-at91-pio4: Set irq handler and data in one go
  2020-11-10  9:08   ` Nicolas Ferre
@ 2020-11-11 14:53     ` Linus Walleij
  0 siblings, 0 replies; 5+ messages in thread
From: Linus Walleij @ 2020-11-11 14:53 UTC (permalink / raw)
  To: Nicolas Ferre
  Cc: Andy Shevchenko, Martin Kaiser, Ludovic Desroches,
	Alexandre Belloni, open list:GPIO SUBSYSTEM,
	Linux Kernel Mailing List

On Tue, Nov 10, 2020 at 10:08 AM Nicolas Ferre
<nicolas.ferre@microchip.com> wrote:
> On 09/11/2020 at 12:26, Andy Shevchenko wrote:
> > On Sun, Nov 8, 2020 at 8:05 PM Martin Kaiser <martin@kaiser.cx> wrote:
> >>
> >> Replace the two separate calls for setting the irq handler and data with a
> >> single irq_set_chained_handler_and_data() call.
> >
> > Can it be rewritten to use the GPIO core facility of instantiating IRQ chip?
>
> I have the feeling it's out of scope for this (tiny) patch.

True, but a good suggestion anyways.

If you have a TODO for the AT91 pin controllers I think both using
the GPIOLIB_IRQCHIP can cut down
the code in these files quite a bit, and probably fix some unknown bugs.

Yours,
Linus Walleij

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

end of thread, other threads:[~2020-11-11 14:53 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-11-08 18:01 [PATCH] pinctrl: pinctrl-at91-pio4: Set irq handler and data in one go Martin Kaiser
2020-11-09 11:26 ` Andy Shevchenko
2020-11-10  9:08   ` Nicolas Ferre
2020-11-11 14:53     ` Linus Walleij
2020-11-11 14:47 ` 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.