From patchwork Mon Jun 21 21:07:24 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: =?utf-8?b?w4PigLByaWMgUGllbA==?= X-Patchwork-Id: 107257 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by demeter.kernel.org (8.14.4/8.14.3) with ESMTP id o5LL80UM017344 for ; Mon, 21 Jun 2010 21:08:09 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1758439Ab0FUVII (ORCPT ); Mon, 21 Jun 2010 17:08:08 -0400 Received: from mailservice.tudelft.nl ([130.161.131.5]:37103 "EHLO mailservice.tudelft.nl" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1758574Ab0FUVIH (ORCPT ); Mon, 21 Jun 2010 17:08:07 -0400 Received: from localhost (localhost [127.0.0.1]) by amavis (Postfix) with ESMTP id 029C82B8105; Mon, 21 Jun 2010 23:08:07 +0200 (CEST) X-Virus-Scanned: amavisd-new at tudelft.nl X-Spam-Flag: NO X-Spam-Score: -22.589 X-Spam-Level: X-Spam-Status: No, score=-22.589 tagged_above=-99 required=5 tests=[BAYES_00=-2.599, PROLO_LEO3=0.01, TUD_REL01=-20] autolearn=ham Received: from mailservice.tudelft.nl ([130.161.131.73]) by localhost (tudelft.nl [127.0.0.1]) (amavisd-new, port 10026) with ESMTP id ftoNFnKlHpl9; Mon, 21 Jun 2010 23:08:06 +0200 (CEST) Received: from smtp-a.tudelft.nl (smtp-a.tudelft.nl [130.161.180.7]) by mx2.tudelft.nl (Postfix) with ESMTP id 2CA002B8095; Mon, 21 Jun 2010 23:08:06 +0200 (CEST) Received: from [172.19.3.21] (63-103-dsl.ipact.nl [84.35.103.63]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by smtp-a.tudelft.nl (Postfix) with ESMTP id 0B71AB3A62; Mon, 21 Jun 2010 23:08:06 +0200 (CEST) Message-ID: <4C1FD48C.3040506@tudelft.nl> Date: Mon, 21 Jun 2010 23:07:24 +0200 From: =?UTF-8?B?w4lyaWMgUGllbA==?= User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.1.9) Gecko/20100614 Mandriva/3.0.4-11mdv2010.1 (2010.1) Thunderbird/3.0.4 MIME-Version: 1.0 To: Dmitry Torokhov , "linux-input@vger.kernel.org" CC: Florian Ragwitz Subject: [PATCH 5/7] elantech: report position also with 3 fingers References: <4C1FD2B0.1080504@tudelft.nl> In-Reply-To: <4C1FD2B0.1080504@tudelft.nl> X-Enigmail-Version: 1.0.1 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 (demeter.kernel.org [140.211.167.41]); Mon, 21 Jun 2010 21:08:09 +0000 (UTC) diff --git a/drivers/input/mouse/elantech.c b/drivers/input/mouse/elantech.c index b09b458..633f100 100644 --- a/drivers/input/mouse/elantech.c +++ b/drivers/input/mouse/elantech.c @@ -257,6 +257,14 @@ static void elantech_report_absolute_v2(struct psmouse *psmouse) input_report_key(dev, BTN_TOUCH, fingers != 0); switch (fingers) { + case 3: + /* + * Same as one finger, except report of more than 3 fingers: + * byte 3: n4 . w1 w0 . . . . + */ + if (packet[3] & 0x80) + fingers = 4; + /* pass through... */ case 1: /* * byte 1: . . . . . x10 x9 x8 @@ -309,6 +317,7 @@ static void elantech_report_absolute_v2(struct psmouse *psmouse)