[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20121230235759.GA14116@core.coreip.homeip.net>
Date: Sun, 30 Dec 2012 15:57:59 -0800
From: Dmitry Torokhov <dmitry.torokhov@...il.com>
To: Tony Prisk <linux@...sktech.co.nz>
Cc: linux-kernel@...r.kernel.org, linux-arm-kernel@...ts.infradead.org,
vt8500-wm8505-linux-kernel@...glegroups.com,
linux-input@...r.kernel.org
Subject: Re: [PATCH] input: vt8500: Add power button keypad driver
On Mon, Dec 31, 2012 at 12:44:31PM +1300, Tony Prisk wrote:
>
> > > + status = readl(pmc_base + 0x14);
> > > + udelay(100);
> > > + writel(status, pmc_base + 0x14);
> > > +
> > > + if (status & BIT(14)) {
> > > + if (!power_button_pressed) {
> >
> > No need to do this check.
> >
> The hardware generates multiple interrupts when the button is held.
> Without the !power_button_pressed, it will generate multiple pressed
> events without releases, because the timer doesn't get to finish.
Input core will filter out duplicate events anyway though...
And your current way means that timer is never adjusted, so the key will
be released and reported as pressed again if I keep holding it, which is
not correct.
Thanks.
--
Dmitry
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists