[PATCH 3/8] Guest protocol switch in synaptics

From: Dmitry Torokhov
Date: Wed Sep 29 2004 - 02:09:35 EST



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


ChangeSet@xxxxxx, 2004-09-28 00:07:41-05:00, dtor_core@xxxxxxxxxxxxx
Input: synaptics - not only switch to 4-byte client protocol
but also revert to 3-byte mode if client selected lower
protocol.

Signed-off-by: Dmitry Torokhov <dtor@xxxxxxx>


synaptics.c | 10 +++++++---
1 files changed, 7 insertions(+), 3 deletions(-)


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



diff -Nru a/drivers/input/mouse/synaptics.c b/drivers/input/mouse/synaptics.c
--- a/drivers/input/mouse/synaptics.c 2004-09-29 01:16:30 -05:00
+++ b/drivers/input/mouse/synaptics.c 2004-09-29 01:16:30 -05:00
@@ -264,10 +264,14 @@
struct synaptics_data *priv = psmouse->private;

/* adjust the touchpad to child's choice of protocol */
- if (child && child->type >= PSMOUSE_GENPS) {
- priv->mode |= SYN_BIT_FOUR_BYTE_CLIENT;
+ if (child) {
+ if (child->type >= PSMOUSE_GENPS)
+ priv->mode |= SYN_BIT_FOUR_BYTE_CLIENT;
+ else
+ priv->mode &= ~SYN_BIT_FOUR_BYTE_CLIENT;
+
if (synaptics_mode_cmd(psmouse, priv->mode))
- printk(KERN_INFO "synaptics: failed to enable 4-byte guest protocol\n");
+ printk(KERN_INFO "synaptics: failed to switch guest protocol\n");
}
}

-
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/