Received: by 2002:ac0:a5b6:0:0:0:0:0 with SMTP id m51-v6csp3663367imm; Tue, 29 May 2018 11:07:37 -0700 (PDT) X-Google-Smtp-Source: AB8JxZpQspdCs5pL44pGRjo+pX3Tl6uoZPJuTA2F9hgGYHzO9E9O+yJXEJNUzXvwpoXhx6uecFnp X-Received: by 2002:a17:902:6046:: with SMTP id a6-v6mr18496552plt.59.1527617257595; Tue, 29 May 2018 11:07:37 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1527617257; cv=none; d=google.com; s=arc-20160816; b=AyPo3XBcBZPdmeBM92lrmYkosehkZ2yfYvOrAzAzxLqL2ws/IxBMhKBXqpquO2WBWP zkJZ+zQxiClTFVHGKYxh3xZDpSFLdn5dbAdqe6Eqho/jsKcXTjAh7+Udzlh3zfp3F/5i CzRZ3GwZVJKk6ybgPy2RQW+1HgvIYs8MEJG6LZXv6nQmvmhJGP7VSpKZvoNw2nnXDKs7 nl2AEC/x7F7yELlASf33/+jI94LcKX+iY1LHXYk84nbsTU20whZhdMCzjoyGt939HKLM 95qkp1ZpNikamZpN23689jLwMUNH1J7cusioOlGEMFn03wbEaw/tBOpHWmM4qM6s77ja fefg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature:arc-authentication-results; bh=8thxEh+LrGOKl+JskeY6hOMLKjyRcu9271juR053DjE=; b=J3pkmAfrLWqiy36R+BgUgy1PlQAm+THWJu23a/E41qcbS7nzpwQX7dHRkgobGzZBMK CDTmT84i07/izzu5F5HdG4X4VNEY/gQe5GIKNNgh+mHxfUtuTnpyPk3x8iVOMPy75q51 hZXd6tblxR8MJcnKpRMMKHJdyC7xE939kO1IDhVI0R/wTCHHZvbqHXQa4fMFqDgZ0b12 RkWcdJx4+hTx8oZooFuuW8EyygKh+BndcYopwcmD6oUIAcvl1CRlcRR7hr5MP5bwwDLv 8QJ0DpZPoiSRUyVUvkbvnHD1m0fBLcCX9t3UIKhl+u3lOwt3F16UwPJbrcAaNXerWaMy 38qw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=PiR2/Sey; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id d90-v6si33270083pld.92.2018.05.29.11.07.23; Tue, 29 May 2018 11:07:37 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=PiR2/Sey; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S965924AbeE2SFO (ORCPT + 99 others); Tue, 29 May 2018 14:05:14 -0400 Received: from mail-pl0-f68.google.com ([209.85.160.68]:41655 "EHLO mail-pl0-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S965697AbeE2SFK (ORCPT ); Tue, 29 May 2018 14:05:10 -0400 Received: by mail-pl0-f68.google.com with SMTP id az12-v6so9403678plb.8; Tue, 29 May 2018 11:05:10 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=8thxEh+LrGOKl+JskeY6hOMLKjyRcu9271juR053DjE=; b=PiR2/SeyjLxMspaARNzyIuLgSZLNCxBg32iwP4E67z9xq44DDjIlNM5NRXtMMxftfN 2YCmXxXEQKPrjY+XU/eZfVEJs9p6XYgNiJbEDTmuo+ydRyx+w/NZKMgYNvpF7wQrqgPa ZQbEsNVznRXQVC91/DgTgoAF/WDB1vvAqjLZ2lf44k9kBHjqrVPONGqwCkVCo7EILPju vjb8KRpFsbShTcNKaGLBYM1p/olUNcmNw8C6h8PngETJxVuxPj3DlpJmyR4Tyx3a/J0F +HgBSZYu8WeMXsdoHsGo423E0QrcCSF72mOEpxk+Y09Jy6Uw7UbSk7bxrDoLaFQ6JI57 KW7A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to:user-agent; bh=8thxEh+LrGOKl+JskeY6hOMLKjyRcu9271juR053DjE=; b=FW+fVe7sncgazhl2soqPlsn7paED9YEtMkm/QzM/+MYxjFzdHlRE7zn3+D4lrElmTP MaVyvoF9/0YbJEVJhkIkLUIn4k0XL8K2/UdUp1covT8qb6w4nV9tG2Ajium2MTwphVjK 66NW/TsptOHyhRblr1TFHwZNxY4kz9BkCTL4onJpL6EwTjdJMZbskIM1SnHxKqzpukT1 6oD7tiAj0ApU1cgPmCo1tKKKte1sE9190L+pPipiLi078FkRDWA9LRtQ7/39f0kofxUC MhVqEEyGStpw+R5HdpeF1EQhmbg099/tDc4i0gMHMuA4ceTb61X9/2abd1LFZ/eo5+ps ez+A== X-Gm-Message-State: ALKqPwc3fklGWJl8hi9ozNyYzXA2r1f8/TfMiQ+gJAknaG8X4ITEV9Co lLjrxrTxBktAmvMVmmAqfbI= X-Received: by 2002:a17:902:ba93:: with SMTP id k19-v6mr18127491pls.379.1527617109891; Tue, 29 May 2018 11:05:09 -0700 (PDT) Received: from dtor-ws ([2620:0:1000:1511:8de6:27a8:ed13:2ef5]) by smtp.gmail.com with ESMTPSA id q24-v6sm55176751pff.9.2018.05.29.11.05.08 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Tue, 29 May 2018 11:05:08 -0700 (PDT) Date: Tue, 29 May 2018 11:05:06 -0700 From: Dmitry Torokhov To: KT Liao Cc: linux-kernel@vger.kernel.org, linux-input@vger.kernel.org, ulrik.debie-os@e2big.org, phoenix@emc.com.tw, aaron.ma@canonical.com, josh.chen@emc.com.tw Subject: Re: [PATCH] Input: elantech - Fix V4 report decoding for module with middle key Message-ID: <20180529180506.GB167092@dtor-ws> References: <1527507182-3858-1-git-send-email-kt.liao@emc.com.tw> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1527507182-3858-1-git-send-email-kt.liao@emc.com.tw> User-Agent: Mutt/1.9.2 (2017-12-15) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi KT, On Mon, May 28, 2018 at 07:33:02PM +0800, KT Liao wrote: > Some touchpad has middle key and it will be indicated in bit 2 of packet[0]. > We need to fix V4 formation's byte mask to prevent error decoding. Could you please let me know what devices this patch fixes? Are they released or new hardware? > > Signed-off-by: KT Liao > --- > drivers/input/mouse/elantech.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/drivers/input/mouse/elantech.c b/drivers/input/mouse/elantech.c > index fb4d902..f39dc66 100644 > --- a/drivers/input/mouse/elantech.c > +++ b/drivers/input/mouse/elantech.c > @@ -799,7 +799,7 @@ static int elantech_packet_check_v4(struct psmouse *psmouse) > else if (ic_version == 7 && etd->info.samples[1] == 0x2A) > sanity_check = ((packet[3] & 0x1c) == 0x10); > else > - sanity_check = ((packet[0] & 0x0c) == 0x04 && > + sanity_check = ((packet[0] & 0x08) == 0x00 && > (packet[3] & 0x1c) == 0x10); > > if (!sanity_check) > -- > 2.7.4 > Thanks. -- Dmitry