Received: by 2002:ac0:a5b6:0:0:0:0:0 with SMTP id m51-v6csp5167716imm; Tue, 19 Jun 2018 06:14:54 -0700 (PDT) X-Google-Smtp-Source: ADUXVKKm1j0zFe2FQmf9cG1j1JHji/vHdUPnqi16A3pDguHrnS0GNdtwyn+au6lO5NWsgwZSD7pd X-Received: by 2002:a62:3c15:: with SMTP id j21-v6mr18194417pfa.7.1529414094281; Tue, 19 Jun 2018 06:14:54 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1529414094; cv=none; d=google.com; s=arc-20160816; b=wjV+TEtngULwdo4DONnAZX82kND86zyiII1BMI6jdwrV0cPy3pBgdZ2hr3sx9/jliT Shgke2LO0oUDv4QCvxr8YUZkPStFyNPuSGqXHdzlL9KXXBePMmf70GuNOK3CjkLrnAK7 fO988idESLep93LADF/ntZJGblz130D40WqMwcpdwCVBj292+mhdnBkILe6zafpT8r/P UaxRlfBuUSIA0OGrwj4VLn+QHn+xBD0WaWIf/JXasrxVxGnnppOnVU1Jp9UbXMZOwVW/ rves4hS59eA8yqbGljkaUwGqLMsJ6KJc4at5ejQxVvS+/LnO4Lo+Fc2eyG1CHT+toAxJ FmSQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding :content-language:in-reply-to:mime-version:user-agent:date :message-id:openpgp:from:references:cc:to:subject :arc-authentication-results; bh=le5dMqbzXnRw9V67oVbNDjO24fl8u5Tgf8P7PSW6FiU=; b=wunDmD3LOOUss/XCK+n0ndfldfNU9wdkizVFVdD7dHTyNT96nAd1TK4l5zrJ6YWsVo BB/d+rNiFwhztwuSeDHaKwz0OqVZ0givfIVQxGickJqZJs1GPhxhSx03iJ2g8wkH5EbX Mhur/S8UfgcStPQGfPiO+AoyFtvQMd4Q/OuONt3zaO/3QupHODZzZHcYxPfS4VyMKvTK faKY4vWUmfN6wr07wAucJoR9VgloP64r12YCpL8HtdvKLWpf8qiaTeBvQ1m1LQbcZOcL YQWJPlyjGO80O7ih/cvCgFPYWkFRR6hFmSAAvtMmAkXzQEuLYjbLOi0iTxN4V2SLn+8s R6YA== ARC-Authentication-Results: i=1; mx.google.com; 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=fail (p=NONE sp=NONE dis=NONE) header.from=canonical.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id k6-v6si14771094pgk.256.2018.06.19.06.14.34; Tue, 19 Jun 2018 06:14:54 -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; 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=fail (p=NONE sp=NONE dis=NONE) header.from=canonical.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S938064AbeFSNNW (ORCPT + 99 others); Tue, 19 Jun 2018 09:13:22 -0400 Received: from youngberry.canonical.com ([91.189.89.112]:53854 "EHLO youngberry.canonical.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S937707AbeFSNNU (ORCPT ); Tue, 19 Jun 2018 09:13:20 -0400 Received: from [123.118.222.68] (helo=[192.168.1.10]) by youngberry.canonical.com with esmtpsa (TLS1.0:DHE_RSA_AES_128_CBC_SHA1:16) (Exim 4.76) (envelope-from ) id 1fVGRg-0005Vp-R4; Tue, 19 Jun 2018 13:13:17 +0000 Subject: Re: [PATCH] Input: elan: enable middle button of touchpads on ThinkPad P52 To: Benjamin Tissoires Cc: linux-input , linux-kernel@vger.kernel.org, KT Liao , Dmitry Torokhov References: <20180612070906.5305-1-aaron.ma@canonical.com> From: Aaron Ma Openpgp: preference=signencrypt Message-ID: <32d6c8c8-7662-3ab4-ca92-2357ca668f4b@canonical.com> Date: Tue, 19 Jun 2018 21:13:10 +0800 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.8.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 06/19/2018 08:21 PM, Benjamin Tissoires wrote: > On Tue, Jun 12, 2018 at 9:10 AM Aaron Ma wrote: >> PNPID is better way to identify the type of touchpads. >> Enable middle button support on 2 types of touchpads on Lenovo P52. >> >> Cc: stable@vger.kernel.org >> Cc: KT Liao >> Signed-off-by: Aaron Ma >> --- >> drivers/input/mouse/elantech.c | 9 ++++++++- >> 1 file changed, 8 insertions(+), 1 deletion(-) > Looks good to me: > Reviewed-by: Benjamin Tissoires > > Aaron, our internal tests show that the P52 shows a lot of lost > synchronization in pre-v4.18 kernels. Do you have a fix for that too? > https://lkml.org/lkml/2018/5/28/694 should fix the sync issue. > In v4.18 we need to fix the elan_i2c module as right now the touchpad > is muted when booted with such a kernel. Does this touchpad support elan_i2c? Regards, Aaron > > Cheers, > Benjamin > >> diff --git a/drivers/input/mouse/elantech.c b/drivers/input/mouse/elantech.c >> index fb4d902c4403..67b061dd4494 100644 >> --- a/drivers/input/mouse/elantech.c >> +++ b/drivers/input/mouse/elantech.c >> @@ -1175,6 +1175,12 @@ static const struct dmi_system_id elantech_dmi_has_middle_button[] = { >> { } >> }; >> >> +static const char * const middle_button_pnp_ids[] = { >> + "LEN2131", /* ThinkPad P52 w/ NFC */ >> + "LEN2132", /* ThinkPad P52 */ >> + NULL >> +}; >> + >> /* >> * Set the appropriate event bits for the input subsystem >> */ >> @@ -1194,7 +1200,8 @@ static int elantech_set_input_params(struct psmouse *psmouse) >> __clear_bit(EV_REL, dev->evbit); >> >> __set_bit(BTN_LEFT, dev->keybit); >> - if (dmi_check_system(elantech_dmi_has_middle_button)) >> + if (dmi_check_system(elantech_dmi_has_middle_button) || >> + psmouse_matches_pnp_id(psmouse, middle_button_pnp_ids)) >> __set_bit(BTN_MIDDLE, dev->keybit); >> __set_bit(BTN_RIGHT, dev->keybit); >> >> -- >> 2.17.1 >> >> -- >> 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