Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp514735imu; Sat, 15 Dec 2018 01:48:29 -0800 (PST) X-Google-Smtp-Source: AFSGD/UpD8GhupcnhYtLR8okMgC7g3J95VSNcE4KqcnF6c1ORV/JqQ4po9Ek9zZkqgFY54MUk8te X-Received: by 2002:a63:7c41:: with SMTP id l1mr5495278pgn.45.1544867309816; Sat, 15 Dec 2018 01:48:29 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1544867309; cv=none; d=google.com; s=arc-20160816; b=s2Bh4R8Ik7Tee94C7c2JnK+CReepT7Qg+Z3eJCEF1yYlizCFa0co0bfw0bgDjfj9fD umt+EI4ObjebfSmT1ZXkFMqH8DIB4jirJHnljCA8LZRvBEw+f4fUARvDv4+3uJ9ijXib RoTeIkKoqIF7Y4D60+Ks4FNCpC6h3PEkFWNkDwZCIqBrm2a+9m0NtncE9hgGjJd1/yId lNCvQBhb/iEwuhcSKSdvNJHneBJOl6q6dh1v7WI4LtUWv2BMPoLlaVUL9+ER9xGypXh0 CgnUsefncaxwBD/FNYQe4CWI+X7goSRBs61AU/UIIBo9nww3G8a1I/09ucXSm9NHRFrY lm2Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date; bh=jdLXCIbEeHBAvTdwdep8CR5jk1I/yPlAvuUO9bCKX04=; b=WKrNQeFKc5NIDR+4Tp59Vhe/M6iEy6XPdBG4QvnSiibDLzuKhTZsRMTVkULN9fi/RF cFVKQnK/LsSaSrWi//9QAnF763J409egC+6Rko6vN6rzaDVGOOL8fyGqUYZA2erQLvqe an4PztA3Wj/mGNi2eR5HHffcw/gYgu+hP0M4EPH4CJG2ELsfE9iDhfd8sUmiyCYwI7fi 343+2OXf0VrqxW4DifucQ2WbA89coVuoorXEtWBipgIlo5cSUZIjKxVqPu3e/16WNcYv a7u9dmDk5t18/jAk3Rt8u8BE3+ToUF7IJRaOwrA7vymB7lswWLqbtNW7tEs1jpscQSwH 5seA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id d23si6086899pgj.558.2018.12.15.01.48.14; Sat, 15 Dec 2018 01:48:29 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729966AbeLOJrZ (ORCPT + 99 others); Sat, 15 Dec 2018 04:47:25 -0500 Received: from atrey.karlin.mff.cuni.cz ([195.113.26.193]:45296 "EHLO atrey.karlin.mff.cuni.cz" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728731AbeLOJrZ (ORCPT ); Sat, 15 Dec 2018 04:47:25 -0500 Received: by atrey.karlin.mff.cuni.cz (Postfix, from userid 512) id 2937580913; Sat, 15 Dec 2018 10:47:19 +0100 (CET) Date: Sat, 15 Dec 2018 10:47:22 +0100 From: Pavel Machek To: Vojtech Pavlik Cc: kernel list , jikos@suse.cz, linux-input@vger.kernel.org, dmitry.torokhov@gmail.com Subject: Re: [rfd] saving old mice -- button glitching/debouncing Message-ID: <20181215094722.GA5804@amd> References: <20181214232437.GA8310@amd> <20181215085510.GB12930@suse.com> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="pWyiEgJYm5f9v55/" Content-Disposition: inline In-Reply-To: <20181215085510.GB12930@suse.com> User-Agent: Mutt/1.5.23 (2014-03-12) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org --pWyiEgJYm5f9v55/ Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Hi! > > Patch is obviously not ready; but: > >=20 > > a) would it be useful to people >=20 > Probably not. >=20 > Mice already do internal software/hardware debouncing on switches. If you > see duplicate clicks making it all the way to the kernel driver, something > is very wrong with the switch, to the point where it'll soon fail > completely. It seems mice normally survive 2 years under my use. This one has left button repaired and middle button failing... If debouncing gives it one more year, it will be success... > > b) would it be acceptable if done properly? (cmd line option to > > enable, avoiding duplicate/wrong events?) >=20 > 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. Let me gain some experience with the patch. I don't think hardware does as heavy debouncing as you describe. Best regards, =09 Pavel --=20 (english) http://www.livejournal.com/~pavelmachek (cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blo= g.html --pWyiEgJYm5f9v55/ Content-Type: application/pgp-signature; name="signature.asc" Content-Description: Digital signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1 iEYEARECAAYFAlwUzaoACgkQMOfwapXb+vKp9wCgwJowBaO003wnM519XYW0uBW0 4h0An1zQelskdUkoRGIrsQXR1Qg06TwI =4Co/ -----END PGP SIGNATURE----- --pWyiEgJYm5f9v55/--