From: "Lothar Waßmann" <LW@KARO-electronics.de>
To: Bryan Wu <cooloney@gmail.com>
Cc: Linux LED Subsystem <linux-leds@vger.kernel.org>,
lkml <linux-kernel@vger.kernel.org>,
Richard Purdie <rpurdie@rpsys.net>
Subject: Re: [PATCH 2/2] leds: trigger: gpio: make ledtrig-gpio useable with GPIO drivers requiring threaded irqs
Date: Fri, 12 Sep 2014 09:09:18 +0200 [thread overview]
Message-ID: <20140912090918.6e860198@ipc1.ka-ro> (raw)
In-Reply-To: <CAK5ve-+BCvfHZ-JrYD_48KYzaZGE0as=eMe0+XPbgh5DfH9qRw@mail.gmail.com>
Hi,
Bryan Wu wrote:
> On Tue, Sep 9, 2014 at 12:40 AM, Lothar Waßmann <LW@karo-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@karo-electronics.de
___________________________________________________________
next prev parent reply other threads:[~2014-09-12 7:09 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-09-09 7:40 make ledtrig-gpio useable with GPIO drivers requiring threaded irqs Lothar Waßmann
2014-09-09 7:40 ` [PATCH 1/2] leds: trigger: gpio: fix warning in gpio trigger for gpios whose accessor function may sleep Lothar Waßmann
2014-09-12 0:13 ` Bryan Wu
2014-09-09 7:40 ` [PATCH 2/2] leds: trigger: gpio: make ledtrig-gpio useable with GPIO drivers requiring threaded irqs Lothar Waßmann
2014-09-12 0:32 ` Bryan Wu
2014-09-12 7:09 ` Lothar Waßmann [this message]
2014-09-12 18:57 ` Bryan Wu
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20140912090918.6e860198@ipc1.ka-ro \
--to=lw@karo-electronics.de \
--cc=cooloney@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-leds@vger.kernel.org \
--cc=rpurdie@rpsys.net \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).