Hi, Bryan Wu wrote: > On Tue, Sep 9, 2014 at 12:40 AM, Lothar Waßmann <LW@xxxxxxxxxxxxxxxxxxx> 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@xxxxxxxxxxxxxxxxxxx ___________________________________________________________ -- To unsubscribe from this list: send the line "unsubscribe linux-leds" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html