From patchwork Wed Mar 23 12:00:17 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alistair Francis X-Patchwork-Id: 12789733 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 C8D46C433EF for ; Wed, 23 Mar 2022 12:00:33 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S244023AbiCWMCB (ORCPT ); Wed, 23 Mar 2022 08:02:01 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50286 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235981AbiCWMB7 (ORCPT ); Wed, 23 Mar 2022 08:01:59 -0400 Received: from wout2-smtp.messagingengine.com (wout2-smtp.messagingengine.com [64.147.123.25]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 8473075E48; Wed, 23 Mar 2022 05:00:30 -0700 (PDT) Received: from compute3.internal (compute3.nyi.internal [10.202.2.43]) by mailout.west.internal (Postfix) with ESMTP id E5A8C3200B25; Wed, 23 Mar 2022 08:00:28 -0400 (EDT) Received: from mailfrontend2 ([10.202.2.163]) by compute3.internal (MEProxy); Wed, 23 Mar 2022 08:00:29 -0400 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=fm1; bh=oPrRJr0au2XwO23A1HrZcbzNNDvN2/ /w4Jho90lrt5k=; b=gKV2vvBbKK2CDXVZClM9sEyBTqMot0mnlvSvBmw/wtu+Jm GyATvZxRh04VKTVFjCyjKKwVnJfFttbn5avccW3clmlQBV5/UmeFmQobMIdpTziz m2ISablfOvsZ40L7YtNAhagIQnoBMv+RZ2vvuhNE6CS9uRHjtH1TnlyoF9tYmf1Z 6ULpkPqo2QBvReSS908fs+AJqaeZJhsJdXrSeYMzUESLaimRleWHXJ0eAfuo4sjg rbiMLsbCXv+Vh3g8sJLTAw7TN2JdULdyHsxVxuQP8d+lBrA1pwQGWx7NjOvBykuz nbMYgLPmN3NvnYJEu84rypmWgPm+9/XBMtL1YXoQ== 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=fm3; bh=oPrRJr 0au2XwO23A1HrZcbzNNDvN2//w4Jho90lrt5k=; b=ZiWrVgPtA+2AZnoGCotgt9 dUBM/fojGl5Iiv2uXDdPVXKd2UG1+BPVzF4mLG9e9DHIovMD6ovMZwJWyC2sf50t dvvbDsd/aPbPi76xQPExXNVxhHGtBWbJ6LtRFwdbYNfdkLv/d33QrZbJ8HMCjw/V rAMNQn+5IsXn/qNV/xSmjkYwLJ3OnZSktwSufhZutLf5DEtaMVtF2xNLr69pCFuk mGzxr7N7VCd9BXICnWKliEmAOXh4NbEyuNokw5oj5SGY+FHZdlDvL7pJhzLG20fY QpMIylKPGw0RIguRGQ4vCRZnr+4wfBr3paqfW8C1eNAac6WWvYDYtE7V8kEXXuwA == X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvvddrudegjedgfeefucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucenucfjughrpefhvffufffkofggtgfgsehtqhertd ertdejnecuhfhrohhmpeetlhhishhtrghirhcuhfhrrghntghishcuoegrlhhishhtrghi rhesrghlihhsthgrihhrvdefrdhmvgeqnecuggftrfgrthhtvghrnhepffelvdegveefve efvddvffeiteefgfejveegieethfekgefhleeukefhjeehfffgnecuffhomhgrihhnpehl fihnrdhnvghtpdhgihhthhhusgdrtghomhenucevlhhushhtvghrufhiiigvpedtnecurf grrhgrmhepmhgrihhlfhhrohhmpegrlhhishhtrghirhesrghlihhsthgrihhrvdefrdhm vg X-ME-Proxy: Received: by mail.messagingengine.com (Postfix) with ESMTPA; Wed, 23 Mar 2022 08:00:23 -0400 (EDT) From: Alistair Francis To: linux-input@vger.kernel.org, devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Cc: alistair23@gmail.com, rydberg@bitmath.org, linus.walleij@linaro.org, robh+dt@kernel.org, dmitry.torokhov@gmail.com, andreas@kemnade.info, Alistair Francis Subject: [PATCH v7 0/4] Add support for the Cypress cyttsp5 Date: Wed, 23 Mar 2022 22:00:17 +1000 Message-Id: <20220323120021.361137-1-alistair@alistair23.me> X-Mailer: git-send-email 2.35.1 MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-input@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 v7: - Fix device tree warnings 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 | 101 ++ arch/arm/boot/dts/imx7d-remarkable2.dts | 100 ++ 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, 1121 insertions(+) create mode 100644 Documentation/devicetree/bindings/input/touchscreen/cypress,tt21000.yaml create mode 100644 drivers/input/touchscreen/cyttsp5.c