linux-input.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Dima Ryazanov <dima@gmail.com>
To: linux-input@vger.kernel.org
Cc: Dima Ryazanov <dima@gmail.com>
Subject: [PATCH] input: ALPS - Invert the Y axis and adjust scaling on SS5 tracksticks
Date: Mon,  9 Jan 2017 23:35:55 -0800	[thread overview]
Message-ID: <20170110073555.31004-1-dima@gmail.com> (raw)

This patch fixes the trackstick on my Dell Latitude E7470. Currently, it's
upside down and too fast (that is, much faster than when using the generic
PS/2 driver).

It also matches the trackpoint logic in alps_process_packet_v6.
---
(I'm aware that scaling in the driver is not ideal - but at least the vertical
orientation should be fixed.)

Signed-off-by: Dima Ryazanov <dima@gmail.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 328edc8..5fa7a15 100644
--- a/drivers/input/mouse/alps.c
+++ b/drivers/input/mouse/alps.c
@@ -1346,8 +1346,8 @@ static void alps_process_packet_ss4_v2(struct psmouse *psmouse)
 			return;
 		}
 
-		input_report_rel(dev2, REL_X, SS4_TS_X_V2(packet));
-		input_report_rel(dev2, REL_Y, SS4_TS_Y_V2(packet));
+		input_report_rel(dev2, REL_X, SS4_TS_X_V2(packet) / 4);
+		input_report_rel(dev2, REL_Y, -SS4_TS_Y_V2(packet) / 4);
 		input_report_abs(dev2, ABS_PRESSURE, SS4_TS_Z_V2(packet));
 
 		input_report_key(dev2, BTN_LEFT, f->ts_left);
-- 
2.9.3


             reply	other threads:[~2017-01-10  7:36 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-01-10  7:35 Dima Ryazanov [this message]
2017-01-16 20:23 ` [PATCH] input: ALPS - Invert the Y axis and adjust scaling on SS5 tracksticks Dima Ryazanov

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=20170110073555.31004-1-dima@gmail.com \
    --to=dima@gmail.com \
    --cc=linux-input@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;
as well as URLs for NNTP newsgroup(s).