From patchwork Fri Nov 6 11:24:10 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?J=2E_Neusch=C3=A4fer?= X-Patchwork-Id: 11886919 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-12.5 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH,MAILING_LIST_MULTI,SIGNED_OFF_BY, SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 65966C2D0A3 for ; Fri, 6 Nov 2020 11:25:59 +0000 (UTC) Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id D0E0C2064B for ; Fri, 6 Nov 2020 11:25:58 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="f83iUNgQ"; dkim=fail reason="signature verification failed" (1024-bit key) header.d=gmx.net header.i=@gmx.net header.b="QwIt2jZk" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org D0E0C2064B Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=gmx.net Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=merlin.20170209; h=Sender:Content-Transfer-Encoding: Content-Type:Cc:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To:Message-Id:Date: Subject:To:From:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=Gt/hkdLi8NPDiNmCXrHmBC+J6CT85OQ/e2SVL6jB5jY=; b=f83iUNgQCW0+6Qux0Omnx1yWT K+3ryhzuvKYlPrFEmZo9Ozn3I7+6qHAj+pFmn2TrDqozYxgfqbPNeZUeYBCbGk1RyXdhvAEAxOXCg BMjgM0s07+1x1w390GgtoMgh2Jwgkupc3zkHQzka57fSJlqPJdAIkRt0BJIo9hFvg7G6Onwlh460l CRy9751L0uu6bNrfYm00cKRNpyjtMl99EwQkZovBTc3SgKH21F+Ni2+/ONF7TSrxvhBmGrs6uCpRW C5DNdtuMvWOqURzC160DyPNi138/BL6rtuIq8BKYbx/QTQvBu17pYDhj3SfN58kikQ51L+qMAJHRP rueeDL21w==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1kazrN-0002Z0-3O; Fri, 06 Nov 2020 11:24:49 +0000 Received: from mout.gmx.net ([212.227.15.15]) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1kazrK-0002Xa-Gv for linux-arm-kernel@lists.infradead.org; Fri, 06 Nov 2020 11:24:47 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gmx.net; s=badeba3b8450; t=1604661879; bh=cFCPptnJXya4GUiuIySWp5MfhmM2iBoNEec6dECH9H0=; h=X-UI-Sender-Class:From:To:Cc:Subject:Date:In-Reply-To:References; b=QwIt2jZk6Eo1/eyr2eqqDhlgem8D38WPIBK29RhGzkM1xbTcglsBdPwOsqPYAkVhW TyjkkO7fTn9bERkn+QCeRtImnsKuEWC38zy8V+d3e5b2V8c8/i7jBtqbJkspfFlZzj zGYXHa+hNBEnNju785muA/IXRqL3T1PW1dpjRSc4= X-UI-Sender-Class: 01bb95c1-4bf8-414a-932a-4f6e2808ef9c Received: from longitude ([37.201.214.162]) by mail.gmx.com (mrgmx005 [212.227.17.190]) with ESMTPSA (Nemesis) id 1M1Ycr-1kdTlU2YAd-0036B7; Fri, 06 Nov 2020 12:24:39 +0100 From: =?utf-8?q?Jonathan_Neusch=C3=A4fer?= To: linux-input@vger.kernel.org Subject: [PATCH 1/3] dt-bindings: input: ektf2127: Add elan, ektf2132 compatible string Date: Fri, 6 Nov 2020 12:24:10 +0100 Message-Id: <20201106112412.390724-2-j.neuschaefer@gmx.net> X-Mailer: git-send-email 2.28.0 In-Reply-To: <20201106112412.390724-1-j.neuschaefer@gmx.net> References: <20201106112412.390724-1-j.neuschaefer@gmx.net> MIME-Version: 1.0 X-Provags-ID: V03:K1:4f+4lN6aFD4xVqcbbZvUlpkETQNlpqMXx8TzWIHiaMK30V9eAKn JSohfohl4DPU6+vdbCBv1mHZqhYKd6vo1t7vRwKX3k4to/t0KXo12DlaSz9cBrQftYp11RL EE0s74xE+xdHBF/W0u7ZAwuVKZLx7cYMmzbzmTg0tzDPY2Wm3gr726VBUJkFogOGbQjtzzo lRpQwZNIUpuG89WWj6/xA== X-UI-Out-Filterresults: notjunk:1;V03:K0:iCEoGSGAZYU=:06hNXa6r/RlLDeEc2FR+9f e0V70uOTNpPf4YtKr+ss85pDfxdy13nUdtLBW1fv9cCvH2g62HiV7VGV+HKy+tcik94kue4lm gekaFK0IkXtwNYzq1F367Z4V68rPQ1vecHSfE8sPaMKsX5CmMPwgvkaey3GKmUwpQUWuQo0d5 3L85YuULTpcixjF1EJjagW67O4Z9vPYOgPIYKii7wYQfz84Fn0rO/QVbaMFZLEMW1tfhAVM56 jbcEIVxbOrbcRalqgxI4mMiZo60CUhcMZ1b+1h2wo1Z3aAI/xv7wNNey4VEbdmwxD8SSMXyoV 6yDYGaWzkKc5bf3tLbwa4ujO0sZRB2QdQ7iESkHrI0Xg4gFu5RyXOOFgZGM/KX6XZA9r5zH4C H4IZDC+bchC9htyXa9PfACWKSDvNSUn1upuzyRKVJkvKv4WTEHCmShMQkGbIvH666/NRZOpyZ kkXIt763JJEaJIGx+zZa8OgsBIpQeDsioG/zs9+0ze0wWnjV2Cna4KAQce5h7+iKPZSi7P7cy LmM8Qzid4J3Elpw4Tkf/GDMNY63hS0MwyjOSWO71/y2f/8u0iSvkLZxH5ZXIodGNklvRt6Tl0 O3ta7HQG9RQ8TgK6CHH8Z6umWIAyhMhWui8rAxX1dU8OIi+Ct427LftzGRgr6ugBKeDyLwV1o JwMUtGdxHgFnLPXjk6se9jKSfE2WXeYYNdN5DNQMt7QuQK9f7sfgfrPtyL9tUdBR1xkfk8rRe QIdG7cO8vGGFvmGwOzS07wt2yuSJSfWAiU8qUPhXvGw4yca5KrZx08HM578fFD08NBBYXGsHz 8UJ2Oa671Ng2k9SZ58ClbCyS9StbmN5d5LzD9iUJqsXhIMMMDjbWdQ1Gr8BzfdqwKFTOxytJD 9lnhZga5JDbuBYnlXW8ENXs4td7OB0z+A87FCarf4= X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20201106_062446_824405_1F8B94DE X-CRM114-Status: GOOD ( 13.73 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: devicetree@vger.kernel.org, Shawn Guo , Sascha Hauer , Dmitry Torokhov , =?utf-8?q?Jonathan_Neusch?= =?utf-8?q?=C3=A4fer?= , linux-kernel@vger.kernel.org, Rob Herring , NXP Linux Team , Pengutronix Kernel Team , Fabio Estevam , linux-arm-kernel@lists.infradead.org Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org The eKTF2132 is a touchscreen controller found, for example, in the Kobo Aura ebook reader. It is similar to the ektf2127, but it uses a different packet type to report touch events. Signed-off-by: Jonathan Neuschäfer --- .../devicetree/bindings/input/touchscreen/ektf2127.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) -- 2.28.0 diff --git a/Documentation/devicetree/bindings/input/touchscreen/ektf2127.txt b/Documentation/devicetree/bindings/input/touchscreen/ektf2127.txt index 94c4fc6449407..5eef5e7d6aae1 100644 --- a/Documentation/devicetree/bindings/input/touchscreen/ektf2127.txt +++ b/Documentation/devicetree/bindings/input/touchscreen/ektf2127.txt @@ -1,7 +1,7 @@ * Elan eKTF2127 I2C touchscreen controller Required properties: - - compatible : "elan,ektf2127" + - compatible : "elan,ektf2127" or "elan,ektf2132" - reg : I2C slave address of the chip (0x40) - interrupts : interrupt specification for the ektf2127 interrupt - power-gpios : GPIO specification for the pin connected to the From patchwork Fri Nov 6 11:24:11 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?J=2E_Neusch=C3=A4fer?= X-Patchwork-Id: 11886915 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-12.5 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH,MAILING_LIST_MULTI,SIGNED_OFF_BY, SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id C1AF8C2D0A3 for ; Fri, 6 Nov 2020 11:26:11 +0000 (UTC) Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 3218B2064B for ; Fri, 6 Nov 2020 11:26:11 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="KeqEAQb5"; dkim=fail reason="signature verification failed" (2048-bit key) header.d=infradead.org header.i=@infradead.org header.b="ZdqoXMHM"; dkim=fail reason="signature verification failed" (1024-bit key) header.d=gmx.net header.i=@gmx.net header.b="etqnfdbI" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 3218B2064B Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=gmx.net Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=merlin.20170209; h=Sender:Content-Transfer-Encoding: Content-Type:Cc:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To:Message-Id:Date: Subject:To:From:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=w6tQVxWTbYIjR0MqKsxbg78RkvkZEfe7B2ZzLwByj8A=; b=KeqEAQb5Uf2XhCZKnAxlp4D7U LIZYt1J8HsHvceqb4VxxumM8v6tRskYRsYMAYdX+wKob0gWitsgygud7MaNK3W/Pl/lrPdCQbbfXi BZc0HdHV1yPw7sxFwFr4ngsJ2oGRssfTW/h+nOD0C6UJd4TwjTJYZ/1xaFRznV61eWUHH9Fx8LYvZ InhS3JwMAdKgWlFyYfHUlgg4Lqhi232xpBXchB5XWxjjRfiOG9mnT1tg4DS2CxtRxJFe4v6ObDVpT qR88VXUcVgly8psZDU40i2gUUQ9yOmf2T31vwYAbhrv4CwE63KcKDGqR6GRye0HEbl/ScpPI46qcP 9AZmHXBuQ==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1kazra-0002d2-2q; Fri, 06 Nov 2020 11:25:02 +0000 Received: from casper.infradead.org ([2001:8b0:10b:1236::1]) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1kazrY-0002cL-2j for linux-arm-kernel@merlin.infradead.org; Fri, 06 Nov 2020 11:25:00 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=casper.20170209; h=Content-Transfer-Encoding:Content-Type: MIME-Version:References:In-Reply-To:Message-Id:Date:Subject:Cc:To:From:Sender :Reply-To:Content-ID:Content-Description; bh=+LJKUMgACP+HXnKldtDGl7PflGTpA1NOrS6oNBkMdIM=; b=ZdqoXMHM3H3SRv1aE0kLkCCgxm RCu1D3aydju8LONJ9snmWkybPZGFbSokgkw03SDDnCI6X8ZFDjta+FuBKdkCNoFuzBXor0aehnQGc dmOFye4hfLNONHbU1Bw6snBSX3Of4YTz9YUoiTo2E1GCMzhcJS6HaCBXbdf5bNSbdBfKvFHjcBXSu lyfLKw7Wru8RS+Oi5bRHRKI0hOAIdl7p5d3k4ZQu/1myO0gBJ9pvxCSY3wmqlVYBgOvEm8vH+JR5j IEHPCbJGxdVA23znhkqcdBunTg8PwrDiPlaJ0M8Q8k1pWMsxKfdLQYIvZ4hV0HWVqJlMWA7BRL+AP eWuVVl+g==; Received: from mout.gmx.net ([212.227.17.22]) by casper.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1kazrU-0003eQ-0o for linux-arm-kernel@lists.infradead.org; Fri, 06 Nov 2020 11:24:58 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gmx.net; s=badeba3b8450; t=1604661887; bh=WSxvkPudOyyiaDfsj7a64kEkFfmRpiTIS3V8A1N+QYw=; h=X-UI-Sender-Class:From:To:Cc:Subject:Date:In-Reply-To:References; b=etqnfdbIOZN4mdA2ptPsk4TlmkSR2oWTG3wqaS+b+0DKEDXaVh11WOR1gT3W5P68U emjb8vxUmNlvKf1ncXvjY/bcJJMIL+MllbDjjx23T7HAHu/YdAz9gxPMoWECP29obm 1KDfKXdXDdNr1TNhpA/RfRA3OGzBWeVj0vUKTkwk= X-UI-Sender-Class: 01bb95c1-4bf8-414a-932a-4f6e2808ef9c Received: from longitude ([37.201.214.162]) by mail.gmx.com (mrgmx104 [212.227.17.168]) with ESMTPSA (Nemesis) id 1N3se8-1kAlpP08Nk-00zqEH; Fri, 06 Nov 2020 12:24:47 +0100 From: =?utf-8?q?Jonathan_Neusch=C3=A4fer?= To: linux-input@vger.kernel.org Subject: [PATCH 2/3] Input: ektf2127 - Add support for eKTF2132 touchscreen Date: Fri, 6 Nov 2020 12:24:11 +0100 Message-Id: <20201106112412.390724-3-j.neuschaefer@gmx.net> X-Mailer: git-send-email 2.28.0 In-Reply-To: <20201106112412.390724-1-j.neuschaefer@gmx.net> References: <20201106112412.390724-1-j.neuschaefer@gmx.net> MIME-Version: 1.0 X-Provags-ID: V03:K1:vERlqI5wF5dJQBwBqxI1frV7e4W3ngJu/BWVKVJRGgnmJW3XQMd Nf44Nwpuc7gSckua7NTfCK6YZ7ymjnhroUfTqe2KxOs8Vmk8T/j18CcSc94fH8FauEGJBDl czBJOX89C4Btxqi9P0AE92c5qg1sqHQvN4s8C1S35lpFEWWha8z/14d+nmiSZsH3gs5hSGA HAcT7EAhoy+B0GbCfLnKw== X-UI-Out-Filterresults: notjunk:1;V03:K0:JmeZI+fofTc=:xTrhwkRo+iuuGollH7Z3L5 Fu3YQiBqL+VMq5HOBV89zy5gDmMmzSNMynQW6TC6uOjxGxIfTX6ez6Jia9Qk4auCfOpzG18Mu /kH+0p8fzzD2aJ9kzq9tyS/oKI9UhqQEX1DvdB2eamX1kpKINwGgl0Hr30fqiDZ3yyc3kxxZe NAKQR4QLHdqT4/PNWZC7QK/MRKERDB0lFTJg+HhMuTC4gdlO+RFjqLR6AlAJFx4WV/vVXEbYK YKCdfCYxDpIp40Qxc0RGr5bwisQ02V23GOeB8MbpvIbiFiF01reNIv6FVuo9z7AtFs0HMwUg4 thNwuYRQPfD0YLMOOmDbdJ870EmHlMssOyT63b3TCFOTYLXu3Zl3QHg17FII5RDTAW7FHKuca RQqO8jJzKidESfFdsKhb/akVsZYo/PHCFciL5Za/Qv1x5cHumLBSTRUlNZNZWGbkV8q4xj30X zPO3D//cvFjraEwDCmHnWrXutes7cJIVyw9G2hdhijhLKJTdkmGXNBgfe2mLFMZCid/MWD/dm 7GlNeyCOwQuweKXXI3Wfz9si/PIVk8BQFahpuc5GAW6ponQCOP5uOajQahNczS78c9Z+Y4JDY IQXhyufKT9XZw1IkPpRaagkNbManveimsMiO4I/+XB2U6tavSkq5esLXC48HchE6McRmNNfe9 66bYKUfUOB4rYMlCYN8LpJLEykQUyy19emM1kEcSEuXQn3diCg7ElwzggroZfXNFP9y1Y5l6S a5m/npoAOj2crj0+Hwhp/mP7h+jQqp/lJAA0tZpaMCzWsZAfMahGx0zrl3owCoeUS2Q/ffQrB oWz4Rl+DHY2J+AtDiPJjCrBTHWBKYZYzHrPzmSMdoAugzN38cnrVCDWlF4XGELqDgqNZ2G1xC HOjRKjFrwDpmsia6FX0WvZM7cXD12uXXsF9uQimeQ= X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20201106_112456_664610_16796398 X-CRM114-Status: GOOD ( 16.96 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: devicetree@vger.kernel.org, Shawn Guo , Sascha Hauer , Dmitry Torokhov , =?utf-8?q?Jonathan_Neusch?= =?utf-8?q?=C3=A4fer?= , linux-kernel@vger.kernel.org, Rob Herring , NXP Linux Team , Pengutronix Kernel Team , Fabio Estevam , linux-arm-kernel@lists.infradead.org Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org The eKTF2132 is a touchscreen controller found, for example, in the Kobo Aura ebook reader. It is similar to the ektf2127, but it uses a different packet type to report touch events. Signed-off-by: Jonathan Neuschäfer --- drivers/input/touchscreen/ektf2127.c | 32 +++++++++++++++++++++++++++- 1 file changed, 31 insertions(+), 1 deletion(-) -- 2.28.0 diff --git a/drivers/input/touchscreen/ektf2127.c b/drivers/input/touchscreen/ektf2127.c index eadd389cf81fe..491de67ddbcd7 100644 --- a/drivers/input/touchscreen/ektf2127.c +++ b/drivers/input/touchscreen/ektf2127.c @@ -28,6 +28,7 @@ #define EKTF2127_RESPONSE 0x52 #define EKTF2127_REQUEST 0x53 #define EKTF2127_HELLO 0x55 +#define EKTF2127_REPORT2 0x5a #define EKTF2127_REPORT 0x5d #define EKTF2127_CALIB_DONE 0x66 @@ -95,6 +96,29 @@ static void ektf2127_report_event(struct ektf2127_ts *ts, const u8 *buf) input_sync(ts->input); } +static void ektf2127_report2_contact(struct ektf2127_ts *ts, int slot, + const u8 *buf, bool active) +{ + input_mt_slot(ts->input, slot); + input_mt_report_slot_state(ts->input, MT_TOOL_FINGER, active); + + if (active) { + int x = (buf[0] & 0xf0) << 4 | buf[1]; + int y = (buf[0] & 0x0f) << 8 | buf[2]; + + touchscreen_report_pos(ts->input, &ts->prop, x, y, true); + } +} + +static void ektf2127_report2_event(struct ektf2127_ts *ts, const u8 *buf) +{ + ektf2127_report2_contact(ts, 0, &buf[1], !!(buf[7] & 2)); + ektf2127_report2_contact(ts, 1, &buf[4], !!(buf[7] & 4)); + + input_mt_sync_frame(ts->input); + input_sync(ts->input); +} + static irqreturn_t ektf2127_irq(int irq, void *dev_id) { struct ektf2127_ts *ts = dev_id; @@ -113,6 +137,10 @@ static irqreturn_t ektf2127_irq(int irq, void *dev_id) ektf2127_report_event(ts, buf); break; + case EKTF2127_REPORT2: + ektf2127_report2_event(ts, buf); + break; + case EKTF2127_NOISE: if (buf[1] == EKTF2127_ENV_NOISY) dev_dbg(dev, "Environment is electrically noisy\n"); @@ -305,6 +333,7 @@ static int ektf2127_probe(struct i2c_client *client, #ifdef CONFIG_OF static const struct of_device_id ektf2127_of_match[] = { { .compatible = "elan,ektf2127" }, + { .compatible = "elan,ektf2132" }, {} }; MODULE_DEVICE_TABLE(of, ektf2127_of_match); @@ -312,6 +341,7 @@ MODULE_DEVICE_TABLE(of, ektf2127_of_match); static const struct i2c_device_id ektf2127_i2c_id[] = { { "ektf2127", 0 }, + { "ektf2132", 0 }, {} }; MODULE_DEVICE_TABLE(i2c, ektf2127_i2c_id); @@ -327,6 +357,6 @@ static struct i2c_driver ektf2127_driver = { }; module_i2c_driver(ektf2127_driver); -MODULE_DESCRIPTION("ELAN eKTF2127 I2C Touchscreen Driver"); +MODULE_DESCRIPTION("ELAN eKTF2127/eKTF2132 I2C Touchscreen Driver"); MODULE_AUTHOR("Michel Verlaan, Siebren Vroegindeweij"); MODULE_LICENSE("GPL"); From patchwork Fri Nov 6 11:24:12 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?J=2E_Neusch=C3=A4fer?= X-Patchwork-Id: 11886921 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-12.5 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH,MAILING_LIST_MULTI,SIGNED_OFF_BY, SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 9A692C2D0A3 for ; Fri, 6 Nov 2020 11:26:09 +0000 (UTC) Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id DABA42064B for ; Fri, 6 Nov 2020 11:26:08 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="Ma6PEZcd"; dkim=fail reason="signature verification failed" (1024-bit key) header.d=gmx.net header.i=@gmx.net header.b="aOyFj+ih" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org DABA42064B Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=gmx.net Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=merlin.20170209; h=Sender:Content-Transfer-Encoding: Content-Type:Cc:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To:Message-Id:Date: Subject:To:From:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=/4jZOa4INtkRKTim2+x/avw2SKoSm1yDsn8bJaaviS8=; b=Ma6PEZcdN++/MdC8cCRuqCjSa xi8nVikijgxYOCaVmM7q2/qvio2tfjS8c4TxjG/oaaU6NcW0UmwRaoV+wvanA/Xt93EDdakqbFQDB cv1notqN9Z8wwWXWKVUfNyIGMQIdoBcYLF0ENmCdTWmhpad3NN0nbYVFFhhdvF7r1mOl8UQAjX7uN VY3AvpOOP39sTCz6qLatTT5EZR9Z18ZAQtyqNcG3xxoG2JDaUMxjYw1t6mF4vApalRcC9Qtnn/xpP LWfBVGnOQDHplHF5FTcPgUp1hBHFZMqrv97BxVJlbi1srl0Skpp9SPWCpGFGEyQnOlK/9pSmcKz6w oiNfv3sDw==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1kazrX-0002cC-PW; Fri, 06 Nov 2020 11:24:59 +0000 Received: from mout.gmx.net ([212.227.15.15]) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1kazrU-0002an-CE for linux-arm-kernel@lists.infradead.org; Fri, 06 Nov 2020 11:24:57 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gmx.net; s=badeba3b8450; t=1604661893; bh=h353MSDKnlc8XqUZeAyhas+YODqkJ+e9pssvf3FjUok=; h=X-UI-Sender-Class:From:To:Cc:Subject:Date:In-Reply-To:References; b=aOyFj+ihLNo8vNR9NmndGcVTXCZxT7uI61RkrFne59UM60AeURY4gINR/U4aGc1wV JGYwUuDSH4+bx1d8HxYowaKqLVrdFisMVV/cxwXyfDM19MozMROzLd/OrvPHi7GHKq lJVHrB3trnuz+2GhRW/Ja9of6I2XxgzhE6n2sWpE= X-UI-Sender-Class: 01bb95c1-4bf8-414a-932a-4f6e2808ef9c Received: from longitude ([37.201.214.162]) by mail.gmx.com (mrgmx005 [212.227.17.190]) with ESMTPSA (Nemesis) id 1N5VHM-1kHuQQ4ArS-016wEu; Fri, 06 Nov 2020 12:24:53 +0100 From: =?utf-8?q?Jonathan_Neusch=C3=A4fer?= To: linux-input@vger.kernel.org Subject: [PATCH 3/3] ARM: dts: imx50-kobo-aura: Enable eKTF2132 touchscreen Date: Fri, 6 Nov 2020 12:24:12 +0100 Message-Id: <20201106112412.390724-4-j.neuschaefer@gmx.net> X-Mailer: git-send-email 2.28.0 In-Reply-To: <20201106112412.390724-1-j.neuschaefer@gmx.net> References: <20201106112412.390724-1-j.neuschaefer@gmx.net> MIME-Version: 1.0 X-Provags-ID: V03:K1:Eb/mcNh+2C3ChXXzq4O8bBzixHexY7F7ebnCPUuzp8adYY8PHb8 n+jg1ro2q3wch1bs8eNLfUhN1uK0jv5/95w7l9kD36ePUkIXxF6/FC6NEN7Ddvgm0FQjWzF 8LNpimBG9tRWA4TxPk9e6fi48+BP+LNEC8BXuLzGXmQFwh/vzZzJXGjmIpb8Deja1avtaJB d/j7/6SewIyn7+tu0Xt1w== X-UI-Out-Filterresults: notjunk:1;V03:K0:K85UTosfvTo=:Kdq+p7usASgZEEWfOffCZO 3UOnagOb19HiiVSQrSNS32zdAvIUTU9cZrMqleCgARdtR/QdIhpRcXShtp6Y+uqBMt+vQBZdD cbihIunTRj5YJEom+ayGoJl+AeHBOziN9wy/azTLQcssQ7ezgO3XC/4B1sq5ZmceWsr4Qe1xe Z0+uBrjcN/CNoR0HnygpiOsbvmz0xYIP2dedpbJQhxJgdSpaJWhsbTSSedFbK+/+Ea2Bw8A0n wJrlcy7ZxrEKHJ/saXkdKKNulDH/NNDw08qJzDoGjtWxQjPCW61sT+QFjfiRR02793bJIXl5i KJpXWO0r22Tm0M+2hQaz/wkLrWstITjeS+ibK7zbPKQhN3ZJPv/2ZvUvWuKoi9OWP4U6+aF3F 4ySTRylPqO/8L7VTEFXwezOXiTYBBJcmkVYpA4GE81in5NPpNPARCiGh41v4K/Ow628cXngkV H4xQosYKYFII/UY/PR84WfOdf6UaCSh4I7IjbVOk3IhLARp5cZXGWqpbXEkLKAeBe+2J+60yJ Ar5/1FuKknK1b4JP0FhkD+twsACKcmHE7qSFIoXOw1W6yxba/G4+d9QNvW0VC9PqUnxbEI8hL enze9Fo4L5QMETf+tiAhPjeGkZv0XSYvtlRlDoxS30aoNT47hqPV/cDgXnPHBZBd+97z2qDJ/ jo4RFE2Ku8EsEobTn58BKztr40a/1QNMlXbJBsMZi8ckcWbpio0jAkpmmC/ch36nGUiN5FXJR TbmRj+8tYHbxmZW05AU7wFWEGDWiWJC7r9k1eQArmrXM3RZWXkLFoWYbKgeIYmefM3vl33Bp0 xOr0AcEiT0tDfSrQ04j14B8t6GeR+vWbXqq/RzW+7Haidx50TdZjyLVwIUaYf1QeMN6rOQEtl IzK719hMyRlozZiKYDN512y8ycBSVF+PtPne7OsDs= X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20201106_062456_624702_C8DD769E X-CRM114-Status: GOOD ( 11.82 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: devicetree@vger.kernel.org, Shawn Guo , Sascha Hauer , Dmitry Torokhov , =?utf-8?q?Jonathan_Neusch?= =?utf-8?q?=C3=A4fer?= , linux-kernel@vger.kernel.org, Rob Herring , NXP Linux Team , Pengutronix Kernel Team , Fabio Estevam , linux-arm-kernel@lists.infradead.org Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org The Kobo Aura has an eKTF2132 touchscreen controller. Although the vendor kernel toggles a reset pin (GPIO5-12) during the startup sequence, the touchscreen works without it. Signed-off-by: Jonathan Neuschäfer --- This patch requires "[PATCH] ARM: dts: imx50-kobo-aura: Add 'grp' suffix to pinctrl node names" in order to apply cleanly. (https://lore.kernel.org/lkml/20201031210729.2804471-1-j.neuschaefer@gmx.net/) --- arch/arm/boot/dts/imx50-kobo-aura.dts | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) -- 2.28.0 diff --git a/arch/arm/boot/dts/imx50-kobo-aura.dts b/arch/arm/boot/dts/imx50-kobo-aura.dts index b2fbee60271f2..82ce8c43be867 100644 --- a/arch/arm/boot/dts/imx50-kobo-aura.dts +++ b/arch/arm/boot/dts/imx50-kobo-aura.dts @@ -120,7 +120,14 @@ &i2c1 { pinctrl-0 = <&pinctrl_i2c1>; status = "okay"; - /* TODO: ektf2132 touch controller at 0x15 */ + touchscreen@15 { + reg = <0x15>; + compatible = "elan,ektf2132"; + pinctrl-names = "default"; + pinctrl-0 = <&pinctrl_ts>; + power-gpios = <&gpio4 9 GPIO_ACTIVE_HIGH>; + interrupts-extended = <&gpio5 13 IRQ_TYPE_EDGE_FALLING>; + }; }; &i2c2 { @@ -240,6 +247,13 @@ MX50_PAD_SD3_D7__ESDHC3_DAT7 0x1d4 >; }; + pinctrl_ts: tsgrp { + fsl,pins = < + MX50_PAD_CSPI_MOSI__GPIO4_9 0x0 + MX50_PAD_SD2_D5__GPIO5_13 0x0 + >; + }; + pinctrl_uart2: uart2grp { fsl,pins = < MX50_PAD_UART2_TXD__UART2_TXD_MUX 0x1e4