Re: [PATCH 2/2] Input: omap-keypad: Fix idle configration to not block SoC idle states
From: Tony Lindgren
Date: Mon Dec 03 2018 - 18:12:59 EST
Hi,
* Dmitry Torokhov <dmitry.torokhov@xxxxxxxxx> [181203 19:24]:
> On Sun, Dec 02, 2018 at 05:29:33PM -0800, Tony Lindgren wrote:
...
> > Note that we now must also disable OMAP4_DEF_IRQENABLE_LONGKEY as it
> > should not be used together with debounce according to the TRM.
The above statement is no longer true, it's left over from an
earlier version of this fix, so will drop it.
> > --- a/drivers/input/keyboard/omap4-keypad.c
> > +++ b/drivers/input/keyboard/omap4-keypad.c
> > @@ -127,9 +128,11 @@ static irqreturn_t omap4_keypad_irq_handler(int irq, void *dev_id)
> > struct omap4_keypad *keypad_data = dev_id;
> >
> > if (kbd_read_irqreg(keypad_data, OMAP4_KBD_IRQSTATUS)) {
> > - /* Disable interrupts */
> > + /* Disable interrupts and wake-up events */
> > kbd_write_irqreg(keypad_data, OMAP4_KBD_IRQENABLE,
> > OMAP4_VAL_IRQDISABLE);
>
> I wonder, do we need to turn off interrupts at keyboard controller
> level, or we should simply use IRQF_ONESHOT?
Oh that's a good idea and seems to work nicely :)
> > + kbd_writel(keypad_data, OMAP4_KBD_WAKEUPENABLE, 0);
>
> So we are saying that disabling wakeup for the time between hard
> interrupt firing, and when interrupt thread runs, makes much difference?
> It is surprising to me... How long does it take to schedule interrupt
> thread?
Nope, you're right. Updated patch below.
Regards,
Tony
8< --------------------