From patchwork Wed Aug 30 07:54:23 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Edvard Holst X-Patchwork-Id: 9928843 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 0343060380 for ; Wed, 30 Aug 2017 07:59:47 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id E857327F88 for ; Wed, 30 Aug 2017 07:59:46 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id DD23227F8E; Wed, 30 Aug 2017 07:59:46 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.4 required=2.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, RCVD_IN_DNSWL_HI, T_DKIM_INVALID, URIBL_GREY autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 8009727F88 for ; Wed, 30 Aug 2017 07:59:46 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751039AbdH3H7p (ORCPT ); Wed, 30 Aug 2017 03:59:45 -0400 Received: from o2.lv30e.shared.sendgrid.net ([50.31.63.43]:44805 "EHLO o2.lv30e.shared.sendgrid.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750839AbdH3H7o (ORCPT ); Wed, 30 Aug 2017 03:59:44 -0400 X-Greylist: delayed 321 seconds by postgrey-1.27 at vger.kernel.org; Wed, 30 Aug 2017 03:59:44 EDT DKIM-Signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d=sendgrid.me; h=from:to:cc:subject; s=smtpapi; bh=9oUnzgZKkYzhWJ9z972xuO6V9t0=; b=QgEu/aD0y2SkpXJoGLazr7w0zx1OFBUEYHEkC2WOhGmKGXNWGdS0jxUgQuSaci vCXOj/GqLWHm7lf14bbXXmf9QUg65zQ83bkGeKv/YNUSlXElCrw+IOGdN8Fj4L5Q LGf3HMh0rJQlLBUyUdAlguKlc2Pe2uNOvgTvxUSQXqMG8= Received: by filter0028p3mdw1.sendgrid.net with SMTP id filter0028p3mdw1-21108-59A66F2E-1B 2017-08-30 07:54:22.920410283 +0000 UTC Received: from localhost.localdomain (77.18.21.230.tmi.telenormobil.no [77.18.21.230]) by ismtpd0002p1lon1.sendgrid.net (SG) with ESMTP id sMllPMw_QhyQ-cheHr7ebw Wed, 30 Aug 2017 07:54:22.533 +0000 (UTC) From: edvard.holst@gmail.com To: linux-input@vger.kernel.org Cc: dmitry.torokhov@gmail.com, Edvard Holst , Benjamin Tissoires , Eric Biggers , Andrew Duggan , linux-kernel@vger.kernel.org Subject: [PATCH] Input: synaptics - Lenovo Thinkpad X1 Carbon G5 (2017) with Elantech trackpoints should use RMI. Date: Wed, 30 Aug 2017 07:54:23 +0000 (UTC) Message-Id: <20170830075351.24981-1-edvard.holst@gmail.com> X-Mailer: git-send-email 2.13.5 X-SG-EID: Aqq1K7Q6jqdsimg6BxaWyL3Dp4OW9aYpD4lpHxzpmDUKIbHhwimNP9c5ttd4DSlK+kT1yglmjwvF8Y AglM86N41zmB3TIvPRSbVz8m9ZRPvyJgNFJAMcSM9ZAIkEPPgy6Yu4uWeRHUU0eStO/lr0NwHpDAh6 WAMHjU8zuXr/iWlKPo1Y0Gstub2U8EW7BuikHss6n2PPoYLuzQcC6jw5xQ== Sender: linux-input-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-input@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP From: Edvard Holst Lenovo use two different trackpoints in the fifth generation Thinkpad X1 Carbon. Both are accessible over SMBUS/RMI but the pnpIDs are missing. This patch is for the Elantech trackpoint specifically which also reports SMB version 3 so rmi_smbus needs to be updated in order to handle it. For the record, I was not the first one to come up with this patch as it has been floating around the internet for a while now. However, I have spent significant time with testing and my efforts to find the original author of the patch have been unsuccessful. Signed-off-by: Edvard Holst --- drivers/input/mouse/synaptics.c | 1 + drivers/input/rmi4/rmi_smbus.c | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/input/mouse/synaptics.c b/drivers/input/mouse/synaptics.c index 16c30460ef04..d44f1395c379 100644 --- a/drivers/input/mouse/synaptics.c +++ b/drivers/input/mouse/synaptics.c @@ -173,6 +173,7 @@ static const char * const smbus_pnp_ids[] = { "LEN0046", /* X250 */ "LEN004a", /* W541 */ "LEN200f", /* T450s */ + "LEN0073", /* X1 Carbon G5 (Elantech) */ NULL }; diff --git a/drivers/input/rmi4/rmi_smbus.c b/drivers/input/rmi4/rmi_smbus.c index 225025a0940c..2939a2f72019 100644 --- a/drivers/input/rmi4/rmi_smbus.c +++ b/drivers/input/rmi4/rmi_smbus.c @@ -322,7 +322,7 @@ static int rmi_smb_probe(struct i2c_client *client, rmi_dbg(RMI_DEBUG_XPORT, &client->dev, "Smbus version is %d", smbus_version); - if (smbus_version != 2) { + if (smbus_version != 2 && smbus_version != 3) { dev_err(&client->dev, "Unrecognized SMB version %d\n", smbus_version); return -ENODEV;