Received: by 2002:a05:6a10:f347:0:0:0:0 with SMTP id d7csp2250669pxu; Mon, 7 Dec 2020 01:13:44 -0800 (PST) X-Google-Smtp-Source: ABdhPJwAxNXitkp1pyIro9UPGcEPhnS5ByiLQGY93oPeTNaisfu8jazGJzOepzZgDs1kJwJiQgDd X-Received: by 2002:a17:906:16da:: with SMTP id t26mr17537277ejd.478.1607332424585; Mon, 07 Dec 2020 01:13:44 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1607332424; cv=none; d=google.com; s=arc-20160816; b=dfp/a+3GxBm7vsyuQmnBk7D4J8We84HDD5kUGOkVwpNMMaL66CtZNmVClYdQ5FCvqt 4yL4U/F72JiH6HYqw+wL0GUjF0hdV/S7Cd0u+jS/CJlZ+O2PNUX8JoIDVVoAYVh5b5NG KmM0xyqN9AUCvc/pvzdVEmessdR7F/LuuQwQh/Z8cM0ZC7et4/V9K352oKgknno4dxSR vQgHBHKbEprL2eg6nrQ2ARPj/az2ItIKYqVT7jBIqDfvtdCeVM7B4kMA+wClcd1Tzc5G 2RnIh+cjNhORTmdFjRwFpX3zDSXJsrIJ2pqd3r47PSyhadfTQhRzrvSGZ3lndkRdCduM o7+w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:message-id:date:subject:cc:to:from; bh=j6FESko+a+X6h/0n/0iuk9Qsud99YNv42SI6ax+Uz+4=; b=aAqS5mxF8U8SMl9q6AWYKqMfm4nC+HqkCqnuacN8qihtP7Rqr154MEluDkpSgpcObH zIv820q1mdnSx0rpwC/HVnE2fQiuOyiQwv0qXBG4APyu1+iJ2whT8XbwkSpzceAHtiOQ oBjs6nHNrfbG8HXIfb4altLDUh28O+mluF1BH22g7L7JUmZbZBUEXfXjRrn7my7p4RLz 8Gcj/7S23N9euBsXx67ry+YJTW+ldFr8kLghs7F7nUYR0Clo6fNZm/nS8kPYMK2wtKG3 K5OYhTXtV59LoSK2DhF7Jr6U4kF0ZsNeHcw44+e0et4T4ptQOaNCNnahz4VMJUtFtVM5 cLGQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id w2si7785187edx.591.2020.12.07.01.13.21; Mon, 07 Dec 2020 01:13:44 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726636AbgLGJLT (ORCPT + 99 others); Mon, 7 Dec 2020 04:11:19 -0500 Received: from emcscan.emc.com.tw ([192.72.220.5]:26708 "EHLO emcscan.emc.com.tw" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726016AbgLGJLS (ORCPT ); Mon, 7 Dec 2020 04:11:18 -0500 X-IronPort-AV: E=Sophos;i="5.56,253,1539619200"; d="scan'208";a="38474932" Received: from unknown (HELO webmail.emc.com.tw) ([192.168.10.1]) by emcscan.emc.com.tw with ESMTP; 07 Dec 2020 17:07:46 +0800 Received: from 192.168.10.23 by webmail.emc.com.tw with MailAudit ESMTP Server V5.0(23668:0:AUTH_RELAY) (envelope-from ); Mon, 07 Dec 2020 17:07:45 +0800 (CST) Received: from 101.12.100.64 by webmail.emc.com.tw with Mail2000 ESMTPA Server V7.00(106412:0:AUTH_LOGIN) (envelope-from ); Mon, 07 Dec 2020 17:07:44 +0800 (CST) From: "jingle.wu" To: linux-kernel@vger.kernel.org, linux-input@vger.kernel.org, dmitry.torokhov@gmail.com Cc: phoenix@emc.com.tw, josh.chen@emc.com.tw, dave.wang@emc.com.tw, "jingle.wu" Subject: [PATCH 1/2] Input: elan_i2c - Add new trackpoint report type 0x5F. Date: Mon, 7 Dec 2020 17:07:51 +0800 Message-Id: <20201207090751.9076-1-jingle.wu@emc.com.tw> X-Mailer: git-send-email 2.17.1 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org The 0x5F is new trackpoint report type of some module. Signed-off-by: Jingle Wu --- drivers/input/mouse/elan_i2c_core.c | 2 ++ drivers/input/mouse/elan_i2c_smbus.c | 3 ++- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/drivers/input/mouse/elan_i2c_core.c b/drivers/input/mouse/elan_i2c_core.c index 61ed3f5ca219..8f0c4663167c 100644 --- a/drivers/input/mouse/elan_i2c_core.c +++ b/drivers/input/mouse/elan_i2c_core.c @@ -52,6 +52,7 @@ #define ETP_REPORT_ID 0x5D #define ETP_REPORT_ID2 0x60 /* High precision report */ #define ETP_TP_REPORT_ID 0x5E +#define ETP_TP_REPORT_ID2 0x5F #define ETP_REPORT_ID_OFFSET 2 #define ETP_TOUCH_INFO_OFFSET 3 #define ETP_FINGER_DATA_OFFSET 4 @@ -1076,6 +1077,7 @@ static irqreturn_t elan_isr(int irq, void *dev_id) elan_report_absolute(data, report, true); break; case ETP_TP_REPORT_ID: + case ETP_TP_REPORT_ID2: elan_report_trackpoint(data, report); break; default: diff --git a/drivers/input/mouse/elan_i2c_smbus.c b/drivers/input/mouse/elan_i2c_smbus.c index 1820f1cfc1dc..1226d47ec3cf 100644 --- a/drivers/input/mouse/elan_i2c_smbus.c +++ b/drivers/input/mouse/elan_i2c_smbus.c @@ -45,6 +45,7 @@ #define ETP_SMBUS_CALIBRATE_QUERY 0xC5 #define ETP_SMBUS_REPORT_LEN 32 +#define ETP_SMBUS_REPORT_LEN2 7 #define ETP_SMBUS_REPORT_OFFSET 2 #define ETP_SMBUS_HELLOPACKET_LEN 5 #define ETP_SMBUS_IAP_PASSWORD 0x1234 @@ -497,7 +498,7 @@ static int elan_smbus_get_report(struct i2c_client *client, return len; } - if (len != ETP_SMBUS_REPORT_LEN) { + if ((len != ETP_SMBUS_REPORT_LEN) && (len != ETP_SMBUS_REPORT_LEN2)) { dev_err(&client->dev, "wrong report length (%d vs %d expected)\n", len, ETP_SMBUS_REPORT_LEN); -- 2.17.1