linux-input.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Hans de Goede <hdegoede@redhat.com>
To: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Cc: Peter Hutterer <peter.hutterer@redhat.com>,
	Benjamin Tissoires <btissoir@redhat.com>,
	linux-input@vger.kernel.org, Hans de Goede <hdegoede@redhat.com>
Subject: [PATCH 5/7] alps: Do not use input-mt finger tracking for semi-mt devices
Date: Fri, 24 Apr 2015 16:48:54 +0200	[thread overview]
Message-ID: <1429886936-24587-6-git-send-email-hdegoede@redhat.com> (raw)
In-Reply-To: <1429886936-24587-1-git-send-email-hdegoede@redhat.com>

With the recent process_bitmap() changes all semi-mt devices always report
the first finger down in slot 0, so stop using input-mt finger tracking
for these.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
---
 drivers/input/mouse/alps.c | 8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)

diff --git a/drivers/input/mouse/alps.c b/drivers/input/mouse/alps.c
index 604dea3..11fda20 100644
--- a/drivers/input/mouse/alps.c
+++ b/drivers/input/mouse/alps.c
@@ -532,7 +532,11 @@ static void alps_report_semi_mt_data(struct psmouse *psmouse, int fingers)
 		priv->second_touch = -1;
 	}
 
-	alps_report_mt_data(psmouse, (fingers <= 2) ? fingers : 2);
+	if (fingers >= 1)
+		alps_set_slot(dev, 0, f->mt[0].x, f->mt[0].y);
+	if (fingers >= 2)
+		alps_set_slot(dev, 1, f->mt[1].x, f->mt[1].y);
+	input_mt_sync_frame(dev);
 
 	input_mt_report_finger_count(dev, fingers);
 
@@ -2835,7 +2839,7 @@ static void alps_set_abs_params_mt(struct alps_data *priv,
 
 	input_mt_init_slots(dev1, MAX_TOUCHES,
 			    INPUT_MT_POINTER | INPUT_MT_DROP_UNUSED |
-				INPUT_MT_TRACK | INPUT_MT_SEMI_MT);
+				INPUT_MT_SEMI_MT);
 }
 
 static void alps_set_abs_params_v7(struct alps_data *priv,
-- 
2.3.5


  parent reply	other threads:[~2015-04-24 14:49 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-04-24 14:48 [PATCH 0/7] alps: Improve coordinates reported when 2fg are down on semi-mt models Hans de Goede
2015-04-24 14:48 ` [PATCH 1/7] alps: Change alps_decode_rushmore to do all decoding itself Hans de Goede
2015-04-24 14:48 ` [PATCH 2/7] alps: Only set fields actually present when decoding pinnacle / rushmore pkts Hans de Goede
2015-04-24 14:48 ` [PATCH 3/7] alps: Always decode the position packet before the packet with the bitmap data Hans de Goede
2015-04-24 14:48 ` [PATCH 4/7] alps: Use more accurate coordinates for first touch in semi-mt mode Hans de Goede
2015-04-24 14:48 ` Hans de Goede [this message]
2015-04-24 14:48 ` [PATCH 6/7] alps: Rename alps_set_abs_params_mt to alps_set_abs_params_semi_mt Hans de Goede
2015-04-24 14:48 ` [PATCH 7/7] alps: Use the generic process_bitmap function for dolphin (v5) touchpads too Hans de Goede

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=1429886936-24587-6-git-send-email-hdegoede@redhat.com \
    --to=hdegoede@redhat.com \
    --cc=btissoir@redhat.com \
    --cc=dmitry.torokhov@gmail.com \
    --cc=linux-input@vger.kernel.org \
    --cc=peter.hutterer@redhat.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).