]> git.karo-electronics.de Git - karo-tx-linux.git/commit
Input: synaptics - adjust threshold for treating position values as negative
authorSeth Forshee <seth.forshee@canonical.com>
Fri, 28 Sep 2012 17:29:21 +0000 (10:29 -0700)
committerBen Hutchings <ben@decadent.org.uk>
Wed, 17 Oct 2012 02:49:11 +0000 (03:49 +0100)
commit0c53cadfdcd93f76f37fd1ad45e3fa8dacc73bad
tree9a59a35c33b021cee6155a38bb33b343013a21b6
parentaeb048baa36390d8550282a305aabc057a5718cc
Input: synaptics - adjust threshold for treating position values as negative

commit 824efd37415961d38821ecbd9694e213fb2e8b32 upstream.

Commit c039450 (Input: synaptics - handle out of bounds values from the
hardware) caused any hardware reported values over 7167 to be treated as
a wrapped-around negative value. It turns out that some firmware uses
the value 8176 to indicate a finger near the edge of the touchpad whose
actual position cannot be determined. This value now gets treated as
negative, which can cause pointer jumps and broken edge scrolling on
these machines.

I only know of one touchpad which reports negative values, and this
hardware never reports any value lower than -8 (i.e. 8184). Moving the
threshold for treating a value as negative up to 8176 should work fine
then for any hardware we currently know about, and since we're dealing
with unspecified behavior it's probably the best we can do. The special
8176 value is also likely to result in sudden jumps in position, so
let's also clamp this to the maximum specified value for the axis.

BugLink: http://bugs.launchpad.net/bugs/1046512
https://bugzilla.kernel.org/show_bug.cgi?id=46371

Signed-off-by: Seth Forshee <seth.forshee@canonical.com>
Reviewed-by: Daniel Kurtz <djkurtz@chromium.org>
Tested-by: Alan Swanson <swanson@ukfsn.org>
Tested-by: Arteom <arutemus@gmail.com>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
drivers/input/mouse/synaptics.c