Module Name:    src
Committed By:   plunky
Date:           Sun Mar 21 20:04:43 UTC 2010

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

Log Message:
send the SET_SCALE11 command before the 'sliced' command as per the
Linux driver (and elantech(4)), via PR kern/42853


To generate a diff of this commit:
cvs rdiff -u -r1.23 -r1.24 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.23 src/sys/dev/pckbport/synaptics.c:1.24
--- src/sys/dev/pckbport/synaptics.c:1.23	Sun Mar 21 19:57:05 2010
+++ src/sys/dev/pckbport/synaptics.c	Sun Mar 21 20:04:43 2010
@@ -1,4 +1,4 @@
-/*	$NetBSD: synaptics.c,v 1.23 2010/03/21 19:57:05 plunky Exp $	*/
+/*	$NetBSD: synaptics.c,v 1.24 2010/03/21 20:04:43 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.23 2010/03/21 19:57:05 plunky Exp $");
+__KERNEL_RCSID(0, "$NetBSD: synaptics.c,v 1.24 2010/03/21 20:04:43 plunky Exp $");
 
 #include <sys/param.h>
 #include <sys/systm.h>
@@ -630,13 +630,16 @@
 	u_char cmd[2];
 	int res;
 
+	cmd[0] = PMS_SET_SCALE11;
+	res = pckbport_poll_cmd(tag, slot, cmd, 1, 0, NULL, 0);
+
 	/*
 	 * Need to send 4 Set Resolution commands, with the argument
 	 * encoded in the bottom most 2 bits.
 	 */
 	cmd[0] = PMS_SET_RES;
 	cmd[1] = syn_cmd >> 6;
-	res = pckbport_poll_cmd(tag, slot, cmd, 2, 0, NULL, 0);
+	res |= pckbport_poll_cmd(tag, slot, cmd, 2, 0, NULL, 0);
 
 	cmd[0] = PMS_SET_RES;
 	cmd[1] = (syn_cmd & 0x30) >> 4;

Reply via email to