Received: by 10.213.65.68 with SMTP id h4csp690135imn; Tue, 27 Mar 2018 07:04:01 -0700 (PDT) X-Google-Smtp-Source: AG47ELvOo53WJmi9EYCoZ8oaP/iUh22FoJ7SFbCJutfKMI34NMzAFJlDx3MrXPIYMe95HYmQsoZg X-Received: by 10.98.13.23 with SMTP id v23mr32920177pfi.202.1522159441357; Tue, 27 Mar 2018 07:04:01 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1522159441; cv=none; d=google.com; s=arc-20160816; b=wkO+aw863bl91YkbhxRMU3JiiW1Uci/fZfrUIoFnvShPRWWWy4fmZsYPmHPnI+4HFK WSuLVL3mFCwLATSZogC283Kr/VGlWnG4SHybAuf67cNm1MUF81C9IOy/rOBljCIzjQL/ pUXXIa/HFx1BXw1qcVwHhgw98r2ebIVyYgqK4BlxX15dJ0ax98lmv9JmrS7OgJpDcEMk nbNtZFjjHECaZ3VqI2rbwPs4ym8uCqR6XiZ3vasjiYTKVo7W3NZNznYdsHftd8zk3VXx E81Ju/D1dYPluFoc6DosrasvYCs/kpZXffQznyP9axCwS2qrRzU/jR2rydIwBsTuvC7h 6bOQ== 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:organization:from:references:cc:to:subject :arc-authentication-results; bh=vumUwL/GwJy5zJWQ/W1KFY8zAnhg+qg4QK3hIsnXxK8=; b=GnpNLbClVG62Pc78P7VntmJDTpETeQE1/4LikbzGK+9G/+QFihvZXA5dvb5GXbnW+o iiTHcpfj/qzDxYcHUdSDyCDy8cnt+ONSRc5NoNRpyf7htXMyPTqjVp8MOqcaWimi7IWG DDHxqfqql0RnNlEHq+0WfKWMwqUZ7AnGg14YVHwKU4/gr3bRge0/c8LViDo6sLlNh3tA B6V0dDr88+0Aq0rqtUBVfeI8Nh6JdWosE2imryBE3EHiRrd6U9k/aV3tWsdA3Fg1UEyt PcaNXScHBab5c2NTI4ip9/B/wSIr8nr4PQUNuP6PLiAOoLINlrS+68fQY3DjYdcBsSnR dfwg== 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id r15-v6si1504028plj.96.2018.03.27.07.03.24; Tue, 27 Mar 2018 07:04:01 -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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753065AbeC0OAf (ORCPT + 99 others); Tue, 27 Mar 2018 10:00:35 -0400 Received: from a.mx.secunet.com ([62.96.220.36]:55036 "EHLO a.mx.secunet.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752909AbeC0OAb (ORCPT ); Tue, 27 Mar 2018 10:00:31 -0400 Received: from localhost (localhost [127.0.0.1]) by a.mx.secunet.com (Postfix) with ESMTP id 5F381201A7; Tue, 27 Mar 2018 16:00:30 +0200 (CEST) X-Virus-Scanned: by secunet Received: from a.mx.secunet.com ([127.0.0.1]) by localhost (a.mx.secunet.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id i9KKRvdKDxlC; Tue, 27 Mar 2018 16:00:25 +0200 (CEST) Received: from mail-essen-01.secunet.de (mail-essen-01.secunet.de [10.53.40.204]) (using TLSv1 with cipher ECDHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by a.mx.secunet.com (Postfix) with ESMTPS id 01FDE20065; Tue, 27 Mar 2018 16:00:25 +0200 (CEST) Received: from [10.182.7.41] (10.182.7.41) by mail-essen-01.secunet.de (10.53.40.204) with Microsoft SMTP Server (TLS) id 14.3.389.1; Tue, 27 Mar 2018 16:00:24 +0200 Subject: Re: [PATCH] Input: ALPS - add support for 73 03 28 devices (Thinkpad L570) To: =?UTF-8?Q?Pali_Roh=c3=a1r?= CC: Dmitry Torokhov , Masaki Ota , Takashi Iwai , Kees Cook , Nir Perry , , References: <7d5077ef-c185-c6b1-d602-df8d9f7dade3@secunet.com> <20180323143336.v26rvflt3oq5xppn@pali> From: Dennis Wassenberg Organization: secunet Security Networks Message-ID: Date: Tue, 27 Mar 2018 15:56:15 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.6.0 MIME-Version: 1.0 In-Reply-To: <20180323143336.v26rvflt3oq5xppn@pali> Content-Type: text/plain; charset="utf-8" Content-Language: de-DE Content-Transfer-Encoding: 8bit X-G-Data-MailSecurity-for-Exchange-State: 0 X-G-Data-MailSecurity-for-Exchange-Error: 0 X-G-Data-MailSecurity-for-Exchange-Sender: 23 X-G-Data-MailSecurity-for-Exchange-Server: d65e63f7-5c15-413f-8f63-c0d707471c93 X-EXCLAIMER-MD-CONFIG: 2c86f778-e09b-4440-8b15-867914633a10 X-G-Data-MailSecurity-for-Exchange-Guid: 65006A73-BE1A-49A5-86B0-9F78ECB9DD00 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi, oh ok, understood. Thanks for this hint. So maybe there is something wrong with the alps_update_dual_info_ss4_v2 function or the reporting of the hardware. alps_update_dual_info_ss4_v2 detects the ThinkPad L570 as ss4plus device but not as dualpoint device. This means that the ALPS_DUALPOINT and the ALPS_DUALPOINT_WITH_PRESSURE flag will not be set which results in a non function trackstick and hardware mouse buttons. Each time I touch the trackstick I get the message: "alps: Rejected trackstick packet from non DualPoint device". The value of otp[0][0] inside alps_update_dual_info_ss4_v2 is 0xCE. Are there any ideas why it is not detected as dualpoint device? Thank you & best regards, Dennis On 23.03.2018 15:33, Pali Rohár wrote: > On Friday 23 March 2018 15:23:55 Dennis Wassenberg wrote: >> The Lenovo Thinkpad L570 uses V8 protocol. >> Add 0x73 0x03 0x28 devices to use V8 protovol which makes >> trackstick and mouse buttons work with Lenovo Thinkpad L570. >> >> Signed-off-by: Dennis Wassenberg >> --- >> drivers/input/mouse/alps.c | 2 ++ >> 1 file changed, 2 insertions(+) >> >> diff --git a/drivers/input/mouse/alps.c b/drivers/input/mouse/alps.c >> index dbe57da..5523d4e 100644 >> --- a/drivers/input/mouse/alps.c >> +++ b/drivers/input/mouse/alps.c >> @@ -136,6 +136,8 @@ >> { { 0x73, 0x02, 0x0a }, { ALPS_PROTO_V2, 0xf8, 0xf8, 0 } }, >> { { 0x73, 0x02, 0x14 }, { ALPS_PROTO_V2, 0xf8, 0xf8, ALPS_FW_BK_2 } }, /* Ahtec Laptop */ >> { { 0x73, 0x02, 0x50 }, { ALPS_PROTO_V2, 0xcf, 0xcf, ALPS_FOUR_BUTTONS } }, /* Dell Vostro 1400 */ >> + { { 0x73, 0x03, 0x28 }, { ALPS_PROTO_V8, 0x18, 0x18, >> + ALPS_DUALPOINT | ALPS_DUALPOINT_WITH_PRESSURE | ALPS_BUTTONPAD } }, /* Lenovo L570 */ >> }; >> >> static const struct alps_protocol_info alps_v3_protocol_data = { > > Hi! alps_model_data table is used for fixed identification of v1 and v2 > protocols. Why you need to add there v8 protocol which autodetection is > already done in alps_identify() function? There is already code: > > } else if (e7[0] == 0x73 && e7[1] == 0x03 && > (e7[2] == 0x14 || e7[2] == 0x28)) { > protocol = &alps_v8_protocol_data; > > Which matches above your E7 detection 0x73, 0x03, 0x28. > > Also you patch matches basically all v8 device and therefore has > potential to break proper v8 autodetection for other v8 devices... >