Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/dev/pckbport Extended capability probes can confuse the ...
details: https://anonhg.NetBSD.org/src/rev/ac56d24f6e7e
branches: trunk
changeset: 753254:ac56d24f6e7e
user: plunky <plunky%NetBSD.org@localhost>
date: Sun Mar 21 19:57:05 2010 +0000
description:
Extended capability probes can confuse the passthrough device,
reset the touchpad on enable to cure that.
diffstat:
sys/dev/pckbport/synaptics.c | 20 +++++++++++++++++---
1 files changed, 17 insertions(+), 3 deletions(-)
diffs (50 lines):
diff -r 6a5bf891737a -r ac56d24f6e7e sys/dev/pckbport/synaptics.c
--- a/sys/dev/pckbport/synaptics.c Sun Mar 21 19:55:19 2010 +0000
+++ b/sys/dev/pckbport/synaptics.c Sun Mar 21 19:57:05 2010 +0000
@@ -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).
Home |
Main Index |
Thread Index |
Old Index