[PATCH 43/44] Enable relative mode and gestures if Synaptics uses non-native protocol

From: Vojtech Pavlik
Date: Tue Mar 16 2004 - 11:42:09 EST


You can pull this changeset from:
bk://kernel.bkbits.net/vojtech/input

===================================================================

ChangeSet@xxxxxxxxxxxx, 2004-03-11 02:27:59-05:00, dtor_core@xxxxxxxxxxxxx
Input: if Synaptics' absolute mode is disabled make sure that
touchpad is reset back to relative mode and gestures
(taps) are enabled


psmouse-base.c | 4 ++++
synaptics.c | 8 +++++++-
synaptics.h | 1 +
3 files changed, 12 insertions(+), 1 deletion(-)

===================================================================

diff -Nru a/drivers/input/mouse/psmouse-base.c b/drivers/input/mouse/psmouse-base.c
--- a/drivers/input/mouse/psmouse-base.c Tue Mar 16 13:17:26 2004
+++ b/drivers/input/mouse/psmouse-base.c Tue Mar 16 13:17:26 2004
@@ -389,6 +389,10 @@
*/
psmouse_max_proto = PSMOUSE_IMEX;
}
+/*
+ * Make sure that touchpad is in relative mode, gestures (taps) are enabled
+ */
+ synaptics_reset(psmouse);
}

if (psmouse_max_proto > PSMOUSE_IMEX && genius_detect(psmouse)) {
diff -Nru a/drivers/input/mouse/synaptics.c b/drivers/input/mouse/synaptics.c
--- a/drivers/input/mouse/synaptics.c Tue Mar 16 13:17:26 2004
+++ b/drivers/input/mouse/synaptics.c Tue Mar 16 13:17:26 2004
@@ -357,9 +357,15 @@
clear_bit(REL_Y, dev->relbit);
}

-static void synaptics_disconnect(struct psmouse *psmouse)
+void synaptics_reset(struct psmouse *psmouse)
{
+ /* reset touchpad back to relative mode, gestures enabled */
synaptics_mode_cmd(psmouse, 0);
+}
+
+static void synaptics_disconnect(struct psmouse *psmouse)
+{
+ synaptics_reset(psmouse);
kfree(psmouse->private);
}

diff -Nru a/drivers/input/mouse/synaptics.h b/drivers/input/mouse/synaptics.h
--- a/drivers/input/mouse/synaptics.h Tue Mar 16 13:17:26 2004
+++ b/drivers/input/mouse/synaptics.h Tue Mar 16 13:17:26 2004
@@ -12,6 +12,7 @@
extern void synaptics_process_byte(struct psmouse *psmouse, struct pt_regs *regs);
extern int synaptics_detect(struct psmouse *psmouse);
extern int synaptics_init(struct psmouse *psmouse);
+extern void synaptics_reset(struct psmouse *psmouse);

/* synaptics queries */
#define SYN_QUE_IDENTIFY 0x00

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/