Re: [PATCH 2/3] gpio: zynq: Fixed broken wakeup implementation
From: SÃren Brinkmann
Date: Thu Sep 04 2014 - 12:46:08 EST
On Thu, 2014-09-04 at 06:27PM +0200, Linus Walleij wrote:
> On Fri, Aug 29, 2014 at 7:58 PM, Soren Brinkmann
> <soren.brinkmann@xxxxxxxxxx> wrote:
> > From: Ezra Savard <ezra.savard@xxxxxxxxxx>
> > Use of unmask/mask in set_wake was an incorrect implementation. The new
> > implementation correctly sets wakeup for the gpio chip's IRQ so the gpio chip
> > will not sleep while wakeup-enabled gpio are in use.
> > Signed-off-by: Ezra Savard <ezra.savard@xxxxxxxxxx>
> > Reviewed-by: Soren Brinkmann <soren.brinkmann@xxxxxxxxxx>
> Patch applied.
> However the problems seems quite generic.
> Do you see this kind of error in other GPIO drivers?
> IRQchip semantics always make me nervous.
Our implementation was just completely flawed. It did work with our
limited tests using the sysfs interface. But once we started with the
gpio_keys things fell apart. The set_wake did mask/unmask IRQs, which
is clearly the job of the respective mask/unmask function of a gpiochip.
After we found that, we looked at a few other drivers and designed this
So, the core part was to do the right thing in set_wake. Once that was
done, the runtime PM callbacks needed some realignment to determine
whether GPIO is a wakeup device or not.
So, this was really just a gpio-zynq problem, not really generic.
Thanks for applying. I'll post the gpiolib-sysfs patch on its own in a
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/