[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20140912090918.6e860198@ipc1.ka-ro>
Date: Fri, 12 Sep 2014 09:09:18 +0200
From: Lothar Waßmann <LW@...O-electronics.de>
To: Bryan Wu <cooloney@...il.com>
Cc: Linux LED Subsystem <linux-leds@...r.kernel.org>,
lkml <linux-kernel@...r.kernel.org>,
Richard Purdie <rpurdie@...ys.net>
Subject: Re: [PATCH 2/2] leds: trigger: gpio: make ledtrig-gpio useable with
GPIO drivers requiring threaded irqs
Hi,
Bryan Wu wrote:
> On Tue, Sep 9, 2014 at 12:40 AM, Lothar Waßmann <LW@...o-electronics.de> wrote:
> > When trying to use the LED GPIO trigger with e.g. the PCA953x GPIO
> > driver, request_irq() fails with -EINVAL, because the GPIO driver
> > requires a nested interrupt handler.
> >
> > Use request_any_context_irq() to be able to use any GPIO driver as LED
> > trigger.
> >
>
> Hmmm, what about use request_thread_irq() and put the gpio_trig_work()
> in as the thread_func.
>
> Felipe, can you take a look at this?
>
> Also in the first patch:
> Actually in gpio_trig_irq(), it said:
> /* just schedule_work since gpio_get_value can sleep */
> schedule_work(&gpio_data->work);
>
> Then that means we need to call gpio_get_value_can_sleep() in the
> gpio_trig_work() instead of gpio_get_value(), right?
>
That's exactly what my first patch does!
Lothar Waßmann
--
___________________________________________________________
Ka-Ro electronics GmbH | Pascalstraße 22 | D - 52076 Aachen
Phone: +49 2408 1402-0 | Fax: +49 2408 1402-10
Geschäftsführer: Matthias Kaussen
Handelsregistereintrag: Amtsgericht Aachen, HRB 4996
www.karo-electronics.de | info@...o-electronics.de
___________________________________________________________
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists