linux-input.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Gabor Balla <gaborwho@gmail.com>
To: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Cc: "linux-input@vger.kernel.org" <linux-input@vger.kernel.org>,
	Benjamin Tissoires <benjamin.tissoires@gmail.com>,
	Stephen Chandler Paul <thatslyude@gmail.com>,
	Nick Bowler <nbowler@draconx.ca>,
	Andrew Duggan <andrew.duggan@gmail.com>
Subject: Re: PROBLEM: Missing events on thinkpad trackpoint buttons
Date: Fri, 21 Aug 2015 01:35:47 +0200	[thread overview]
Message-ID: <CAMmwwr_ZGvMODEHEawV+06tWmtoA5pYZAx1dYX1x4CopybmtqA@mail.gmail.com> (raw)
In-Reply-To: <20150820231339.GA7236@localhost>

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

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;
        else

  reply	other threads:[~2015-08-20 23:35 UTC|newest]

Thread overview: 25+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-08-20 20:50 PROBLEM: Missing events on thinkpad trackpoint buttons Gabor Balla
2015-08-20 21:35 ` Dmitry Torokhov
2015-08-20 22:24   ` Gabor Balla
2015-08-20 22:42     ` Gabor Balla
2015-08-20 22:56     ` Dmitry Torokhov
2015-08-20 23:01       ` Dmitry Torokhov
2015-08-20 23:05         ` Gabor Balla
2015-08-20 23:08           ` Dmitry Torokhov
2015-08-20 23:13             ` Dmitry Torokhov
2015-08-20 23:35               ` Gabor Balla [this message]
2015-08-21  0:06                 ` Dmitry Torokhov
2015-08-24 17:57               ` Dmitry Torokhov
2015-08-24 23:44                 ` Nick Bowler
     [not found]               ` <CAN+gG=H88uVbRun=Vs1r1b8jM=wpnC1285BquFpDsh8HQdr07Q@mail.gmail.com>
2015-09-27 12:14                 ` Benjamin Tissoires
2015-09-28 22:52                   ` Dmitry Torokhov
2015-09-29  0:22                     ` Nick Bowler
2015-09-29  0:26                       ` Dmitry Torokhov
  -- strict thread matches above, loose matches on Subject: below --
2015-08-18  2:31 Nick Bowler
2015-08-18 19:06 ` Benjamin Tissoires
2015-08-19 13:52   ` Benjamin Tissoires
2015-08-19 14:10     ` Nick Bowler
2015-08-19 14:12       ` Benjamin Tissoires
2015-08-19 21:27     ` Dmitry Torokhov
2015-08-19 21:33       ` Stephen Chandler Paul
2015-08-19 21:34       ` Benjamin Tissoires

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=CAMmwwr_ZGvMODEHEawV+06tWmtoA5pYZAx1dYX1x4CopybmtqA@mail.gmail.com \
    --to=gaborwho@gmail.com \
    --cc=andrew.duggan@gmail.com \
    --cc=benjamin.tissoires@gmail.com \
    --cc=dmitry.torokhov@gmail.com \
    --cc=linux-input@vger.kernel.org \
    --cc=nbowler@draconx.ca \
    --cc=thatslyude@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).