Received: by 2002:ac0:a5b6:0:0:0:0:0 with SMTP id m51-v6csp5113645imm; Tue, 19 Jun 2018 05:22:47 -0700 (PDT) X-Google-Smtp-Source: ADUXVKIruQTwVkX7DUBeOuJ5piTY7i6ZtRMXTcL/0c58q7iJvNtn0T+ZHxkfT153VCR990p3+6pu X-Received: by 2002:a63:be0a:: with SMTP id l10-v6mr14348176pgf.87.1529410967878; Tue, 19 Jun 2018 05:22:47 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1529410967; cv=none; d=google.com; s=arc-20160816; b=AmhtEygYYtINkFahR8mzaEVD9WPkUtt5ibYyKhF3VWCS3SMs/C94RrKIierjKYv78D G14eZz8R2bQH2qpL9a2fINY38RWYPJAER633CZvz/7tPusgAbIwxZ4GUjDe1e0YoXEoY twx+Po0L6zlnb2sM+MtLvB7OiklacPnU07O9LDav3BiZD9Pibg/0QUJWMIJyMbRfDEva 8Ed76IsElSypvSGCz9vn6qZdKy81UEWJfeXvUszkMrz79BQgrtafq051qxCDvoHcQrW5 0Tk06YzGmIe8In0etrsxBpuMmiQDkUP4vMehLbjYOtJekiAvYY/T5eKD1WLZC07MjQhE I+pQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:dkim-signature :arc-authentication-results; bh=thZumHThLbN7Zp7jNU/sMMyrGSJfaAImA3M7wMuuV20=; b=tdBiFiVdJDZMzr6jyvMBO/3w+DsZ/8/UIXOzRYWAU36dI02Q090XRgWKEpmZxxLq/A AhW4WIeUC795B+HLz+GxGBRO8m+pJX7ipodUkMJ9XKSPDsQvKT/QpJ2Tzm+I14ytzocK ARtWpomZXm35MIh1JOyouj3nnCvq5abheZ/WDAzwVVbPaQsWlO+Jvdz1k7IHuanEjVz5 1xCJNwZ/ivyC2uoC2E0D0hzn2Tg8AvDhFpthxH2T+I71YglCxPXeanu0h2HqDHIsOvzd ZPKg0FsHM7FMAq/f0QxpjqOEhRA2T7t6qsuo+v1JuaXICWy9C3PZJwA2rmgdvw/ZlpSf 24jg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=mXE92Sj9; 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 c14-v6si13926597pgw.478.2018.06.19.05.22.33; Tue, 19 Jun 2018 05:22:47 -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=mXE92Sj9; 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 S937718AbeFSMVy (ORCPT + 99 others); Tue, 19 Jun 2018 08:21:54 -0400 Received: from mail-lf0-f65.google.com ([209.85.215.65]:37123 "EHLO mail-lf0-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S937502AbeFSMVw (ORCPT ); Tue, 19 Jun 2018 08:21:52 -0400 Received: by mail-lf0-f65.google.com with SMTP id g21-v6so29823397lfb.4; Tue, 19 Jun 2018 05:21:51 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=thZumHThLbN7Zp7jNU/sMMyrGSJfaAImA3M7wMuuV20=; b=mXE92Sj93uXBhc990NKQPOtrHKpVaYtkZRRVJoLlGsMd9bQgIE7ZfySFxWTQtTQCMJ g2eaGrCyPYD6xXiWQXTBJN0bYbKFucyxY9n/UeboWUHS0vTxBzxR6hB707DkU/LpodO3 p+1h9tcZMSxxEElu/DST/zPW50Ayh7gdSIZLlmulmodb+yl34OBGRCCDpx9hUAETmeNV 90OAV7TsOD14gsRR4IjLEOV1ffrgPnJtzIczU9l8gSgxoJLO+4HYqyeyo4AfjGhf611d diSKJ74i/nyfSWb/n9H4HLfH1JeH9ZQMdN7VPEleG2TXln4EvTSER6BSoYDCyllGKEr4 h7Ig== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=thZumHThLbN7Zp7jNU/sMMyrGSJfaAImA3M7wMuuV20=; b=BAfnnIPiCDIakjNa4HioyCds8MnRA89kam61Pnw3rVuDBaYbSD7WJJLRk+7ywdXNWP ps9sAyPSI4r6WWF7d6gMLc6AmWbQXLK9eVcKgtwPrihtLLFUfHWml+e6/rwndG3uD3q9 g6168EttYUXepD7sXkNhUcqw/FtLIpeTY5N4XUjqd/gzElhKtHg2bjncIHOqoRYem/K3 DzRzFTKL2R+WMVaMMZPdk5aOjXnrchmXso51+5uD5F2qJBan6slnSgSHo7lwF0TLrQmo gONkhXSxerE9rNDdhW4UYuKRzNE5CJKQ4gTcSII8U2EOBCqHukJswfkCzYxbRMRvD/7r +5SQ== X-Gm-Message-State: APt69E1YXeDKsyHNX4BmcdkKZOpoPW/XzKENdKgyTxoFv0rAvKpbgLqg f2zyH5gkr3mR/OaTA9wHB+vR3PGeSrWVBOT2XWw= X-Received: by 2002:a2e:84d7:: with SMTP id q23-v6mr10630316ljh.126.1529410910886; Tue, 19 Jun 2018 05:21:50 -0700 (PDT) MIME-Version: 1.0 References: <20180612070906.5305-1-aaron.ma@canonical.com> In-Reply-To: <20180612070906.5305-1-aaron.ma@canonical.com> From: Benjamin Tissoires Date: Tue, 19 Jun 2018 14:21:39 +0200 Message-ID: Subject: Re: [PATCH] Input: elan: enable middle button of touchpads on ThinkPad P52 To: aaron.ma@canonical.com Cc: linux-input , linux-kernel@vger.kernel.org, KT Liao , Dmitry Torokhov Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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? In v4.18 we need to fix the elan_i2c module as right now the touchpad is muted when booted with such a kernel. 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