From patchwork Thu Sep 8 04:18:08 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: JJ Ding X-Patchwork-Id: 1128752 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 p884G0VS026829 for ; Thu, 8 Sep 2011 04:16:04 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751410Ab1IHEP7 (ORCPT ); Thu, 8 Sep 2011 00:15:59 -0400 Received: from emcscan.emc.com.tw ([192.72.220.5]:38659 "EHLO emcscan.emc.com.tw" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750902Ab1IHEP7 (ORCPT ); Thu, 8 Sep 2011 00:15:59 -0400 Received: from unknown (HELO emc.com.tw) ([192.168.10.1]) by emcscan.emc.com.tw with ESMTP; 08 Sep 2011 12:15:45 +0800 Received: from localhost ([192.168.81.59]) by emc.com.tw (8.13.7+Sun/8.13.7) with ESMTP id p884Fhw3029364; Thu, 8 Sep 2011 12:15:44 +0800 (CST) From: JJ Ding To: Richard =?utf-8?Q?Sch=C3=BCtz?= , linux-input@vger.kernel.org Cc: Aaron Huang , Tom Lin Subject: Re: elantech touchpad issues In-Reply-To: <4E6633E5.6080108@t-online.de> References: <4E6633E5.6080108@t-online.de> User-Agent: Notmuch/0.7 (http://notmuchmail.org) Emacs/23.2.1 (i686-pc-linux-gnu) Date: Thu, 08 Sep 2011 12:18:08 +0800 Message-ID: <87sjo7oef3.fsf@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]); Thu, 08 Sep 2011 04:16:04 +0000 (UTC) Hi Richard, It turns out that v2 hardware has debounce packet, too. But with --- To unsubscribe from this list: send the line "unsubscribe linux-input" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html different signature compared to v3. To the best of my knowledge, I can only say some models of v2 hardware have this, and others don't. So we always check for debounce. Please test this patch and see if it works for you. Please apply this on up of my v5 series. Thanks --- diff --git a/drivers/input/mouse/elantech.c b/drivers/input/mouse/elantech.c index 38fb155..1e5ea1d 100644 --- a/drivers/input/mouse/elantech.c +++ b/drivers/input/mouse/elantech.c @@ -613,6 +613,13 @@ static int elantech_packet_check_v1(struct psmouse *psmouse) etd->parity[packet[3]] == p3; } +static int elantech_check_debounce_v2(struct psmouse *psmouse) +{ + const u8 debounce_packet[] = { 0x84, 0xff, 0xff, 0x02, 0xff, 0xff }; + unsigned char *packet = psmouse->packet; + return !memcmp(packet, debounce_packet, sizeof(debounce_packet)); +} + static int elantech_packet_check_v2(struct psmouse *psmouse) { struct elantech_data *etd = psmouse->private; @@ -708,6 +715,9 @@ static psmouse_ret_t elantech_process_byte(struct psmouse *psmouse) break; case 2: + if (elantech_check_debounce_v2(psmouse)) + return PSMOUSE_FULL_PACKET; + if (etd->paritycheck && !elantech_packet_check_v2(psmouse)) return PSMOUSE_BAD_DATA; -- jj