linux-input.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] alps: Do not divide trackpoint deltas reported by hardware by 2 for v7 devices
@ 2015-06-04 11:57 Hans de Goede
  0 siblings, 0 replies; only message in thread
From: Hans de Goede @ 2015-06-04 11:57 UTC (permalink / raw)
  To: Dmitry Torokhov
  Cc: Rico Moorman, Peter Hutterer, Benjamin Tissoires, linux-input,
	Hans de Goede, stable

On some v7 devices (e.g. Lenovo-E550) the deltas reported are typically
only in the 0-1 range dividing this by 2 results in a range of 0-0.

And even for v7 devices where this does not lead to making the trackstick
entirely unusable, it makes it twice as slow as before we added v7 support
and were using the ps/2 mouse emulation of the dual point setup.

If some kind of generic slowdown is actually necessary for some devices,
then that belongs in userspace, not in the kernel.

Cc: stable@vger.kernel.org
Reported-and-tested-by: Rico Moorman <rico.moorman@gmail.com>
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
---
 drivers/input/mouse/alps.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/input/mouse/alps.c b/drivers/input/mouse/alps.c
index 9bc4343..c195b3a 100644
--- a/drivers/input/mouse/alps.c
+++ b/drivers/input/mouse/alps.c
@@ -1072,8 +1072,8 @@ static void alps_process_trackstick_packet_v7(struct psmouse *psmouse)
 	middle = (packet[1] & 0x04) >> 2;
 
 	/* Divide 2 since trackpoint's speed is too fast */
-	input_report_rel(dev2, REL_X, (char)x / 2);
-	input_report_rel(dev2, REL_Y, -((char)y / 2));
+	input_report_rel(dev2, REL_X, (char)x);
+	input_report_rel(dev2, REL_Y, -((char)y));
 
 	input_report_key(dev2, BTN_LEFT, left);
 	input_report_key(dev2, BTN_RIGHT, right);
-- 
2.4.2


^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2015-06-04 11:57 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-06-04 11:57 [PATCH] alps: Do not divide trackpoint deltas reported by hardware by 2 for v7 devices Hans de Goede

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).