From patchwork Sun Feb 27 12:33:14 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alistair Francis X-Patchwork-Id: 12761659 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 001EAC433F5 for ; Sun, 27 Feb 2022 12:34:56 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:Message-Id:Date:Subject:Cc :To:From:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References: List-Owner; bh=3pcOjUskmJykcEvxVhsJpOcuBEHD6lf5P8Sv7x9Sad8=; b=QUyfej3yOUTMRk zq6O3n5ZACSlVARMlwjXP+VH84H9KxfahpK3XcAm47oOjG5Oy79miULXub7OAIj6RDZygiEtnCGN/ Iplb9ypFyw4oriGLZC2AsQF9qYOrpTYUX/WUQiCdjS3oJ5Lte9nV3NIWB+bM+A3E2Zy23VRiYXBku E2oeR6JblWV7mpbRh2H9eIPmojdOhyjFNBEsw1Yh1fnTCzXB9Bp5hYhzCdTK67/yRJYD6KYNZAuk8 bsBlYWA1Ymk93/y+PWUryHDNlliTg+KKHcri+Yqhw9z9b/wbZEue2izPxAiSyeXvgVCGtx32J72Gm sH5SOkjzn3FxiEsCoylQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1nOIk1-009Bf8-VH; Sun, 27 Feb 2022 12:33:34 +0000 Received: from new1-smtp.messagingengine.com ([66.111.4.221]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1nOIjx-009BeK-CS for linux-arm-kernel@lists.infradead.org; Sun, 27 Feb 2022 12:33:32 +0000 Received: from compute3.internal (compute3.nyi.internal [10.202.2.43]) by mailnew.nyi.internal (Postfix) with ESMTP id ADC0758021F; Sun, 27 Feb 2022 07:33:25 -0500 (EST) Received: from mailfrontend1 ([10.202.2.162]) by compute3.internal (MEProxy); Sun, 27 Feb 2022 07:33:25 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=alistair23.me; h=cc:cc:content-transfer-encoding:content-type:date:date:from :from:in-reply-to:message-id:mime-version:reply-to:sender :subject:subject:to:to; s=fm3; bh=/kCjBnTIBOFAiyVIH+6Uk+1WkWlvNy 6m+zGJBls4XE8=; b=Cq00KLQCk8QZ8IxE3iWtXMZUAIJTRHqyxQuE/fYv/GYmJm WskZ+L0xANMxSMmlrrnpKPlw2xYmlGKrql6EZr6Yz9eqXmBwzF5SFEOMZyf+lzQT RT2WRYIcYMdiZY45diuV4+Rt9Y+ATg4oHla+tFjZhJ1C1aMQQR1n4ClCnUt1TtED f7ukk58oz8X+2qKXwom4JA9mdv2mTsQ0Blv7m94k8qgluYliGWv7iObv2MVawzIu Bg67ugj7nuFPuxLj5JyGC7guJaM/vgI5DrSbIaq3Y3SK8xQdG4+UF5YJ6sjtXNis KQiUxdFocFpCXGzts8Aa1BC74BJC63z2kuSj2mBw== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-transfer-encoding :content-type:date:date:from:from:in-reply-to:message-id :mime-version:reply-to:sender:subject:subject:to:to:x-me-proxy :x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s=fm2; bh=/kCjBn TIBOFAiyVIH+6Uk+1WkWlvNy6m+zGJBls4XE8=; b=mfDtmLnLOo2ISlqi4qxL/s MCvs8B+2PbD3FBhSzD+ftJvC6pN3fsOZRSrL5yumhpMrZj0MRFpvTzR2xkEqxffs 0/WkIv/KnZoBz4W0qcLYHiy13b45DthLcHza/C56aHQ43IF2qS0d/P2OZrKBYFjH mwzw+S5N6yAht/05ZBmyYZAsSLurbJnkOoxXRbUp5DXzRkjgaDzApJNp/xf1Gesg /oS9HM8vKH0sFDuQZxzxHqHKtFC/1yQfsS+0oIVYrF7ogX5wFPT4JJ+BAqwEx6oM 4g2BvdxMbAGcu68MN0w8HVcKZ7YqDfpr7nFTCXSyUf63smtYd0K0/JZMozu/dSbA == X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvvddrleekgdegtdcutefuodetggdotefrodftvf curfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfghnecu uegrihhlohhuthemuceftddtnecunecujfgurhephffvufffkffogggtgfesthhqredtre dtjeenucfhrhhomheptehlihhsthgrihhrucfhrhgrnhgtihhsuceorghlihhsthgrihhr segrlhhishhtrghirhdvfedrmhgvqeenucggtffrrghtthgvrhhnpeffledvgeevfeevfe dvvdffieetfefgjeevgeeitefhkeeghfelueekhfejheffgfenucffohhmrghinheplhif nhdrnhgvthdpghhithhhuhgsrdgtohhmnecuvehluhhsthgvrhfuihiivgeptdenucfrrg hrrghmpehmrghilhhfrhhomheprghlihhsthgrihhrsegrlhhishhtrghirhdvfedrmhgv X-ME-Proxy: Received: by mail.messagingengine.com (Postfix) with ESMTPA; Sun, 27 Feb 2022 07:33:20 -0500 (EST) From: Alistair Francis To: linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, devicetree@vger.kernel.org, linux-input@vger.kernel.org Cc: robh+dt@kernel.org, linus.walleij@linaro.org, rydberg@bitmath.org, dmitry.torokhov@gmail.com, andreas@kemnade.info, alistair23@gmail.com, Alistair Francis Subject: [PATCH v6 0/4] Add support for the Cypress cyttsp5 Date: Sun, 27 Feb 2022 22:33:14 +1000 Message-Id: <20220227123318.313009-1-alistair@alistair23.me> X-Mailer: git-send-email 2.34.1 MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220227_043329_564719_494A50AA X-CRM114-Status: GOOD ( 10.58 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org This patch series builds on top of [1] and adds support for the cyttsp5 touchscreen controller for the reMarkable 2. I first tried to add an I2C HID device. Although the cyttsp5 has some HID looking aspects it is not HID compatible. Just in trying to probe the device I found: - The HID descriptor has extra padding - The HID descriptor sets the high bytes of the descriptor length - The HID descriptor has extra unrecognised tags - The HID reset command doesn't appear to work I don't think there is a way to use the I2C HID framework with the cyttsp5. For anyone interested you can see the work here [2]. In that branch though I can only obtain a HID descriptor, nothing else works without more core changes. So instead I rebased the series from [1]. Converted to the new yaml DTS documentation, added regulator support and fixed a x/y miscalculation bug. 1: https://lwn.net/ml/linux-kernel/20180703094309.18514-1-mylene.josserand@bootlin.com/ 2: https://github.com/alistair23/linux/commits/rM2-mainline-cyttsp5-hid v6: - Use reg for the button properties v5: - Address review comments from v4 Alistair Francis (4): Input: Add driver for Cypress Generation 5 touchscreen dt-bindings: input: Add Cypress TT2100 touchscreen controller ARM: imx_v6_v7_defconfig: Enable the cyttsp5 touchscreen ARM: dts: imx7d-remarkable2: Enable the cyttsp5 .../input/touchscreen/cypress,tt21000.yaml | 98 ++ arch/arm/boot/dts/imx7d-remarkable2.dts | 97 ++ arch/arm/configs/imx_v6_v7_defconfig | 1 + drivers/input/touchscreen/Kconfig | 16 + drivers/input/touchscreen/Makefile | 1 + drivers/input/touchscreen/cyttsp5.c | 902 ++++++++++++++++++ 6 files changed, 1115 insertions(+) create mode 100644 Documentation/devicetree/bindings/input/touchscreen/cypress,tt21000.yaml create mode 100644 drivers/input/touchscreen/cyttsp5.c