Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/dev/pckbport send the SET_SCALE11 command before the 'sl...



details:   https://anonhg.NetBSD.org/src/rev/9801e71d7357
branches:  trunk
changeset: 753255:9801e71d7357
user:      plunky <plunky%NetBSD.org@localhost>
date:      Sun Mar 21 20:04:43 2010 +0000

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

diffstat:

 sys/dev/pckbport/synaptics.c |  9 ++++++---
 1 files changed, 6 insertions(+), 3 deletions(-)

diffs (36 lines):

diff -r ac56d24f6e7e -r 9801e71d7357 sys/dev/pckbport/synaptics.c
--- a/sys/dev/pckbport/synaptics.c      Sun Mar 21 19:57:05 2010 +0000
+++ b/sys/dev/pckbport/synaptics.c      Sun Mar 21 20:04:43 2010 +0000
@@ -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;



Home | Main Index | Thread Index | Old Index