From patchwork Thu Jan 31 16:22:29 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Benjamin Tissoires X-Patchwork-Id: 2074301 X-Patchwork-Delegate: jikos@jikos.cz Return-Path: X-Original-To: patchwork-linux-input@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork2.kernel.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by patchwork2.kernel.org (Postfix) with ESMTP id 5FAD1DFB79 for ; Thu, 31 Jan 2013 16:23:50 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755555Ab3AaQXT (ORCPT ); Thu, 31 Jan 2013 11:23:19 -0500 Received: from mail-wg0-f47.google.com ([74.125.82.47]:36504 "EHLO mail-wg0-f47.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755343Ab3AaQXQ (ORCPT ); Thu, 31 Jan 2013 11:23:16 -0500 Received: by mail-wg0-f47.google.com with SMTP id dr13so2216484wgb.14 for ; Thu, 31 Jan 2013 08:23:15 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=x-received:from:to:subject:date:message-id:x-mailer:in-reply-to :references; bh=QM4Rmqsjm9HPsfxT3hx+cjgLXqrfJCOWPBqjWmRahgE=; b=LrkLJHINNjtQrAJqM+Jef78piIYbhvQ81TzUyLB75TA0gdrNQHrpytv0u6iEHQF801 UYyrSzywjKumZWUHsKdjHhqxkHeauUl/RUhyo0ae3OvTagJuHLRTsdt0Tu42DrvvyRAt jVfY750luS9n75v2dJwe/F+EeJj+v+cjk09CYwNxpHVQ55eGFL6YaaUFp0Ata9poHO53 nGqiUbLG6YSKlYmfZSyh+J87WXD+6AX8se9OQyNM5bTOoLKWM0DSPVA3fzsyZN2sSmwL 8payUlqiQrGN/W6gnJWUMye69YCPctOLhdyjOgaTUuQoXNZ+WUKedZU7La3N3UbUGkxH iKuA== X-Received: by 10.194.76.7 with SMTP id g7mr16604904wjw.50.1359649387401; Thu, 31 Jan 2013 08:23:07 -0800 (PST) Received: from localhost.localdomain.com (lan31-8-82-247-176-67.fbx.proxad.net. [82.247.176.67]) by mx.google.com with ESMTPS id ec3sm9846164wib.1.2013.01.31.08.23.05 (version=TLSv1.2 cipher=RC4-SHA bits=128/128); Thu, 31 Jan 2013 08:23:06 -0800 (PST) From: Benjamin Tissoires To: Benjamin Tissoires , Dmitry Torokhov , Henrik Rydberg , Jiri Kosina , Stephane Chatty , linux-input@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH v2 7/9] HID: multitouch: fix protocol for Cando 2087:0a02 Date: Thu, 31 Jan 2013 17:22:29 +0100 Message-Id: <1359649351-11092-8-git-send-email-benjamin.tissoires@gmail.com> X-Mailer: git-send-email 1.8.1 In-Reply-To: <1359649351-11092-1-git-send-email-benjamin.tissoires@gmail.com> References: <1359649351-11092-1-git-send-email-benjamin.tissoires@gmail.com> Sender: linux-input-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-input@vger.kernel.org Cando 2087:0a02 was broken, this fixes it. Signed-off-by: Benjamin Tissoires --- drivers/hid/hid-multitouch.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/drivers/hid/hid-multitouch.c b/drivers/hid/hid-multitouch.c index 71daf57..f106e90 100644 --- a/drivers/hid/hid-multitouch.c +++ b/drivers/hid/hid-multitouch.c @@ -115,6 +115,7 @@ struct mt_device { #define MT_CLS_DUAL_NSMU_CONTACTID 0x0008 #define MT_CLS_INRANGE_CONTACTNUMBER 0x0009 #define MT_CLS_ALWAYS_TRUE 0x000a +#define MT_CLS_DUAL_CONTACT_NUMBER 0x0010 /* vendor specific classes */ #define MT_CLS_3M 0x0101 @@ -177,6 +178,11 @@ static struct mt_class mt_classes[] = { { .name = MT_CLS_ALWAYS_TRUE, .quirks = MT_QUIRK_ALWAYS_VALID | MT_QUIRK_CONTACT_CNT_ACCURATE }, + { .name = MT_CLS_DUAL_CONTACT_NUMBER, + .quirks = MT_QUIRK_ALWAYS_VALID | + MT_QUIRK_CONTACT_CNT_ACCURATE | + MT_QUIRK_SLOT_IS_CONTACTNUMBER, + .maxcontacts = 2 }, /* * vendor specific classes @@ -947,7 +953,7 @@ static const struct hid_device_id mt_devices[] = { { .driver_data = MT_CLS_DUAL_INRANGE_CONTACTNUMBER, MT_USB_DEVICE(USB_VENDOR_ID_CANDO, USB_DEVICE_ID_CANDO_MULTI_TOUCH) }, - { .driver_data = MT_CLS_DUAL_INRANGE_CONTACTNUMBER, + { .driver_data = MT_CLS_DUAL_CONTACT_NUMBER, MT_USB_DEVICE(USB_VENDOR_ID_CANDO, USB_DEVICE_ID_CANDO_MULTI_TOUCH_10_1) }, { .driver_data = MT_CLS_DUAL_INRANGE_CONTACTNUMBER,