Received: by 2002:a25:86ce:0:0:0:0:0 with SMTP id y14csp420857ybm; Mon, 20 May 2019 19:28:35 -0700 (PDT) X-Google-Smtp-Source: APXvYqx20gA40BV8M2P4Jvlv/UvXS3HVxAYKDPTYH1qQRziYgcTxEtU+qtzsxLS4H/gYUMm82pkt X-Received: by 2002:a17:902:8ec4:: with SMTP id x4mr69309917plo.249.1558405715510; Mon, 20 May 2019 19:28:35 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1558405715; cv=none; d=google.com; s=arc-20160816; b=fQ6cfZgOGXZmzekek116H8Mu/rp6y4s050SDvRHvHMdi6VyyPIaaM1PxikDMIW5+ay KMMVrvRzzMnmGvJA0gg5WD8a+e0hHjakpg9InhNoHoTU9uQ8DMVCOPk6MT9gBx+wCukq /eI3gfi/QdozfaPwyu/HgL2FHOJZCS2mHBySQOVdhrflPwMCV1ruhj2f2hdCMRaTpFeT ZDOibPcy9f5Av1emrWGq6HiFxiYfHFCIYh5me3J1ow6awoW0eFe76ybWQGItUciDok0k fpjbpA0p8H3DpgI8KTj+YdlDCIzd5qv4fwEAh85uuAie2JLSh+VAs8mHEKE5Ood+qEkN dpfA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-language :content-transfer-encoding:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:subject; bh=Umtrob5QFkAWLKN28QyAdemQIbftvNJ9p47lP3OKsMU=; b=zqjqEbqOSC0d9o33mfozY4wq59bPf4PmbuvpA1iqcgehogWmm3LhSn14metosAcjnB pRsui6Lvd+Na2oY5qiqZHybcOUBMfPmgJIiCXKU5AUatYrtIpBCjvXQXDf7eHvgSX5XD yAGBJSUuk63TNCyUzvP/5HvHZVE9uOlAGIPN6yHOiDcS7SNMZ2d57n2W1KSjXkAsJkCh W/W2S2f50gzPYVHfc1XQyN6qvvH7L51Z7V77wlpUjkfNo8m6vkdQeLWE7f5UEWqqlYT7 KQuxEf2fM/19TiwOZvoO4RaKbJtiMTOCUSnMXWC81KgiEvlL0IOmkqm1IE0vZy42RID5 9+bw== 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=canonical.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id s61si17143141plb.259.2019.05.20.19.28.18; Mon, 20 May 2019 19:28:35 -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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=canonical.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727578AbfEUC1F (ORCPT + 99 others); Mon, 20 May 2019 22:27:05 -0400 Received: from youngberry.canonical.com ([91.189.89.112]:57827 "EHLO youngberry.canonical.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726548AbfEUC1F (ORCPT ); Mon, 20 May 2019 22:27:05 -0400 Received: from [125.35.49.90] (helo=[10.0.0.21]) by youngberry.canonical.com with esmtpsa (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.76) (envelope-from ) id 1hSuUV-0003UZ-4L; Tue, 21 May 2019 02:26:59 +0000 Subject: =?UTF-8?B?UmU6IOetlOWkjTogW1BBVENIXSBpbnB1dDogYWxwcy1maXggdGhlIGlz?= =?UTF-8?Q?sue_the_special_alps_trackpoint_do_not_work=2e?= To: Xiaoxiao Liu , XiaoXiao Liu , "dmitry.torokhov@gmail.com" Cc: "pali.rohar@gmail.com" , "linux-input@vger.kernel.org" , "linux-kernel@vger.kernel.org" , Xiaojian Cao , "zhangfp1@lenovo.com" References: <20190520110149.27107-1-sliuuxiaonxiao@gmail.com> From: Hui Wang Message-ID: <345b62e1-407e-7a03-9b03-486bbf5a0a8e@canonical.com> Date: Tue, 21 May 2019 10:26:47 +0800 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.6.1 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=gbk; format=flowed Content-Transfer-Encoding: 8bit Content-Language: en-US Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Tested-by: Hui Wang On 2019/5/21 ????9:07, Xiaoxiao Liu wrote: > Add Pali Roh??r. > > -----?ʼ?ԭ??----- > ??????: XiaoXiao Liu > ????ʱ??: Monday, May 20, 2019 7:02 PM > ?ռ???: dmitry.torokhov@gmail.com > ????: linux-input@vger.kernel.org; linux-kernel@vger.kernel.org; hui.wang@canonical.com; ?? ?Խ? Xiaojian Cao ; zhangfp1@lenovo.com; ?? ?ԕ? Xiaoxiao Liu ; XiaoXiao Liu > ????: [PATCH] input: alps-fix the issue the special alps trackpoint do not work. > > when the alps trackpoint is detected and using the alps_v8_protocol_data procotol, the alps driver will not report the input data. > > solution: use standard mouse driver instead of alps driver when the specail trackpoint was detected. > > Signed-off-by: XiaoXiao Liu > --- > drivers/input/mouse/alps.c | 23 ++++++++++++++++++++++- > 1 file changed, 22 insertions(+), 1 deletion(-) > > diff --git a/drivers/input/mouse/alps.c b/drivers/input/mouse/alps.c index 0a6f7ca883e7..516ae1d0eb17 100644 > --- a/drivers/input/mouse/alps.c > +++ b/drivers/input/mouse/alps.c > @@ -24,7 +24,7 @@ > > #include "psmouse.h" > #include "alps.h" > - > +#include "trackpoint.h" > /* > * Definitions for ALPS version 3 and 4 command mode protocol > */ > @@ -2864,6 +2864,22 @@ static const struct alps_protocol_info *alps_match_table(unsigned char *e7, > return NULL; > } > > +int alps_check_is_trackpoint(struct psmouse *psmouse) { > + u8 param[2] = { 0 }; > + int error; > + > + error = ps2_command(&psmouse->ps2dev, > + param, MAKE_PS2_CMD(0, 2, TP_READ_ID)); > + if (error) > + return error; > + > + if (param[0] == TP_VARIANT_ALPS) > + return 0; > + psmouse_warn(psmouse, "It is not alps trackpoint.\n"); > + return -ENODEV; > +} > + > static int alps_identify(struct psmouse *psmouse, struct alps_data *priv) { > const struct alps_protocol_info *protocol; @@ -2912,6 +2928,11 @@ static int alps_identify(struct psmouse *psmouse, struct alps_data *priv) > protocol = &alps_v3_protocol_data; > } else if (e7[0] == 0x73 && e7[1] == 0x03 && > (e7[2] == 0x14 || e7[2] == 0x28)) { > + if (alps_check_is_trackpoint(psmouse) == 0) { > + psmouse_warn(psmouse, > + "It is alps trackpoint, use the standard mouse driver.\n"); > + return -EINVAL; > + } > protocol = &alps_v8_protocol_data; > } else if (e7[0] == 0x73 && e7[1] == 0x03 && e7[2] == 0xc8) { > protocol = &alps_v9_protocol_data; > -- > 2.20.1 >