From patchwork Fri Jan 28 16:04:39 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Benjamin Tissoires X-Patchwork-Id: 515311 X-Patchwork-Delegate: jikos@jikos.cz 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 p0SG4u2u010464 for ; Fri, 28 Jan 2011 16:04:56 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754736Ab1A1QEz (ORCPT ); Fri, 28 Jan 2011 11:04:55 -0500 Received: from 89-230.252-81.static-ip.oleane.fr ([81.252.230.89]:42942 "EHLO smtp.lii-enac.fr" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753703Ab1A1QEz (ORCPT ); Fri, 28 Jan 2011 11:04:55 -0500 Received: from gloupti.lii-enac.fr (unknown [10.0.0.110]) by smtp.lii-enac.fr (DoorWays) with ESMTP id 27CE994E56; Fri, 28 Jan 2011 17:04:50 +0100 (CET) From: Benjamin Tissoires To: Dmitry Torokhov , Henrik Rydberg , Benjamin Tissoires , Jiri Kosina , Stephane Chatty , linux-input@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH 1/2] hid-multitouch: work on default classes and renaming of classes Date: Fri, 28 Jan 2011 17:04:39 +0100 Message-Id: <1296230680-2871-1-git-send-email-benjamin.tissoires@enac.fr> X-Mailer: git-send-email 1.7.3.4 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]); Fri, 28 Jan 2011 16:04:56 +0000 (UTC) diff --git a/drivers/hid/hid-multitouch.c b/drivers/hid/hid-multitouch.c index 07d3183..ffe2a76 100644 --- a/drivers/hid/hid-multitouch.c +++ b/drivers/hid/hid-multitouch.c @@ -24,6 +24,7 @@ MODULE_AUTHOR("Stephane Chatty "); +MODULE_AUTHOR("Benjamin Tissoires "); MODULE_DESCRIPTION("HID multitouch panels"); MODULE_LICENSE("GPL"); @@ -65,10 +66,11 @@ struct mt_class { }; /* classes of device behavior */ -#define MT_CLS_DEFAULT 1 -#define MT_CLS_DUAL1 2 -#define MT_CLS_DUAL2 3 -#define MT_CLS_CYPRESS 4 +#define MT_CLS_DEFAULT 1 +#define MT_CLS_DUAL_DEFAULT 2 +#define MT_CLS_DUAL_INRANGE_CONTACTID 3 +#define MT_CLS_DUAL_INRANGE_CONTACTNUMBER 4 +#define MT_CLS_CYPRESS 10 /* * these device-dependent functions determine what slot corresponds @@ -104,13 +106,16 @@ static int find_slot_from_contactid(struct mt_device *td) struct mt_class mt_classes[] = { { .name = MT_CLS_DEFAULT, - .quirks = MT_QUIRK_VALID_IS_INRANGE, + .quirks = MT_QUIRK_NOT_SEEN_MEANS_UP, .maxcontacts = 10 }, - { .name = MT_CLS_DUAL1, + { .name = MT_CLS_DUAL_DEFAULT, + .quirks = MT_QUIRK_NOT_SEEN_MEANS_UP, + .maxcontacts = 2 }, + { .name = MT_CLS_DUAL_INRANGE_CONTACTID, .quirks = MT_QUIRK_VALID_IS_INRANGE | MT_QUIRK_SLOT_IS_CONTACTID, .maxcontacts = 2 }, - { .name = MT_CLS_DUAL2, + { .name = MT_CLS_DUAL_INRANGE_CONTACTNUMBER, .quirks = MT_QUIRK_VALID_IS_INRANGE | MT_QUIRK_SLOT_IS_CONTACTNUMBER, .maxcontacts = 2 }, @@ -466,15 +471,15 @@ static const struct hid_device_id mt_devices[] = { USB_DEVICE_ID_CYPRESS_TRUETOUCH) }, /* GeneralTouch panel */ - { .driver_data = MT_CLS_DUAL2, + { .driver_data = MT_CLS_DUAL_INRANGE_CONTACTNUMBER, HID_USB_DEVICE(USB_VENDOR_ID_GENERAL_TOUCH, USB_DEVICE_ID_GENERAL_TOUCH_WIN7_TWOFINGERS) }, /* PixCir-based panels */ - { .driver_data = MT_CLS_DUAL1, + { .driver_data = MT_CLS_DUAL_INRANGE_CONTACTID, HID_USB_DEVICE(USB_VENDOR_ID_HANVON, USB_DEVICE_ID_HANVON_MULTITOUCH) }, - { .driver_data = MT_CLS_DUAL1, + { .driver_data = MT_CLS_DUAL_INRANGE_CONTACTID, HID_USB_DEVICE(USB_VENDOR_ID_CANDO, USB_DEVICE_ID_CANDO_PIXCIR_MULTI_TOUCH) },