From 529d40853cd4ccb6b5e3b7080128fc4769eb7ea9 Mon Sep 17 00:00:00 2001 From: bru Date: Mon, 29 Jan 2018 21:54:11 +0000 Subject: [PATCH] pms: minor cleanups in the alps code. 1. Update the ALPS_*_BEZEL values, which don't match the actual limits accurately. The new values are used by Linux for all models with the protocols "V1" and "V2". 2. Models with the ID 0x7331 are not supported properly, remove it from the list. 3. Report to wsmouse that multiple contacts aren't recognized. --- sys/dev/pckbc/pms.c | 6 ++++-- sys/dev/pckbc/pmsreg.h | 10 +++++----- 2 files changed, 9 insertions(+), 7 deletions(-) diff --git a/sys/dev/pckbc/pms.c b/sys/dev/pckbc/pms.c index ed2249bfad1..0ef5715a136 100644 --- a/sys/dev/pckbc/pms.c +++ b/sys/dev/pckbc/pms.c @@ -1,4 +1,4 @@ -/* $OpenBSD: pms.c,v 1.84 2017/12/04 14:56:47 robert Exp $ */ +/* $OpenBSD: pms.c,v 1.85 2018/01/29 21:54:11 bru Exp $ */ /* $NetBSD: psm.c,v 1.11 2000/06/05 22:20:57 sommerfeld Exp $ */ /*- @@ -215,7 +215,6 @@ static const struct alps_model { { 0x7321, 0xf8, ALPS_GLIDEPOINT }, { 0x7322, 0xf8, ALPS_GLIDEPOINT }, { 0x7325, 0xcf, ALPS_GLIDEPOINT }, - { 0x7331, 0x8f, ALPS_DUALPOINT }, #if 0 /* * This model has a clitpad sending almost compatible PS2 @@ -225,6 +224,8 @@ static const struct alps_model { { 0x633b, 0xf8, ALPS_DUALPOINT | ALPS_PASSTHROUGH }, { 0x7326, 0, 0 }, /* XXX Uses unknown v3 protocol */ + + { 0x7331, 0x8f, ALPS_DUALPOINT }, /* not supported */ #endif }; @@ -1422,6 +1423,7 @@ alps_get_hwinfo(struct pms_softc *sc) hw->y_min = ALPS_YMIN_BEZEL; hw->x_max = ALPS_XMAX_BEZEL; hw->y_max = ALPS_YMAX_BEZEL; + hw->contacts_max = 1; return (0); } diff --git a/sys/dev/pckbc/pmsreg.h b/sys/dev/pckbc/pmsreg.h index 6aafdfdaea1..f365586e390 100644 --- a/sys/dev/pckbc/pmsreg.h +++ b/sys/dev/pckbc/pmsreg.h @@ -1,4 +1,4 @@ -/* $OpenBSD: pmsreg.h,v 1.14 2017/08/25 19:44:21 bru Exp $ */ +/* $OpenBSD: pmsreg.h,v 1.15 2018/01/29 21:54:11 bru Exp $ */ /* $NetBSD: psmreg.h,v 1.1 1998/03/22 15:41:28 drochner Exp $ */ #ifndef SYS_DEV_PCKBC_PMSREG_H @@ -157,10 +157,10 @@ #define SYNAPTICS_YMIN_BEZEL 1408 #define SYNAPTICS_YMAX_BEZEL 4448 -#define ALPS_XMIN_BEZEL 130 -#define ALPS_XMAX_BEZEL 840 -#define ALPS_YMIN_BEZEL 130 -#define ALPS_YMAX_BEZEL 640 +#define ALPS_XMIN_BEZEL 0 +#define ALPS_XMAX_BEZEL 1023 +#define ALPS_YMIN_BEZEL 0 +#define ALPS_YMAX_BEZEL 767 #define ALPS_XSEC_BEZEL 768 #define ALPS_YSEC_BEZEL 512 -- 2.20.1