From: NeilBrown <neilb@suse.de>
To: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Cc: linux-input@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] Input: twl4030 power button: don't lose presses on resume
Date: Wed, 25 Apr 2012 15:26:03 +1000 [thread overview]
Message-ID: <20120425152603.3d24547f@notabene.brown> (raw)
In-Reply-To: <20120425050919.GB27843@core.coreip.homeip.net>
[-- Attachment #1: Type: text/plain, Size: 1949 bytes --]
On Tue, 24 Apr 2012 22:09:19 -0700 Dmitry Torokhov
<dmitry.torokhov@gmail.com> wrote:
> Hi Neil,
>
> On Wed, Apr 25, 2012 at 12:21:39PM +1000, NeilBrown wrote:
> >
> > If we press and release the power button before the press interrupt is
> > handled - as can happen on resume - we lose the press event so the
> > release event is ignored and we don't know what happened to cause the
> > wakeup.
>
> What kind of latency do you observe?
When I have debugging enabled, hundreds of milliseconds.
When I don't have debugging enabled ... it doesn't tell me, but I'm fairly
sure it is several tens of milliseconds and the button press can be quicker
than that.
If it will help I can try to instrument the driver and get some timings.
>
> >
> > So make sure that each interrupt handled does generate an event.
> > Because twl4030 queues interrupt events we will see two interrupts
> > for a press-release even if we handle the first one later. This means
> > that such a sequence will be reported as two button presses. This
> > is unfortunate but is better than no button presses.
> > Possibly we could set the PENDDIS_MASK to disable queuing of
> > interrupts, but that might adversely affect other interrupt sources.
> >
>
> It looks like we'd have to modify every driver to ensure consistent
> behavior as we do not have any guarantees on how long resume takes.
> Maybe this is something that input core needs to implement?
Well if every driver is buggy....
I don't see how this could be implemented in the input core. And even if it
was, you'd probably need to change each driver to interact with this new
functionality which would be much the same work as changing them to work with
the current functionality....
But maybe I have no imagination - if you can suggest a way that the input core
could support this without changing the drivers, I'm happy to try it out.
Thanks,
NeilBrown
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 828 bytes --]
next prev parent reply other threads:[~2012-04-25 5:26 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-04-25 2:21 [PATCH] Input: twl4030 power button: don't lose presses on resume NeilBrown
2012-04-25 5:09 ` Dmitry Torokhov
2012-04-25 5:26 ` NeilBrown [this message]
2012-04-25 16:56 ` anish kumar
2012-04-25 20:58 ` NeilBrown
2012-04-26 3:06 ` anish singh
2012-04-26 7:14 ` NeilBrown
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=20120425152603.3d24547f@notabene.brown \
--to=neilb@suse.de \
--cc=dmitry.torokhov@gmail.com \
--cc=linux-input@vger.kernel.org \
--cc=linux-kernel@vger.kernel.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