From patchwork Sun Oct 31 04:00:26 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ping Cheng X-Patchwork-Id: 293172 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 o9V40KV0001252 for ; Sun, 31 Oct 2010 04:00:21 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1750722Ab0JaEAU (ORCPT ); Sun, 31 Oct 2010 00:00:20 -0400 Received: from mail-gy0-f174.google.com ([209.85.160.174]:53768 "EHLO mail-gy0-f174.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750698Ab0JaEAT (ORCPT ); Sun, 31 Oct 2010 00:00:19 -0400 Received: by gyg4 with SMTP id 4so2635444gyg.19 for ; Sat, 30 Oct 2010 21:00:19 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:from:to:cc:subject:date :message-id:x-mailer; bh=D5DdKrndvyUedoMjbCEllI4j7rZGIqL7U7trmJW1xCg=; b=UN+s6/pPoPOGD8MT8G9/q9xOdpiq+uIXpF1C7k1Ka44nclNR7npXD1Mlih5y+J3KUJ EHEsKYkVQLv/YKwPrDpnyP9fjBYpyhxzZ+OZSYzTiEUyiB2LSH1PkSVM+qLWZRwv5fGV ckFjeL40RcFcpTQRL0zUUScgFNAiH66Rmjpto= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=from:to:cc:subject:date:message-id:x-mailer; b=wkXBtxtic5PISTHvK2fXhWcrJh1llkx6PD99IVfdOsKkdFZzinHZQtMvluB9RRk/HC NQSml7Tg8/9JV8MMsEQJLtnC97VigwFaaVcxUlSTIW4vN9Sklsvfq3PtB5g7/zDqRUzN og0i3dKc6Fs5mI1joFTWoI1qYFj6eup5E8V3s= Received: by 10.151.98.15 with SMTP id a15mr25662281ybm.308.1288497619135; Sat, 30 Oct 2010 21:00:19 -0700 (PDT) Received: from localhost.localdomain ([204.119.25.44]) by mx.google.com with ESMTPS id m4sm3642343yha.26.2010.10.30.21.00.17 (version=TLSv1/SSLv3 cipher=RC4-MD5); Sat, 30 Oct 2010 21:00:18 -0700 (PDT) From: Ping Cheng To: linux-input@vger.kernel.org Cc: rydberg@euromail.se, dmitry.torokhov@gmail.com, Ping Cheng Subject: [PATCH] Input: wacom - report hardware provided MT_TRACKING_IDs Date: Sat, 30 Oct 2010 21:00:26 -0700 Message-Id: <1288497626-25416-1-git-send-email-pingc@wacom.com> X-Mailer: git-send-email 1.7.2.3 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.3 (demeter1.kernel.org [140.211.167.41]); Sun, 31 Oct 2010 04:00:21 +0000 (UTC) diff --git a/drivers/input/tablet/wacom_wac.c b/drivers/input/tablet/wacom_wac.c index b3252ef..76d4980 100644 --- a/drivers/input/tablet/wacom_wac.c +++ b/drivers/input/tablet/wacom_wac.c @@ -885,7 +885,7 @@ static int wacom_bpt_touch(struct wacom_wac *wacom) input_report_abs(input, ABS_MT_POSITION_X, x); input_report_abs(input, ABS_MT_POSITION_Y, y); if (wacom->id[i] < 0) - wacom->id[i] = wacom->trk_id++ & MAX_TRACKING_ID; + wacom->id[i] = i; if (!count++) sp = p, sx = x, sy = y; } else { @@ -1283,7 +1283,7 @@ void wacom_setup_input_capabilities(struct input_dev *input_dev, 0, features->pressure_max, features->pressure_fuzz, 0); input_set_abs_params(input_dev, ABS_MT_TRACKING_ID, 0, - MAX_TRACKING_ID, 0, 0); + 1, 0, 0); } else if (features->device_type == BTN_TOOL_PEN) { __set_bit(BTN_TOOL_RUBBER, input_dev->keybit); __set_bit(BTN_TOOL_PEN, input_dev->keybit); diff --git a/drivers/input/tablet/wacom_wac.h b/drivers/input/tablet/wacom_wac.h index 00ca015..b1310ec 100644 --- a/drivers/input/tablet/wacom_wac.h +++ b/drivers/input/tablet/wacom_wac.h @@ -42,9 +42,6 @@ #define WACOM_QUIRK_MULTI_INPUT 0x0001 #define WACOM_QUIRK_BBTOUCH_LOWRES 0x0002 -/* largest reported tracking id */ -#define MAX_TRACKING_ID 0xfff - enum { PENPARTNER = 0, GRAPHIRE, @@ -100,7 +97,6 @@ struct wacom_wac { int id[3]; __u32 serial[2]; int last_finger; - int trk_id; struct wacom_features features; struct wacom_shared *shared; struct input_dev *input;