From patchwork Thu Apr 14 22:13:17 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sadrul Chowdhury X-Patchwork-Id: 709791 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by demeter1.kernel.org (8.14.4/8.14.3) with ESMTP id p3EMDf4s010615 for ; Thu, 14 Apr 2011 22:13:42 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751520Ab1DNWNj (ORCPT ); Thu, 14 Apr 2011 18:13:39 -0400 Received: from smtp-out.google.com ([216.239.44.51]:53615 "EHLO smtp-out.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751192Ab1DNWNj (ORCPT ); Thu, 14 Apr 2011 18:13:39 -0400 Received: from wpaz1.hot.corp.google.com (wpaz1.hot.corp.google.com [172.24.198.65]) by smtp-out.google.com with ESMTP id p3EMDcoK019724 for ; Thu, 14 Apr 2011 15:13:38 -0700 DKIM-Signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d=google.com; s=beta; t=1302819218; bh=Lk6a+sWb1vOy++GSwc+s0Sdh9B0=; h=MIME-Version:Sender:From:Date:Message-ID:Subject:To:Content-Type; b=WMh67xFDQ+COF/k9aXdt9XTotv9QJKUUnlfZ4F8WTK1CAHPTxGMpZkctBKdrlrQ1C jS0ufNVOO4fOIc4mRlCOg== Received: from iwn33 (iwn33.prod.google.com [10.241.68.97]) by wpaz1.hot.corp.google.com with ESMTP id p3EMDE8a021685 (version=TLSv1/SSLv3 cipher=RC4-SHA bits=128 verify=NOT) for ; Thu, 14 Apr 2011 15:13:37 -0700 Received: by iwn33 with SMTP id 33so3040149iwn.27 for ; Thu, 14 Apr 2011 15:13:37 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=beta; h=domainkey-signature:mime-version:sender:from:date :x-google-sender-auth:message-id:subject:to:content-type; bh=PVHyaLPlnayM8XAHtEmPpa8oY+ZziS+xYacQwlxXDsI=; b=PBoW/OsNkMOmItxTN07flB1BEQ5UN8HCi2w5eBoFg3P0RBg4xk18/dByHNDsLIt7W8 aAjxDNvKXjVH6U+/kTNA== DomainKey-Signature: a=rsa-sha1; c=nofws; d=google.com; s=beta; h=mime-version:sender:from:date:x-google-sender-auth:message-id :subject:to:content-type; b=DxkatoAnOblTuUQ+nzRBqz5Pe3RGeO06Z9Jdsoa5LxjSQn0MTpjuU+a2WNsvM1tq7E yVLzG6Py68BGkoqn/HcA== Received: by 10.231.187.89 with SMTP id cv25mr1151408ibb.111.1302819217148; Thu, 14 Apr 2011 15:13:37 -0700 (PDT) MIME-Version: 1.0 Received: by 10.231.20.70 with HTTP; Thu, 14 Apr 2011 15:13:17 -0700 (PDT) From: Sadrul Chowdhury Date: Thu, 14 Apr 2011 18:13:17 -0400 X-Google-Sender-Auth: JnwagDt9RCYiJlVB03IaFEzBAG8 Message-ID: Subject: [PATCH] input-mt: Allow -1 for tracking id To: linux-input@vger.kernel.org X-System-Of-Record: true Sender: linux-input-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-input@vger.kernel.org X-Greylist: IP, sender and recipient auto-whitelisted, not delayed by milter-greylist-4.2.6 (demeter1.kernel.org [140.211.167.41]); Thu, 14 Apr 2011 22:13:42 +0000 (UTC) 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 From dc5f39811bfd21409853fb4f5047f2ac47618c76 Mon Sep 17 00:00:00 2001 From: Sadrul Habib Chowdhury 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 --- 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