lkml.org 
[lkml]   [2016]   [Oct]   [24]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRE: [PATCH] gpio: mpc8xxx: Correct irq handler function
Date

> On Fri, Oct 21, 2016 at 9:31 AM, Liu Gang <Gang.Liu@nxp.com> wrote:
>
> > From the beginning of the gpio-mpc8xxx.c, the "handle_level_irq"
> > has being used to handle GPIO interrupts in the PowerPC/Layerscape
> > platforms. But actually, almost all PowerPC/Layerscape platforms
> > assert an interrupt request upon either a high-to-low change or any
> > change on the state of the signal.
> >
> > So the "handle_level_irq" is not reasonable for PowerPC/Layerscape
> > GPIO interrupt, it should be "handle_edge_irq". Otherwise the system
> > may lost some interrupts from the PIN's state changes.
> >
> > Signed-off-by: Liu Gang <Gang.Liu@nxp.com>
>
> Yes and especially so since this irqchip implements .irq_ack() and unless you
> use the edge handler it will never be called.
>
> Patch applied for fixes, tell me if it also needs to go into stable.
>
[Liu Gang] yes, please also put it into stable. Thanks!

> If you want to look closer at this driver, I think it is possible to simplify it quite a
> bit by using GPIOLIB_IRQCHIP like a few other drivers, for example gpio-pl061.c.
> Patches accepted :)
>
> Yours,
> Linus Walleij
\
 
 \ /
  Last update: 2016-10-24 06:02    [W:0.043 / U:1.460 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site