diff mbox

PROBLEM: Missing events on thinkpad trackpoint buttons

Message ID CAMmwwr_ZGvMODEHEawV+06tWmtoA5pYZAx1dYX1x4CopybmtqA@mail.gmail.com (mailing list archive)
State New, archived
Headers show

Commit Message

Gabor Balla Aug. 20, 2015, 11:35 p.m. UTC
Hi Dmitry,

> How about this one?

It looks fine for me, I've also tested it and it works.
Still, can we do something about synaptics_set_disable_gesture() function too?
Not sure what it does, but it certainly looks like it could break EWmode.
I've included a possible solution.

Regards,
Gabor

        else
--
To unsubscribe from this list: send the line "unsubscribe linux-input" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Comments

Dmitry Torokhov Aug. 21, 2015, 12:06 a.m. UTC | #1
Hi Gabor,

On Thu, Aug 20, 2015 at 4:35 PM, Gabor Balla <gaborwho@gmail.com> wrote:
> Hi Dmitry,
>
>> How about this one?
>
> It looks fine for me, I've also tested it and it works.

Thanks for trying it out!

> Still, can we do something about synaptics_set_disable_gesture() function too?
> Not sure what it does, but it certainly looks like it could break EWmode.
> I've included a possible solution.

As I mentioned this is called from a sysfs attribute and that
attribute is only created when the touchpad is used in relative mode,
so W-bit is guaranteed to be off when this fucntion is running.

Thanks.
diff mbox

Patch

diff --git a/drivers/input/mouse/synaptics.c b/drivers/input/mouse/synaptics.c
index 6025eb4..60ec964 100644
--- a/drivers/input/mouse/synaptics.c
+++ b/drivers/input/mouse/synaptics.c
@@ -519,14 +519,18 @@  static int synaptics_set_mode(struct psmouse *psmouse)
        struct synaptics_data *priv = psmouse->private;

        priv->mode = 0;
-       if (priv->absolute_mode)
+
+       if (priv->absolute_mode) {
                priv->mode |= SYN_BIT_ABSOLUTE_MODE;
-       if (priv->disable_gesture)
+               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 (psmouse->rate >= 80)
                priv->mode |= SYN_BIT_HIGH_RATE;
-       if (SYN_CAP_EXTENDED(priv->capabilities))
-               priv->mode |= SYN_BIT_W_MODE;

        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;