All of lore.kernel.org
 help / color / mirror / Atom feed
From: Pavel Machek <pavel@ucw.cz>
To: Vojtech Pavlik <vojtech@suse.cz>
Cc: kernel list <linux-kernel@vger.kernel.org>,
	jikos@suse.cz, linux-input@vger.kernel.org,
	dmitry.torokhov@gmail.com
Subject: Re: [rfd] saving old mice -- button glitching/debouncing
Date: Sat, 15 Dec 2018 11:29:02 +0100	[thread overview]
Message-ID: <20181215102902.GA8022@amd> (raw)
In-Reply-To: <20181215101221.GA23879@suse.com>

[-- Attachment #1: Type: text/plain, Size: 1336 bytes --]

On Sat 2018-12-15 11:12:21, Vojtech Pavlik wrote:
> On Sat, Dec 15, 2018 at 10:47:22AM +0100, Pavel Machek wrote:
> 
> > > > b) would it be acceptable if done properly? (cmd line option to
> > > > enable, avoiding duplicate/wrong events?)
> > > 
> > > Well, for one, you shouldn't be using a timer, all the debouncing can be
> > > done by math on the event timestamps.
> > 
> > Not... really, right? You need to send an release some time after
> > button indicates release if bounce did not happen. It is similar to
> > autorepeat needing a timer.
> 
> You can send the first release and ignore all presses and releases in a
> time window after that.

I could, and it would work for glitches on release, but that would do
very bad things if switch glitched on press, right?

"XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX XX           " ->
"XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX              " ... ok

"XX XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX..." ->
"XX                                  ..." ... bad idea. [Maybe could be
detected with "XX " being unusually short?]

But I believe I see 

"XXXXXXXXXXXXXXXXXXXXXXXXXX XXXXXXXXXXXXXXXXXXXXXXX" on X220 device, too.

									Pavel
-- 
(english) http://www.livejournal.com/~pavelmachek
(cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html

[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 181 bytes --]

  reply	other threads:[~2018-12-15 10:29 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-12-14 23:24 [rfd] saving old mice -- button glitching/debouncing Pavel Machek
2018-12-15  0:19 ` Dmitry Torokhov
2018-12-15  8:55 ` Vojtech Pavlik
2018-12-15  9:47   ` Pavel Machek
2018-12-15 10:12     ` Vojtech Pavlik
2018-12-15 10:29       ` Pavel Machek [this message]
2018-12-18 15:26 ` kbuild test robot

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=20181215102902.GA8022@amd \
    --to=pavel@ucw.cz \
    --cc=dmitry.torokhov@gmail.com \
    --cc=jikos@suse.cz \
    --cc=linux-input@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=vojtech@suse.cz \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.