[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <CACRpkda=w8a8sP-h6_0_NGPyMGjUAUMH7m26+dGPX0AEP+b6AA@mail.gmail.com>
Date: Thu, 23 Feb 2017 15:52:37 +0100
From: Linus Walleij <linus.walleij@...aro.org>
To: Phil Reid <preid@...ctromag.com.au>
Cc: Tien Hock Loh <thloh@...era.com>,
Alexandre Courbot <gnurou@...il.com>,
"linux-gpio@...r.kernel.org" <linux-gpio@...r.kernel.org>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH 1/1] gpio: altera: Use handle_level_irq when configured as
a level_high
On Fri, Feb 17, 2017 at 10:12 AM, Phil Reid <preid@...ctromag.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
Powered by blists - more mailing lists