Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/dev/pckbport Correct and improve some comments. Collect...
details: https://anonhg.NetBSD.org/src/rev/d2e0286abe70
branches: trunk
changeset: 769448:d2e0286abe70
user: jakllsch <jakllsch%NetBSD.org@localhost>
date: Sat Sep 10 18:38:20 2011 +0000
description:
Correct and improve some comments. Collect unused variables. Add a define.
diffstat:
sys/dev/pckbport/synaptics.c | 12 ++++++------
sys/dev/pckbport/synapticsreg.h | 4 +++-
sys/dev/pckbport/synapticsvar.h | 5 ++---
3 files changed, 11 insertions(+), 10 deletions(-)
diffs (97 lines):
diff -r 9e2fd1119329 -r d2e0286abe70 sys/dev/pckbport/synaptics.c
--- a/sys/dev/pckbport/synaptics.c Sat Sep 10 18:35:28 2011 +0000
+++ b/sys/dev/pckbport/synaptics.c Sat Sep 10 18:38:20 2011 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: synaptics.c,v 1.27 2011/09/09 14:29:47 jakllsch Exp $ */
+/* $NetBSD: synaptics.c,v 1.28 2011/09/10 18:38:20 jakllsch 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.27 2011/09/09 14:29:47 jakllsch Exp $");
+__KERNEL_RCSID(0, "$NetBSD: synaptics.c,v 1.28 2011/09/10 18:38:20 jakllsch Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@@ -93,7 +93,7 @@
static void pms_sysctl_synaptics(struct sysctllog **);
static int pms_sysctl_synaptics_verify(SYSCTLFN_ARGS);
-/* Controled by sysctl. */
+/* Controlled by sysctl. */
static int synaptics_up_down_emul = 2;
static int synaptics_up_down_motion_delta = 1;
static int synaptics_gesture_move = 200;
@@ -136,7 +136,7 @@
{
struct pms_softc *psc = vsc;
struct synaptics_softc *sc = &psc->u.synaptics;
- u_char cmd[2], resp[3];
+ u_char cmd[1], resp[3];
int res, ver_minor, ver_major;
struct sysctllog *clog = NULL;
@@ -724,7 +724,7 @@
struct timeval diff;
if (!psc->sc_enabled) {
- /* Interrupts are not expected. Discard the byte. */
+ /* Interrupts are not expected. Discard the byte. */
return;
}
@@ -775,7 +775,7 @@
if ((psc->packet[0] & 0xfc) == 0x84 &&
(psc->packet[3] & 0xcc) == 0xc4) {
- /* PS/2 passthrough */
+ /* W = SYNAPTICS_WIDTH_PASSTHROUGH, PS/2 passthrough */
pms_synaptics_passthrough(psc);
} else {
pms_synaptics_parse(psc);
diff -r 9e2fd1119329 -r d2e0286abe70 sys/dev/pckbport/synapticsreg.h
--- a/sys/dev/pckbport/synapticsreg.h Sat Sep 10 18:35:28 2011 +0000
+++ b/sys/dev/pckbport/synapticsreg.h Sat Sep 10 18:38:20 2011 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: synapticsreg.h,v 1.6 2010/03/21 19:53:52 plunky Exp $ */
+/* $NetBSD: synapticsreg.h,v 1.7 2011/09/10 18:38:20 jakllsch Exp $ */
/*
* Copyright (c) 2005, Steve C. Woodford
@@ -95,6 +95,8 @@
#define SYNAPTICS_WIDTH_TWO_FINGERS 0
#define SYNAPTICS_WIDTH_THREE_OR_MORE 1
#define SYNAPTICS_WIDTH_PEN 2
+#define SYNAPTICS_WIDTH_ADVANCEDGESTURE 2
+#define SYNAPTICS_WIDTH_PASSTHROUGH 3
#define SYNAPTICS_WIDTH_FINGER_MIN 4
#define SYNAPTICS_WIDTH_FINGER_NORMAL 5
#define SYNAPTICS_WIDTH_FINGER_MAX 7
diff -r 9e2fd1119329 -r d2e0286abe70 sys/dev/pckbport/synapticsvar.h
--- a/sys/dev/pckbport/synapticsvar.h Sat Sep 10 18:35:28 2011 +0000
+++ b/sys/dev/pckbport/synapticsvar.h Sat Sep 10 18:38:20 2011 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: synapticsvar.h,v 1.4 2005/12/11 12:23:22 christos Exp $ */
+/* $NetBSD: synapticsvar.h,v 1.5 2011/09/10 18:38:20 jakllsch Exp $ */
/*
* Copyright (c) 2005, Steve C. Woodford
@@ -39,14 +39,13 @@
#define _DEV_PCKBCPORT_SYNAPTICSVAR_H_
struct synaptics_softc {
- struct proc *syn_thread;
int caps;
int flags;
#define SYN_FLAG_HAS_MIDDLE_BUTTON (1 << 0)
#define SYN_FLAG_HAS_BUTTONS_4_5 (1 << 1)
#define SYN_FLAG_HAS_UP_DOWN_BUTTONS (1 << 2)
-#define SYN_FLAG_HAS_PASSTHROUGH (1 << 3) /* Not yet supported */
+#define SYN_FLAG_HAS_PASSTHROUGH (1 << 3)
#define SYN_FLAG_HAS_PALM_DETECT (1 << 4)
#define SYN_FLAG_HAS_MULTI_FINGER (1 << 5)
Home |
Main Index |
Thread Index |
Old Index