From: dmitry.torokhov@gmail.com (Dmitry Torokhov)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH] input: vt8500: Add power button keypad driver
Date: Sun, 30 Dec 2012 15:57:59 -0800 [thread overview]
Message-ID: <20121230235759.GA14116@core.coreip.homeip.net> (raw)
In-Reply-To: <1356911071.26227.10.camel@gitbox>
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
prev parent reply other threads:[~2012-12-30 23:57 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-12-30 22:01 [PATCH] input: vt8500: Add power button keypad driver Tony Prisk
2012-12-30 23:25 ` Dmitry Torokhov
2012-12-30 23:44 ` Tony Prisk
2012-12-30 23:57 ` Dmitry Torokhov [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20121230235759.GA14116@core.coreip.homeip.net \
--to=dmitry.torokhov@gmail.com \
--cc=linux-arm-kernel@lists.infradead.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).