Thread (13 messages) 13 messages, 3 authors, 2015-08-24

Re: PROBLEM: Missing events on thinkpad trackpoint buttons

From: Gabor Balla <hidden>
Date: 2015-08-20 22:42:15
Subsystem: input (keyboard, mouse, joystick, touchscreen) drivers, the rest · Maintainers: Dmitry Torokhov, Linus Torvalds

Hi Dmitry,

I've prepared another possible fix, that checks the current mode for Wmode bit.

Regards,
Gabor
diff --git a/drivers/input/mouse/synaptics.c b/drivers/input/mouse/synaptics.c
index 6025eb4..7ec72a6 100644
--- a/drivers/input/mouse/synaptics.c
+++ b/drivers/input/mouse/synaptics.c
@@ -519,15 +519,19 @@ static int synaptics_set_mode(struct psmouse *psmouse)
        struct synaptics_data *priv = psmouse->private;

        priv->mode = 0;
+
        if (priv->absolute_mode)
                priv->mode |= SYN_BIT_ABSOLUTE_MODE;
-       if (priv->disable_gesture)
-               priv->mode |= SYN_BIT_DISABLE_GESTURE;
+
        if (psmouse->rate >= 80)
                priv->mode |= SYN_BIT_HIGH_RATE;
+
        if (SYN_CAP_EXTENDED(priv->capabilities))
                priv->mode |= SYN_BIT_W_MODE;

+       if (!SYN_MODE_WMODE(priv->mode) && priv->disable_gesture)
+               priv->mode |= SYN_BIT_DISABLE_GESTURE;
+
        if (synaptics_mode_cmd(psmouse, priv->mode))
                return -1;
@@ -1280,6 +1284,10 @@ static ssize_t
synaptics_set_disable_gesture(struct psmouse *psmouse,
                return len;

        priv->disable_gesture = value;
+
+       if (SYN_MODE_WMODE(priv->mode))
+               return len;
+
        if (value)
                priv->mode |= SYN_BIT_DISABLE_GESTURE;
        else
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help