Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1586940

Re: [PATCH 1/1] gpio: altera: Use handle_level_irq when configured as a level_high

From Linus Walleij <linus.walleij@linaro.org>
Newsgroups linux.kernel
Subject Re: [PATCH 1/1] gpio: altera: Use handle_level_irq when configured as a level_high
Date 2017-02-23 16:00 +0100
Message-ID <te32a-2EY-25@gated-at.bofh.it> (permalink)
References <tbMRQ-2p0-13@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


On Fri, Feb 17, 2017 at 10:12 AM, Phil Reid <preid@electromag.com.au> wrote:

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

I would say: set it to handle_bad_irq() for everything and then set it
to handle_level_irq() or handle_simple_irq() in the .set_type() function
using the rq_set_handler_locked() callback like everyone else,
nicely reflecting the synthesized trigger type.

I think that would work?

Yours,
Linus Walleij

Back to linux.kernel | Previous | NextPrevious in thread | Find similar | Unroll thread


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