From patchwork Mon Sep 5 02:16:43 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: JJ Ding X-Patchwork-Id: 1124382 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by demeter1.kernel.org (8.14.4/8.14.4) with ESMTP id p852Enp1019024 for ; Mon, 5 Sep 2011 02:16:08 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752365Ab1IECOw (ORCPT ); Sun, 4 Sep 2011 22:14:52 -0400 Received: from emcscan.emc.com.tw ([192.72.220.5]:4045 "EHLO emcscan.emc.com.tw" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751854Ab1IECOl (ORCPT ); Sun, 4 Sep 2011 22:14:41 -0400 Received: from unknown (HELO emc.com.tw) ([192.168.10.1]) by emcscan.emc.com.tw with ESMTP; 05 Sep 2011 10:14:39 +0800 Received: from localhost ([192.168.81.59]) by emc.com.tw (8.13.7+Sun/8.13.7) with ESMTP id p852EcE6001414; Mon, 5 Sep 2011 10:14:38 +0800 (CST) From: JJ Ding To: linux-input@vger.kernel.org, linux-kernel@vger.kernel.org Cc: Seth Forshee , Dmitry Torokhov , Aaron Huang , Tom Lin , =?UTF-8?q?=C3=89ric=20Piel?= , Daniel Kurtz , Chase Douglas , Henrik Rydberg , Alessandro Rubini , JJ Ding Subject: [PATCH v5 4/8] Input: elantech - remove ETP_EDGE_FUZZ_V2 Date: Mon, 5 Sep 2011 10:16:43 +0800 Message-Id: <1315189007-2179-5-git-send-email-jj_ding@emc.com.tw> X-Mailer: git-send-email 1.7.4.1 In-Reply-To: <1315189007-2179-1-git-send-email-jj_ding@emc.com.tw> References: <1315189007-2179-1-git-send-email-jj_ding@emc.com.tw> MIME-Version: 1.0 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]); Mon, 05 Sep 2011 02:16:08 +0000 (UTC) Don't try to be too clever and remove ETP_EDGE_FUZZ_V2. X, Y ranges should be just the raw resolution of the device. Otherwise, they can cause underflow on the Y axis. Suggested-by: Éric Piel Signed-off-by: JJ Ding Acked-by: Daniel Kurtz Acked-by: Éric Piel --- drivers/input/mouse/elantech.h | 15 ++++++--------- 1 files changed, 6 insertions(+), 9 deletions(-) diff --git a/drivers/input/mouse/elantech.h b/drivers/input/mouse/elantech.h index b54ea27..d9e6144 100644 --- a/drivers/input/mouse/elantech.h +++ b/drivers/input/mouse/elantech.h @@ -66,16 +66,13 @@ #define ETP_YMAX_V1 (384 - ETP_EDGE_FUZZ_V1) /* - * It seems the resolution for hardware version 2 doubled. - * Hence the X and Y ranges are doubled too. - * The bezel around the pad also appears to be smaller + * The resolution for older v2 hardware doubled. + * (newer v2's firmware provides command so we can query) */ -#define ETP_EDGE_FUZZ_V2 8 - -#define ETP_XMIN_V2 ( 0 + ETP_EDGE_FUZZ_V2) -#define ETP_XMAX_V2 (1152 - ETP_EDGE_FUZZ_V2) -#define ETP_YMIN_V2 ( 0 + ETP_EDGE_FUZZ_V2) -#define ETP_YMAX_V2 ( 768 - ETP_EDGE_FUZZ_V2) +#define ETP_XMIN_V2 0 +#define ETP_XMAX_V2 1152 +#define ETP_YMIN_V2 0 +#define ETP_YMAX_V2 768 #define ETP_PMIN_V2 0 #define ETP_PMAX_V2 255