Received: by 10.213.65.68 with SMTP id h4csp426309imn; Fri, 23 Mar 2018 07:35:13 -0700 (PDT) X-Google-Smtp-Source: AG47ELuArj78lYBMTe09sXUDfhonoYNCNjOAn8X534naYaAqnuq8Iz+KaVMt8Gj+sWAx2pdjK/kG X-Received: by 10.98.31.86 with SMTP id f83mr14368729pff.196.1521815713532; Fri, 23 Mar 2018 07:35:13 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1521815713; cv=none; d=google.com; s=arc-20160816; b=z7E2m2E3dxm73Q7zD2Owcs6+bCJKTnHVYQ0GUUOmS5ISJ6XT7RwLlTjN3zXcf3ke6E mZAxv6h4AF4nsOnv+qRvpZNG287m5DY5FDR2nBTb5P2XY57UVWZ8lt5k8n7xhyKej5Ue amak/wu3oKAuCcQTpwIT0VVxpxYuDkFD/BgClSLerncUzLzQveTvEhS4+dq9eA6XF44f TMrTgNWQM5eh3VIduvtMXCcxgLz2UXbEQygRfwgsdgr1/QqegjN4KQtz0R1l+rHtg6ML 35i4WatQlMtwh9KicNsPE8xCzgoplyLZbjkVVTlcNqcofY47XaIRWp76NtVFrTDFLQxK iP6A== 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=0RPyM+NoGbuI6dF8lZx7tRZVqyz/Dkm3zF6uRj9/Dpw=; b=exKCbl6STxoHkTtTP1nVU3M2WTcVhrX6EhyafMmuNVZ/DYh9+lqLgMOnySEbQZwjgN CGOACXtXYyZ0Va74d7T14yisbEY6H5JYWZLfM+MbMyMMQZBAw0NXIwRVOxVTYnwArqou pkGez4GP+Hs3yuw7QShmoLX5o06IOHiIMU4pFOkohRXYIzZJJ3lV478b8VNm06WJptRa kYyNUfZa3nLB7R9tKHg5VbcJWnD9xMjEd8HLfNUhKnz89o9Ql34cXPEPZ2FBbzGs1P7N y93nJlmEeanP5lYMo2xukOpv6Melhp10E4NmdLwqME4BUACLg+Tbdm4cXDyQVR3/eSAu 6Y/w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=hMylGFmE; 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 x10-v6si8531278plm.487.2018.03.23.07.34.58; Fri, 23 Mar 2018 07:35:13 -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=hMylGFmE; 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 S1751832AbeCWOdl (ORCPT + 99 others); Fri, 23 Mar 2018 10:33:41 -0400 Received: from mail-wr0-f194.google.com ([209.85.128.194]:33941 "EHLO mail-wr0-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751796AbeCWOdj (ORCPT ); Fri, 23 Mar 2018 10:33:39 -0400 Received: by mail-wr0-f194.google.com with SMTP id o8so12351900wra.1; Fri, 23 Mar 2018 07:33:39 -0700 (PDT) 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=0RPyM+NoGbuI6dF8lZx7tRZVqyz/Dkm3zF6uRj9/Dpw=; b=hMylGFmEy6jTEHaU3syP8FNlfPkR2EvTcdm8EhxSGUgdhAznCzkV198WXjA/WOStHu BBfXfEyM8WLt0BtNhynOKpQM0ORTN0ROnlH6XhICLCTm5z7vjpcMrKWr0HvurP6a27nR ZhsOkrEAnQXLyxS0h5Bekq9GIWnzTNaCi7dAuUuxsqSZ0GpUVNQhTvo8AoSymiIc0Gkx IPwyLOX9eBkakFNzGeJFqEMtx7z92zMzAxkDzuJ94a/YHAkjlTKIMAvH1F2AjPaP4Wsz 83T7EftwbxFAcGCAyxtXqmlWnBSmg0kDy6Xqc1yxtC3gEBFcpY5EcVIzZMCxlbl15QCP h8gA== 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=0RPyM+NoGbuI6dF8lZx7tRZVqyz/Dkm3zF6uRj9/Dpw=; b=daXO2O1ffkj0Lbb/JNmDKseyHcnGvcANgAsAghYJk6pinlEtYVng/f843V8BOEVfjO VMjQDRdC3M40SvSDunjzk0LzIyObtO95fOsf0h/y+XYdWwvpwQ568OeJXh9WhvIer9Ye W39AINeDXsKgO/ovg2l7wvIu9v055mycQbbYTyQ53WYflyDIdYA8X3P1glNLu73fwJCQ aOaQFWfrkxnFZJPOKGqytXBbxpGlz9pBbIHrTsYH8//pAe0bybSsua16R6Op4tsdaX0J 9CTeBmVWomM5+dpRDggJokUMETuXezzU6NKTQcAe1Xe+tPGjgH/ULD6TY0xPCcGcyiv1 xaZw== X-Gm-Message-State: AElRT7H6z9pWk8/peiRtQqVuf0Kk+d53uti5CLVYNp9YvX+B/DZUNGYg X5Dcdxza2BWcd0VgoJqSYws= X-Received: by 10.223.128.40 with SMTP id 37mr24753201wrk.73.1521815618526; Fri, 23 Mar 2018 07:33:38 -0700 (PDT) Received: from pali ([2a02:2b88:2:1::5cc6:2f]) by smtp.gmail.com with ESMTPSA id v191sm5806898wmf.34.2018.03.23.07.33.37 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Fri, 23 Mar 2018 07:33:37 -0700 (PDT) Date: Fri, 23 Mar 2018 15:33:36 +0100 From: Pali =?utf-8?B?Um9ow6Fy?= To: Dennis Wassenberg Cc: Dmitry Torokhov , Masaki Ota , Takashi Iwai , Kees Cook , Nir Perry , linux-input@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH] Input: ALPS - add support for 73 03 28 devices (Thinkpad L570) Message-ID: <20180323143336.v26rvflt3oq5xppn@pali> References: <7d5077ef-c185-c6b1-d602-df8d9f7dade3@secunet.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <7d5077ef-c185-c6b1-d602-df8d9f7dade3@secunet.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 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... -- Pali Rohár pali.rohar@gmail.com