Received: by 10.223.164.202 with SMTP id h10csp3537345wrb; Mon, 20 Nov 2017 00:30:35 -0800 (PST) X-Google-Smtp-Source: AGs4zMZWRbv77FB9tULd+VCCNyFWTm4GmXZ/XuLIKTJKxITEsO8GU6xUUpTbQdnodEL1NeUYUYgE X-Received: by 10.99.177.8 with SMTP id r8mr81202pgf.365.1511166635580; Mon, 20 Nov 2017 00:30:35 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1511166635; cv=none; d=google.com; s=arc-20160816; b=pdJEsoNxfH2PfiSBgJs/4tZ2RI5BOVe3cTBsu4M5Z0jDSbJrlPER20gOaeTE4/ekht bROR/khPJ/sIAeIIXylhmA/5tyit8YiL1Gc/7NxJaqCQVPX7sK9UuOBDxPu8y9S78YjJ Gq4GreAgpwYia120cBP5X3bs5UNOxebIAwPqClrN22A4Vh+flTAlomkKjJ3EOHp93kfi Eu4KQ1yYXmcPZ1am3RuCuxkl9r4wITmPr6ji0MmW8x4T1D3HwAPNSDIJ87LZece8WgVD lpGLcvII+QNnn3ZIgJxEVRSoM3DTztfGAF2FAbNT45nXh1u6BlRHa+sffq2jyIbxAzRP 3i6Q== 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-transfer-encoding:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature :arc-authentication-results; bh=WKtq+CzzyEv51p/TzxYzWJTNXMD21tD5RIN8bJp+Qpc=; b=uqvu9gG4wRcA/xDOnoMP4X8PIG74Fnt5TUhGAXvZdIiQrozeIERsScHGY1ghFDIv0x +Yw4H2ajTMhWdHNeJikGfnpUBX3nG/wZHnRXjQ/eYQRf34fPWIOfxnZL0fx67QNGwlW1 xRebC9R1z4ueYVVYjtoe/BgvGtKJ9Jsyg1qzgZN/FmsM5ZeVXDwROFKyfUrmXiX47bQC 3ILq3L7C07Ibfd9/7N8AfNz/aWZxUsAjFHNYI0UgqcEshGSdTkOz5Zt+thc4CKaKtPlb hDpeEZqOs4vOPFv+3pAflQpfayeBzujbqofyceyconpmG2gj9OHGAQnJC41xQdujfaZt GniA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=bK2q0ek+; 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=NONE 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 3si7693227pli.734.2017.11.20.00.30.24; Mon, 20 Nov 2017 00:30:35 -0800 (PST) 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=bK2q0ek+; 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=NONE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751073AbdKTI3r (ORCPT + 68 others); Mon, 20 Nov 2017 03:29:47 -0500 Received: from mail-wr0-f193.google.com ([209.85.128.193]:39312 "EHLO mail-wr0-f193.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750777AbdKTI3p (ORCPT ); Mon, 20 Nov 2017 03:29:45 -0500 Received: by mail-wr0-f193.google.com with SMTP id 11so3939996wrb.6; Mon, 20 Nov 2017 00:29:44 -0800 (PST) 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:content-transfer-encoding:in-reply-to :user-agent; bh=WKtq+CzzyEv51p/TzxYzWJTNXMD21tD5RIN8bJp+Qpc=; b=bK2q0ek+G2VXrwWMXELKwFQtS/DKU0OWESY6fA4Q6vmFaCb0YTOoCt04W+6FJVfEoX ONLtwuL5fPQ5/e28WwdLcZDLYdGUCBs4aj4Wfw4qEqwAJE8oMjbYt0aHGvD7UU+4Sy9j DeTYulC6pRT7edr6YBF6vzqEIpXfbFrwaRcfwj24u7KGrlY6EQv/+r+xEAxa7OBHajKX 9EbjtJnqqnWmsglyOf2qSGxBXwwua+dhsCGx8hCbM0u/XC/MLCH7yldZVo9JZvW6ZjeA WtawAK94OByi2E8PcQme/sYaSoxBUNqTKJQaYFlsvr6g/H4lCZnAI6/nw+mi+BkFkMlJ o81Q== 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:content-transfer-encoding :in-reply-to:user-agent; bh=WKtq+CzzyEv51p/TzxYzWJTNXMD21tD5RIN8bJp+Qpc=; b=r96CRFzVEz25xnqtWULvtaKOgZVlNv5t9lYX4L4DA+WFZb+Cb/hV9jDjmuUnOjX9M5 3C62oodBSCw+qbPvQ22Vq/r3wwKF+2lTmSJehHohiaoeZ0Q/R/4bbS53gn2RUL2wWa6h cmjIGddgOtVEuRrVXlFoX42aBoAQoacEzPwkmJWV6/+UmpTLWfqYj39edrTWx8Dd45OD fMr2OCL3S6wYrW+UtHBEKshQ/6Y5y35ZZpzwwom1kJ8QKE/p+R7fFE4EYqXCTwTkET5d tkTuWp2g1fK/lwHxVY4pmYNGmBAno3/+NWTS2fhLbPbnmOQV88X1vA4LbC5f7bZOJ589 qNWg== X-Gm-Message-State: AJaThX70qpoAgnhgw/P2Pgf0CO1TgJjcJvuDLuxLnVb3NhmRpF9CWdsp hPdDSfytIyfAOnSZnbGMW88= X-Received: by 10.223.129.41 with SMTP id 38mr11595833wrm.57.1511166584138; Mon, 20 Nov 2017 00:29:44 -0800 (PST) Received: from pali ([2a02:2b88:2:1::5cc6:2f]) by smtp.gmail.com with ESMTPSA id n7sm11464500wra.23.2017.11.20.00.29.42 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Mon, 20 Nov 2017 00:29:43 -0800 (PST) Date: Mon, 20 Nov 2017 09:29:42 +0100 From: Pali =?utf-8?B?Um9ow6Fy?= To: Masaki Ota <012nexus@gmail.com>, dmitry.torokhov@gmail.com Cc: benjamin.tissoires@redhat.com, aaron.ma@canonical.com, jaak@ristioja.ee, masaki.ota@jp.alps.com, linux-input@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH] Support TrackStick of Thinkpad L570 Message-ID: <20171120082942.hgvxguc6vjusi52k@pali> References: <20171120075530.4880-1-masaki.ota@jp.alps.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <20171120075530.4880-1-masaki.ota@jp.alps.com> User-Agent: NeoMutt/20170113 (1.7.2) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Monday 20 November 2017 16:55:30 Masaki Ota wrote: > From: Masaki Ota > - The issue is that Thinkpad L570 TrackStick does not work. Because the main interface of Thinkpad L570 device is SMBus, so ALPS overlooked PS2 interface Firmware setting of TrackStick. The detail is that TrackStick otp bit is disabled. > - Add the code that checks 0xD7 address value. This value is device number information, so we can identify the device by checking this value. > - If we check 0xD7 value, we need to enable Command mode and after check the value we need to disable Command mode, then we have to enable the device(0xF4 command). > - Thinkpad L570 device number is 0x0C or 0x1D. If it is TRUE, enable ALPS_DUALPOINT flag. So, the root of this problem is in ALPS firmware which provides wrong information to kernel? Masaki, I have two questions: 1) Can ALPS or Lenovo release a new firmware update for this Thinkpad to fix this issue? 2) Have all Thinkpad L570 machines trackpoint? Dmitry, as a workaround for firmware bug on particular notebook, would not be better to check DMI information and DMI based hook? > Signed-off-by: Masaki Ota > --- > drivers/input/mouse/alps.c | 21 ++++++++++++++++++--- > 1 file changed, 18 insertions(+), 3 deletions(-) > > diff --git a/drivers/input/mouse/alps.c b/drivers/input/mouse/alps.c > index 850b00e3ad8e..cce52104ed5a 100644 > --- a/drivers/input/mouse/alps.c > +++ b/drivers/input/mouse/alps.c > @@ -2541,13 +2541,28 @@ static int alps_update_btn_info_ss4_v2(unsigned char otp[][4], > } > > static int alps_update_dual_info_ss4_v2(unsigned char otp[][4], > - struct alps_data *priv) > + struct alps_data *priv, > + struct psmouse *psmouse) > { > bool is_dual = false; > + int reg_val = 0; > + struct ps2dev *ps2dev = &psmouse->ps2dev; > > - if (IS_SS4PLUS_DEV(priv->dev_id)) > + if (IS_SS4PLUS_DEV(priv->dev_id)) { > is_dual = (otp[0][0] >> 4) & 0x01; > > + /* For support TrackStick of Thinkpad L570 device */ > + if (alps_exit_command_mode(psmouse) == 0 && > + alps_enter_command_mode(psmouse) == 0) { > + reg_val = alps_command_mode_read_reg(psmouse, 0xD7); > + } > + alps_exit_command_mode(psmouse); > + ps2_command(ps2dev, NULL, PSMOUSE_CMD_ENABLE); > + > + if (reg_val == 0x0C || reg_val == 0x1D) > + is_dual = true; > + } > + > if (is_dual) > priv->flags |= ALPS_DUALPOINT | > ALPS_DUALPOINT_WITH_PRESSURE; > @@ -2570,7 +2585,7 @@ static int alps_set_defaults_ss4_v2(struct psmouse *psmouse, > > alps_update_btn_info_ss4_v2(otp, priv); > > - alps_update_dual_info_ss4_v2(otp, priv); > + alps_update_dual_info_ss4_v2(otp, priv, psmouse); > > return 0; > } -- Pali Rohár pali.rohar@gmail.com From 1584570916340987763@xxx Mon Nov 20 07:56:25 +0000 2017 X-GM-THRID: 1584570916340987763 X-Gmail-Labels: Inbox,Category Forums,HistoricalUnread