Received: by 10.223.164.202 with SMTP id h10csp3746578wrb; Sat, 25 Nov 2017 16:17:26 -0800 (PST) X-Google-Smtp-Source: AGs4zMYsbPvT3p1HpV3yqgt2NRxZPd319ezKrQj66TLb1hvWniWS9B41kVfXbK083DJDCHTeQJQC X-Received: by 10.84.164.165 with SMTP id w34mr13509771pla.73.1511655446279; Sat, 25 Nov 2017 16:17:26 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1511655446; cv=none; d=google.com; s=arc-20160816; b=RuDZLLOqRtUHgopUvSXNzdenGeqxOU+CdB40R8PRVI5CK/AtPasKaE4XqnXycc0lnS 7aU4F4pSWefUXnqCr9TkhiMNEjLPTbR0V8jZEKU5XHD2UG56L84/fFb8o6j20r37mV6f su+C7lpo5A6MnluyYcw0EWkwJKuN/uakWpsLPV4143sl4uCJNOTWdhpbAzte+uWSrFTT 9aq27WD+YLfl1MdK3M2MCK4q3G5vx7iu07BSbqmdyn43QEdIDq8w1OX9O7ItadFqQR46 d2q+txeFCZ8A9CMrwDoN77K2T/AqFvwpRnGYP/tEiGE00685xpcUkyVtfKuAavVNuh5Q TW1w== 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=t80ecbtqkEuaBs6T7f6x1OwTbofaZtiMWosEn0pG/cA=; b=YB8pw3znXfWZqq3Zhaw1QH5GZd7zwD5COvHnol6ZQN8i76dlWpPBR3AOfHt86M5lPn 91buVMNSRO+a7at0icxADGHXSe4RadQ0JMoeP2OtKzkRIb8cUaQahfWIpXT1wzVl8zWs bopeFvcjOsNuy2jP2Wj/eGHqO5RZPKUYuctP9GoKnz8++go30hjd21i/6hILjFn72vI8 tUfVTix8O15gojDNKvb0L7gXp3JThrlPUAgkzKU85IXD/tuPjcW5ikADU9RHuOYNu6pX eF0KZXTcqdQwB46XbBBVK8FAp6S8vWWiSu6EnMoYUw8QpC5juP2r7w5mV31ai5Rkb5ay QSBA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=AKhLkbw1; 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 v11si20069205plp.761.2017.11.25.16.17.04; Sat, 25 Nov 2017 16:17:26 -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=AKhLkbw1; 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 S1751796AbdKZAQG (ORCPT + 81 others); Sat, 25 Nov 2017 19:16:06 -0500 Received: from mail-io0-f193.google.com ([209.85.223.193]:45866 "EHLO mail-io0-f193.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751415AbdKZAQE (ORCPT ); Sat, 25 Nov 2017 19:16:04 -0500 Received: by mail-io0-f193.google.com with SMTP id z74so32782008iof.12; Sat, 25 Nov 2017 16:16:04 -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:in-reply-to:user-agent; bh=t80ecbtqkEuaBs6T7f6x1OwTbofaZtiMWosEn0pG/cA=; b=AKhLkbw1gLIqv5gkW9HOeWha/CaQf7HZ+hroY+75mu7JXncLahH4ev/6wlk0hdasy4 lwEoD57yIv+k1AlsncU1px8S8CbgBYAMId1xvJl2cgV2X8wyWq8mLkII2BlhYE/mzTxo fH2519XGyqQs8wk2C0gkR5i2UDkvQM0hb5o65DTgBjmljQty4kDQsm+Kr8XMZTa+kMgX ABXReBWyVZamqoM8kLAE/NSja20doVl2UV8UzqwqZ2x0ZtKerRj80aLZQ6JiselbeGLm ZsucNzYKYOY7DB60vUP/p/Pb5zeAMfsPKe+ogsZ4p3VEA0LwTY+TJkIpWSoqHvzKxD/N VvLw== 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=t80ecbtqkEuaBs6T7f6x1OwTbofaZtiMWosEn0pG/cA=; b=T/PK7VfhsNRbQcCLbTdAUn6K7y1XUfP+BTlSd/mfz2wykqAFZAOg3ExSd0CSiSfBKJ ZmK3UVNihJH3IeTHXxLOCzhsGMVyW2t3ZOvZNgvlhaRk4dq7RVxL+SF2MBDsipzy7Iy0 0Q0fe4GycpZQdr5fQuq8w6CTVKq2BSClpMFThlELgIOOT9+nbLjN/mxZD4GQV0Vye2s0 bQaeYAGiKYePk1cNWGyVIIzihKYnRrjaV0ybPzSSmYSOENRyCVErmy9A4GLlrsUE/8zA g7ItGTdA3pYlW2gFI52lamZ/CuUtCX1htWodHn7MZeJr47mVNLmrPe7s6uhhCijTHxix HLTg== X-Gm-Message-State: AJaThX673dZFvvXEXH9H/nCmqCWNAzlnZeXA9LuKVq2WX5dS7bRPQ0/c EyPIySZer4q0QIK2xlYYedk= X-Received: by 10.107.200.148 with SMTP id y142mr36738138iof.92.1511655363245; Sat, 25 Nov 2017 16:16:03 -0800 (PST) Received: from dtor-ws ([2620:0:1000:1611:da80:8749:c06f:9515]) by smtp.gmail.com with ESMTPSA id p124sm8005229iof.10.2017.11.25.16.16.02 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Sat, 25 Nov 2017 16:16:02 -0800 (PST) Date: Sat, 25 Nov 2017 16:15:59 -0800 From: Dmitry Torokhov To: Masaki Ota <012nexus@gmail.com> Cc: benjamin.tissoires@redhat.com, pali.rohar@gmail.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: <20171126001559.uqeud7wxgjhkldgd@dtor-ws> References: <20171120075530.4880-1-masaki.ota@jp.alps.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20171120075530.4880-1-masaki.ota@jp.alps.com> User-Agent: NeoMutt/20170609 (1.8.3) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi, On Mon, Nov 20, 2017 at 04:55:30PM +0900, 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. Is it custom protocol over SMBus/I2C or HID (via i2c-hid)? If it is custom protocol, can we add the proper driver to the kernel for it so we can get away from the PS/2 emulation in firmware? Thanks! > - 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. > > 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; > } > -- > 2.14.1 > -- Dmitry From 1584850981576342513@xxx Thu Nov 23 10:07:56 +0000 2017 X-GM-THRID: 1584570916340987763 X-Gmail-Labels: Inbox,Category Forums,HistoricalUnread