pinctrl: intel: Unify the way of handling chained IRQ
Subsystems (3)
cover pinctrl: intel: Unify the way of handling chained IRQ
Some of the drivers are using the dedicated helpers (chained_irq_enter(), chained_irq_exit() helpers) and some relies on the specific implementations of the parent IRQ chip and its configuration. Update the latter ones to use dedicated helpers that cover all possible scenarios.
Andy Shevchenko (2):
pinctrl: baytrail: Use dedicated helpers for chained IRQ handlers
pinctrl: lynxpoint: Use dedicated helpers for chained IRQ handlers
drivers/pinctrl/intel/pinctrl-baytrail.c | 5 ++++- drivers/pinctrl/intel/pinctrl-lynxpoint.c | 5 ++++- 2 files changed, 8 insertions(+), 2 deletions(-)
Signature · 1 line
2.43.0.rc1.1336.g36b5255a03ac
PATCH 1/2 pinctrl: baytrail: Use dedicated helpers for chained IRQ handlers
Instead of relying on the fact that the parent IRQ chip supports fasteoi mode and calling the respective callback at the end of the interrupt handler, surround it with enter and exit helpers for chained IRQ handlers which will consider all possible cases.
This in particular unifies how GPIO drivers handle IRQ.
--- drivers/pinctrl/intel/pinctrl-baytrail.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-)
drivers/pinctrl/intel/pinctrl-baytrail.c +4 -1
@@ -1355,6 +1355,8 @@ static void byt_gpio_irq_handler(struct irq_desc *desc)void __iomem *reg;unsigned long pending; +chained_irq_enter (chip, desc); +/* check from GPIO controller which pin triggered the interrupt */ for (base =0 ; base < vg->chip.ngpio; base +=32 ) { reg =byt_gpio_reg (vg, base,BYT_INT_STAT_REG );
@@ -1369,7 +1371,8 @@ static void byt_gpio_irq_handler(struct irq_desc *desc)for_each_set_bit (pin, &pending,32 )generic_handle_domain_irq (vg->chip.irq.domain, base + pin); } - chip->irq_eoi (data); + +chained_irq_exit (chip, desc); }static bool byt_direct_irq_sanity_check (struct intel_pinctrl *vg,int pin,u32 conf0)
Signature · 1 line
2.43.0.rc1.1336.g36b5255a03ac
Re: [PATCH v1 1/2] pinctrl: baytrail: Use dedicated helpers for chained IRQ handlers
Quoted 8 lines · Andy Shevchenko
Instead of relying on the fact that the parent IRQ chip supports fasteoi mode and calling the respective callback at the end of the interrupt handler, surround it with enter and exit helpers for chained IRQ handlers which will consider all possible cases.
This in particular unifies how GPIO drivers handle IRQ.
Signed-off-by Andy Shevchenko <[email protected]>
Looks fine to me, also 2/2.
Expect to get this from you as pull request!
Yours,
Linus Walleij
PATCH 2/2 pinctrl: lynxpoint: Use dedicated helpers for chained IRQ handlers
In reply to Andy ShevchenkoInstead of relying on the fact that the parent IRQ chip supports fasteoi mode and calling the respective callback at the end of the interrupt handler, surround it with enter and exit helpers for chained IRQ handlers which will consider all possible cases.
This in particular unifies how GPIO drivers handle IRQ.
--- drivers/pinctrl/intel/pinctrl-lynxpoint.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-)
drivers/pinctrl/intel/pinctrl-lynxpoint.c +4 -1
@@ -549,6 +549,8 @@ static void lp_gpio_irq_handler(struct irq_desc *desc)unsigned long pending;u32 base, pin; +chained_irq_enter (chip, desc); +/* check from GPIO controller which pin triggered the interrupt */ for (base =0 ; base < lg->chip.ngpio; base +=32 ) { reg =lp_gpio_reg (&lg->chip, base,LP_INT_STAT );
@@ -560,7 +562,8 @@ static void lp_gpio_irq_handler(struct irq_desc *desc)for_each_set_bit (pin, &pending,32 )generic_handle_domain_irq (lg->chip.irq.domain, base + pin); } - chip->irq_eoi (data); + +chained_irq_exit (chip, desc); }static void lp_irq_ack (struct irq_data *d)
Signature · 1 line
2.43.0.rc1.1336.g36b5255a03ac
Hi,
Quoted 8 lines · Andy Shevchenko
Some of the drivers are using the dedicated helpers (
chained_irq_enter(),chained_irq_exit()helpers) and some relies on the specific implementations of the parent IRQ chip and its configuration. Update the latter ones to use dedicated helpers that cover all possible scenarios.Andy Shevchenko (2):
pinctrl: baytrail: Use dedicated helpers for chained IRQ handlers
pinctrl: lynxpoint: Use dedicated helpers for chained IRQ handlers
Thanks, patches looks good to me:
For the series.
Regards,
Hans
Quoted 5 lines
drivers/pinctrl/intel/pinctrl-baytrail.c | 5 ++++- drivers/pinctrl/intel/pinctrl-lynxpoint.c | 5 ++++- 2 files changed, 8 insertions(+), 2 deletions(-)
Quoted 8 lines · Andy Shevchenko
Some of the drivers are using the dedicated helpers (
chained_irq_enter(),chained_irq_exit()helpers) and some relies on the specific implementations of the parent IRQ chip and its configuration. Update the latter ones to use dedicated helpers that cover all possible scenarios.Andy Shevchenko (2):
pinctrl: baytrail: Use dedicated helpers for chained IRQ handlers
pinctrl: lynxpoint: Use dedicated helpers for chained IRQ handlers
Both,
Quoted 6 lines · Mika Westerberg
Quoted 5 lines · Andy Shevchenko
Some of the drivers are using the dedicated helpers (
chained_irq_enter(),chained_irq_exit()helpers) and some relies on the specific implementations of the parent IRQ chip and its configuration. Update the latter ones to use dedicated helpers that cover all possible scenarios.
Quoted 7 lines
Quoted 3 lines
Andy Shevchenko (2):
pinctrl: baytrail: Use dedicated helpers for chained IRQ handlers
pinctrl: lynxpoint: Use dedicated helpers for chained IRQ handlersBoth,
Acked-by Mika Westerberg <[email protected]>
Pushed to my review and testing queue, thanks!
Signature · 2 lines
With Best Regards, Andy Shevchenko