linux-input.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Sadrul Chowdhury <sadrul@chromium.org>
To: linux-input@vger.kernel.org
Subject: [PATCH] input-mt: Allow -1 for tracking id
Date: Thu, 14 Apr 2011 18:13:17 -0400	[thread overview]
Message-ID: <BANLkTimcCh7MbmxtuzTCEFyT28FHZU+ijw@mail.gmail.com> (raw)

[-- Attachment #1: Type: text/plain, Size: 216 bytes --]

In protocol B, the tracking ID can be set to -1. But since the min
value is set to 0, the clients don't receive a -1 when a contact is
lifted. The attached patch sets the min to -1 to fix this issue.

Cheers.
Sadrul

[-- Attachment #2: 0001-mt-Allow-1-for-tracking-id.patch --]
[-- Type: text/x-patch, Size: 1088 bytes --]

From dc5f39811bfd21409853fb4f5047f2ac47618c76 Mon Sep 17 00:00:00 2001
From: Sadrul Habib Chowdhury <sadrul@chromium.org>
Date: Thu, 14 Apr 2011 17:42:27 -0400
Subject: [PATCH] input-mt: Allow -1 for tracking id.

The tracking id set to -1 when a slot is released. So allow the minimum
value to reach -1.

Change-Id: I8ffeaed70fd4824d5778ad2f2d7bc467157887fc

Signed-off-by: Sadrul Habib Chowdhury <sadrul@chromium.org>
---
 drivers/input/input-mt.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/drivers/input/input-mt.c b/drivers/input/input-mt.c
index c48c81f..5fb11e4 100644
--- a/drivers/input/input-mt.c
+++ b/drivers/input/input-mt.c
@@ -39,7 +39,7 @@ int input_mt_init_slots(struct input_dev *dev, unsigned int num_slots)
 
 	dev->mtsize = num_slots;
 	input_set_abs_params(dev, ABS_MT_SLOT, 0, num_slots - 1, 0, 0);
-	input_set_abs_params(dev, ABS_MT_TRACKING_ID, 0, TRKID_MAX, 0, 0);
+	input_set_abs_params(dev, ABS_MT_TRACKING_ID, -1, TRKID_MAX, 0, 0);
 	input_set_events_per_packet(dev, 6 * num_slots);
 
 	/* Mark slots as 'unused' */
-- 
1.7.2.3


             reply	other threads:[~2011-04-14 22:13 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-04-14 22:13 Sadrul Chowdhury [this message]
2011-04-15  7:00 ` [PATCH] input-mt: Allow -1 for tracking id Henrik Rydberg
2011-04-15 13:09   ` Sadrul Chowdhury

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=BANLkTimcCh7MbmxtuzTCEFyT28FHZU+ijw@mail.gmail.com \
    --to=sadrul@chromium.org \
    --cc=linux-input@vger.kernel.org \
    /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).