summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlexandr Shadchin <shadchin@cvs.openbsd.org>2011-08-24 15:34:26 +0000
committerAlexandr Shadchin <shadchin@cvs.openbsd.org>2011-08-24 15:34:26 +0000
commitae2325a86b5d1551e417f83a1312f77a9cefff69 (patch)
tree352ec0d05850f6b10aae5c58aa35dd6d9876abf4
parent2638194d986281888258c22490f8087d7b346731 (diff)
revert the last commit. pms_enable_alps() does not guarantee
the accuracy detection ALPS. ok mpi@
-rw-r--r--sys/dev/pckbc/pms.c37
-rw-r--r--sys/dev/pckbc/pmsreg.h7
2 files changed, 2 insertions, 42 deletions
diff --git a/sys/dev/pckbc/pms.c b/sys/dev/pckbc/pms.c
index 3a3ef2ff48d..8991ed2c4ec 100644
--- a/sys/dev/pckbc/pms.c
+++ b/sys/dev/pckbc/pms.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: pms.c,v 1.20 2011/08/22 16:26:42 shadchin Exp $ */
+/* $OpenBSD: pms.c,v 1.21 2011/08/24 15:34:25 shadchin Exp $ */
/* $NetBSD: psm.c,v 1.11 2000/06/05 22:20:57 sommerfeld Exp $ */
/*-
@@ -50,7 +50,6 @@ struct pms_protocol {
#define PMS_STANDARD 0
#define PMS_INTELLI 1
#define PMS_SYNAPTICS 2
-#define PMS_ALPS 3
u_int packetsize;
int (*enable)(struct pms_softc *);
int (*ioctl)(struct pms_softc *, u_long, caddr_t, int, struct proc *);
@@ -151,8 +150,6 @@ int pms_sync_synaptics(struct pms_softc *, int);
void pms_proc_synaptics(struct pms_softc *);
void pms_disable_synaptics(struct pms_softc *);
-int pms_enable_alps(struct pms_softc *);
-
int synaptics_set_mode(struct pms_softc *, int);
int synaptics_query(struct pms_softc *, int, int *);
int synaptics_get_hwinfo(struct pms_softc *);
@@ -211,15 +208,6 @@ const struct pms_protocol pms_protocols[] = {
pms_sync_synaptics,
pms_proc_synaptics,
pms_disable_synaptics
- },
- /* ALPS touchpad - not supported yet */
- {
- PMS_ALPS, 3,
- pms_enable_alps,
- pms_ioctl_mouse,
- pms_sync_mouse,
- pms_proc_mouse,
- NULL
}
};
@@ -395,7 +383,6 @@ pms_sync_mouse(struct pms_softc *sc, int data)
switch (sc->protocol->type) {
case PMS_STANDARD:
- case PMS_ALPS: /* XXX */
if ((data & 0xc0) != 0)
return (-1);
break;
@@ -422,7 +409,6 @@ pms_proc_mouse(struct pms_softc *sc)
switch (sc->protocol->type) {
case PMS_STANDARD:
- case PMS_ALPS: /* XXX */
dz = 0;
break;
case PMS_INTELLI:
@@ -980,24 +966,3 @@ pms_disable_synaptics(struct pms_softc *sc)
synaptics_set_mode(sc, SYNAPTICS_SLEEP_MODE |
SYNAPTICS_DISABLE_GESTURE);
}
-
-int
-pms_enable_alps(struct pms_softc *sc)
-{
- u_char resp[3];
-
- if (pms_set_resolution(sc, 0) ||
- pms_set_scaling(sc, 1) ||
- pms_set_scaling(sc, 1) ||
- pms_set_scaling(sc, 1) ||
- pms_get_status(sc, resp) ||
- resp[0] != PMS_ALPS_MAGIC1 ||
- resp[1] != PMS_ALPS_MAGIC2 ||
- (resp[2] != PMS_ALPS_MAGIC3_1 && resp[2] != PMS_ALPS_MAGIC3_2))
- return (0);
-
- /* XXX reset, ALPS not supported yet */
- pms_reset(sc);
-
- return (1);
-}
diff --git a/sys/dev/pckbc/pmsreg.h b/sys/dev/pckbc/pmsreg.h
index 4df356f2149..1bf2f7da0ec 100644
--- a/sys/dev/pckbc/pmsreg.h
+++ b/sys/dev/pckbc/pmsreg.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: pmsreg.h,v 1.3 2011/08/22 16:26:42 shadchin Exp $ */
+/* $OpenBSD: pmsreg.h,v 1.4 2011/08/24 15:34:25 shadchin Exp $ */
/* $NetBSD: psmreg.h,v 1.1 1998/03/22 15:41:28 drochner Exp $ */
#ifndef SYS_DEV_PCKBC_PMSREG_H
@@ -37,11 +37,6 @@
#define PMS_INTELLI_MAGIC3 80
#define PMS_INTELLI_ID 0x03
-#define PMS_ALPS_MAGIC1 0
-#define PMS_ALPS_MAGIC2 0
-#define PMS_ALPS_MAGIC3_1 10
-#define PMS_ALPS_MAGIC3_2 100
-
/* Synaptics queries */
#define SYNAPTICS_QUE_IDENTIFY 0x00
#define SYNAPTICS_QUE_MODES 0x01