Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1583230
| From | Phil Reid <preid@electromag.com.au> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | [PATCH 1/1] gpio: altera: Use handle_level_irq when configured as a level_high |
| Date | 2017-02-17 10:20 +0100 |
| Message-ID | <tbMRQ-2p0-13@gated-at.bofh.it> (permalink) |
| Organization | linux.* mail to news gateway |
When a threaded irq handler is chained attached to one of the gpio
pins when configure for level irq the altera_gpio_irq_leveL_high_handler
does not mask the interrupt while being handled by the chained irq.
This resulting in the threaded irq not getting enough cycles to complete
quickly enough before the irq was disabled as faulty.
It looks like handle_level_irq should be used in this situation
instead of handle_simple_irq.
Signed-off-by: Phil Reid <preid@electromag.com.au>
---
drivers/gpio/gpio-altera.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/drivers/gpio/gpio-altera.c b/drivers/gpio/gpio-altera.c
index 5bddbd5..d67dcca 100644
--- a/drivers/gpio/gpio-altera.c
+++ b/drivers/gpio/gpio-altera.c
@@ -310,7 +310,8 @@ static int altera_gpio_probe(struct platform_device *pdev)
altera_gc->interrupt_trigger = reg;
ret = gpiochip_irqchip_add(&altera_gc->mmchip.gc, &altera_irq_chip, 0,
- handle_simple_irq, IRQ_TYPE_NONE);
+ altera_gc->interrupt_trigger == IRQ_TYPE_LEVEL_HIGH ?
+ handle_level_irq : handle_simple_irq, IRQ_TYPE_NONE);
if (ret) {
dev_err(&pdev->dev, "could not add irqchip\n");
--
1.8.3.1
Back to linux.kernel | Previous | Next — Next in thread | Find similar | Unroll thread
[PATCH 1/1] gpio: altera: Use handle_level_irq when configured as a level_high Phil Reid <preid@electromag.com.au> - 2017-02-17 10:20 +0100
Re: [PATCH 1/1] gpio: altera: Use handle_level_irq when configured as a level_high Andy Shevchenko <andy.shevchenko@gmail.com> - 2017-02-17 10:30 +0100
Re: [PATCH 1/1] gpio: altera: Use handle_level_irq when configured as a level_high Andy Shevchenko <andy.shevchenko@gmail.com> - 2017-02-17 12:50 +0100
Re: [PATCH 1/1] gpio: altera: Use handle_level_irq when configured as a level_high Phil Reid <preid@electromag.com.au> - 2017-02-17 12:50 +0100
Re: [PATCH 1/1] gpio: altera: Use handle_level_irq when configured as a level_high Linus Walleij <linus.walleij@linaro.org> - 2017-02-23 16:00 +0100
csiph-web