Module Name:    src
Committed By:   plunky
Date:           Sun Mar 21 19:57:05 UTC 2010

Modified Files:
        src/sys/dev/pckbport: synaptics.c

Log Message:
Extended capability probes can confuse the passthrough device,
reset the touchpad on enable to cure that.


To generate a diff of this commit:
cvs rdiff -u -r1.22 -r1.23 src/sys/dev/pckbport/synaptics.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/dev/pckbport/synaptics.c
diff -u src/sys/dev/pckbport/synaptics.c:1.22 src/sys/dev/pckbport/synaptics.c:1.23
--- src/sys/dev/pckbport/synaptics.c:1.22	Sun Mar 21 19:53:52 2010
+++ src/sys/dev/pckbport/synaptics.c	Sun Mar 21 19:57:05 2010
@@ -1,4 +1,4 @@
-/*	$NetBSD: synaptics.c,v 1.22 2010/03/21 19:53:52 plunky Exp $	*/
+/*	$NetBSD: synaptics.c,v 1.23 2010/03/21 19:57:05 plunky Exp $	*/
 
 /*
  * Copyright (c) 2005, Steve C. Woodford
@@ -48,7 +48,7 @@
 #include "opt_pms.h"
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: synaptics.c,v 1.22 2010/03/21 19:53:52 plunky Exp $");
+__KERNEL_RCSID(0, "$NetBSD: synaptics.c,v 1.23 2010/03/21 19:57:05 plunky Exp $");
 
 #include <sys/param.h>
 #include <sys/systm.h>
@@ -241,6 +241,10 @@
 		const char comma[] = ", ";
 		const char *sep = "";
 		aprint_normal_dev(psc->sc_dev, "");
+		if (sc->flags & SYN_FLAG_HAS_PASSTHROUGH) {
+			aprint_normal("%sPassthrough", sep);
+			sep = comma;
+		}
 		if (sc->flags & SYN_FLAG_HAS_MIDDLE_BUTTON) {
 			aprint_normal("%sMiddle button", sep);
 			sep = comma;
@@ -276,9 +280,19 @@
 {
 	struct pms_softc *psc = vsc;
 	struct synaptics_softc *sc = &psc->u.synaptics;
-	u_char cmd[2];
+	u_char cmd[2], resp[2];
 	int res;
 
+	if (sc->flags & SYN_FLAG_HAS_PASSTHROUGH) {
+		/* 
+		 * Extended capability probes can confuse the passthrough device;
+		 * reset the touchpad now to cure that.
+		 */
+		cmd[0] = PMS_RESET;
+		res = pckbport_poll_cmd(psc->sc_kbctag, psc->sc_kbcslot, cmd,
+		    1, 2, resp, 1);
+	}
+
 	/*
 	 * Enable Absolute mode with W (width) reporting, and set
 	 * the packet rate to maximum (80 packets per second).

Reply via email to