[PATCH 3/8] Guest protocol switch in synaptics

Dmitry Torokhov
2004-09-29T06:51:04Z

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

ChangeSet@1.1949, 2004-09-28 00:07:41-05:00, dtor_core@ameritech.net
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@mail.ru>

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");
}
}