linux-input.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] input: ALPS - Invert the Y axis and adjust scaling on SS5 tracksticks
@ 2017-01-10  7:35 Dima Ryazanov
  2017-01-16 20:23 ` Dima Ryazanov
  0 siblings, 1 reply; 2+ messages in thread
From: Dima Ryazanov @ 2017-01-10  7:35 UTC (permalink / raw)
  To: linux-input; +Cc: Dima Ryazanov

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


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] input: ALPS - Invert the Y axis and adjust scaling on SS5 tracksticks
  2017-01-10  7:35 [PATCH] input: ALPS - Invert the Y axis and adjust scaling on SS5 tracksticks Dima Ryazanov
@ 2017-01-16 20:23 ` Dima Ryazanov
  0 siblings, 0 replies; 2+ messages in thread
From: Dima Ryazanov @ 2017-01-16 20:23 UTC (permalink / raw)
  To: linux-input; +Cc: Dima Ryazanov

Actually, sorry, disregard this patch.

The Y axis has already been fixed by
47e3a5edc6538d66e470aaed3b7c57255cb37ca1, and the sensitivity should
probably be adjusted in hwdb rather than the driver.

On Mon, Jan 9, 2017 at 11:35 PM, Dima Ryazanov <dima@gmail.com> wrote:
> 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
>

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2017-01-16 20:24 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-01-10  7:35 [PATCH] input: ALPS - Invert the Y axis and adjust scaling on SS5 tracksticks Dima Ryazanov
2017-01-16 20:23 ` Dima Ryazanov

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