From patchwork Sat Apr 24 20:41:01 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Florian Ragwitz X-Patchwork-Id: 94861 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by demeter.kernel.org (8.14.3/8.14.3) with ESMTP id o3OLO7Ll018554 for ; Sat, 24 Apr 2010 21:26:38 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751362Ab0DXV0i (ORCPT ); Sat, 24 Apr 2010 17:26:38 -0400 Received: from weedy.perldition.org ([85.10.210.75]:54449 "EHLO weedy.perldition.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750876Ab0DXV0h (ORCPT ); Sat, 24 Apr 2010 17:26:37 -0400 X-Greylist: IP, sender and recipient auto-whitelisted, not delayed by milter-greylist-4.2.3 (demeter.kernel.org [140.211.167.41]); Sat, 24 Apr 2010 21:26:39 +0000 (UTC) X-Greylist: delayed 2686 seconds by postgrey-1.27 at vger.kernel.org; Sat, 24 Apr 2010 17:26:37 EDT Received: from p4fd764a8.dip.t-dialin.net ([79.215.100.168]:33231 helo=tardis.perldition.org) by weedy.perldition.org with esmtpsa (TLSv1:AES256-SHA:256) (Exim 4.60) (envelope-from ) id 1O5mAk-0008V6-Hn; Sat, 24 Apr 2010 22:41:54 +0200 Received: from rafl by tardis.perldition.org with local (Exim 4.71) (envelope-from ) id 1O5mA5-00069a-MW; Sat, 24 Apr 2010 22:41:13 +0200 From: Florian Ragwitz To: linux-input@vger.kernel.org Cc: Florian Ragwitz Subject: [PATCH 3/4] Input: elantech - Ignore high bits in the position coordinates Date: Sat, 24 Apr 2010 22:41:01 +0200 Message-Id: <1272141662-23431-4-git-send-email-rafl@debian.org> X-Mailer: git-send-email 1.7.0.5 In-Reply-To: <1272141662-23431-1-git-send-email-rafl@debian.org> References: <1272141662-23431-1-git-send-email-rafl@debian.org> Sender: linux-input-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-input@vger.kernel.org diff --git a/drivers/input/mouse/elantech.c b/drivers/input/mouse/elantech.c index bfd08c7..254a967 100644 --- a/drivers/input/mouse/elantech.c +++ b/drivers/input/mouse/elantech.c @@ -251,13 +251,13 @@ static void elantech_report_absolute_v2(struct psmouse *psmouse) switch (fingers) { case 1: - /* byte 1: x15 x14 x13 x12 x11 x10 x9 x8 + /* byte 1: . . . . . x10 x9 x8 byte 2: x7 x6 x5 x4 x4 x2 x1 x0 */ - input_report_abs(dev, ABS_X, (packet[1] << 8) | packet[2]); - /* byte 4: y15 y14 y13 y12 y11 y10 y8 y8 + input_report_abs(dev, ABS_X, ((packet[1] & 0x07) << 8) | packet[2]); + /* byte 4: . . . . . . y8 y8 byte 5: y7 y6 y5 y4 y3 y2 y1 y0 */ input_report_abs(dev, ABS_Y, ETP_YMAX_V2 - - ((packet[4] << 8) | packet[5])); + (((packet[4] & 0x03) << 8) | packet[5])); break; case 2: