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 X-Patchwork-Id: 546500 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 vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 8C81BC433FE for ; Sun, 27 Feb 2022 12:41:05 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230464AbiB0Mli (ORCPT ); Sun, 27 Feb 2022 07:41:38 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50122 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230239AbiB0Mlg (ORCPT ); Sun, 27 Feb 2022 07:41:36 -0500 Received: from new1-smtp.messagingengine.com (new1-smtp.messagingengine.com [66.111.4.221]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 8224F6D1BF; Sun, 27 Feb 2022 04:40:58 -0800 (PST) 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 Precedence: bulk List-ID: X-Mailing-List: devicetree@vger.kernel.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