linux-input.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] input-mt: Allow -1 for tracking id
@ 2011-04-14 22:13 Sadrul Chowdhury
  2011-04-15  7:00 ` Henrik Rydberg
  0 siblings, 1 reply; 3+ messages in thread
From: Sadrul Chowdhury @ 2011-04-14 22:13 UTC (permalink / raw)
  To: linux-input

[-- 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


^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2011-04-15 13:10 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-04-14 22:13 [PATCH] input-mt: Allow -1 for tracking id Sadrul Chowdhury
2011-04-15  7:00 ` Henrik Rydberg
2011-04-15 13:09   ` Sadrul Chowdhury

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).