From patchwork Mon Oct 24 11:10:13 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alistair Francis X-Patchwork-Id: 591 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:6687:0:0:0:0:0 with SMTP id l7csp385792wru; Mon, 24 Oct 2022 04:18:50 -0700 (PDT) X-Google-Smtp-Source: AMsMyM4Qm+Bt4kTTTmTPI8SnWsErpu9DOXVbRpiqfyQxSHqdoZCuYgdxbW2sfkpLOWbwT3I5tMpQ X-Received: by 2002:a17:903:2402:b0:184:29:8ac0 with SMTP id e2-20020a170903240200b0018400298ac0mr32079147plo.174.1666610330444; Mon, 24 Oct 2022 04:18:50 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1666610330; cv=none; d=google.com; s=arc-20160816; b=U6UI6ZznNVPA9WLs4cdzD39GwrhKQwuRsjwk5Hr2x5OLvbHxWHEYyNgaYxsWetKLtB JKrulFA+nz+OjK3X7DJ/4KKqBFmkQb38MxZR7CDcxJQ5krxSzPBcFWpnL7kA2Bp1K9QM 9qXFAxVcZEyQ/4VTkmQqxhdW2ipryVvAEiTX3/SjOfrdjexWcnfuqJw+N2qiFNGh2b/M 09UVXK1+5XldXYGc8ic7SRYv5FvG3JXCGeDfOactH8bNJV95zdlgYDKrOTKtXR7K3+eO Oqnh1uimcfcqw6shfzwpuQ9NfMcjdoj+V0R5l9lV1FP0VfnNifzBQvFrqcNS2eKeJKa9 dXEw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from:feedback-id:dkim-signature :dkim-signature; bh=gbhK/eMcTlKbenVeIyYgpWT6RRs4ePlOWO1qBGWrAKg=; b=wrq9RyF/M12Di72DlM5pBLrpYGFYoL9b+4ebl5qdBs51BHgSwtlEUq0OyKIf0QLTFD 42+FhOk7U4eZkr2nSR62Cu8dLuPAI3yQjVk9NwCgEfM0mOJQz5cw3JNf+MUWKXv9rrst 0hj9x08+v2VWdqnv0M0NXzBqmAe+zY34+otzaIyjt3t+ap5qHXj2yFi9ha7SmswgQKFV lgyOAgtAJ1Jw3uyY3eUUw6OPjVHTuV5JtPJmdbyMpSrbzRT9vUhM3vYkfeeGu/LzLf2T 25OpvtVN9E8STQBQceXmVsR2GgcBJHSoTXfKYQO6nlRA+9wDqOyeIH4FpgBkFAXRoqWm aK5Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@alistair23.me header.s=fm3 header.b=cYSOFk+X; dkim=pass header.i=@messagingengine.com header.s=fm3 header.b=oBCu9z2e; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id q8-20020a654948000000b0045d1aa2a589si36257831pgs.840.2022.10.24.04.18.35; Mon, 24 Oct 2022 04:18:50 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@alistair23.me header.s=fm3 header.b=cYSOFk+X; dkim=pass header.i=@messagingengine.com header.s=fm3 header.b=oBCu9z2e; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230170AbiJXLKo (ORCPT + 99 others); Mon, 24 Oct 2022 07:10:44 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56166 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230089AbiJXLKh (ORCPT ); Mon, 24 Oct 2022 07:10:37 -0400 Received: from wout2-smtp.messagingengine.com (wout2-smtp.messagingengine.com [64.147.123.25]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 7F4FA38478; Mon, 24 Oct 2022 04:10:34 -0700 (PDT) Received: from compute3.internal (compute3.nyi.internal [10.202.2.43]) by mailout.west.internal (Postfix) with ESMTP id CFEAE320092A; Mon, 24 Oct 2022 07:10:32 -0400 (EDT) Received: from mailfrontend1 ([10.202.2.162]) by compute3.internal (MEProxy); Mon, 24 Oct 2022 07:10:33 -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=fm3; t=1666609832; x=1666696232; bh=gb hK/eMcTlKbenVeIyYgpWT6RRs4ePlOWO1qBGWrAKg=; b=cYSOFk+XBLFUytwYYW k8sZ52HdfuVanKe7QeCD11V0YG8oWV+WfXOsh44ndupJIeBsEpMtqt0XzzYRoHkm T6Wh0SUwDOp2toWrUMt23Gkk+hqJ5R7ojdMSmhl2yo5FF1yqlvrxkRafSgtDcgL5 jyJCM5PvGgT5H4NazJ3euvcHzEz5rSVo8kDs2M0V5IawWvjJkRRsQPIT7bas3LjI S69vP85lYZoh8a0n+wMmmgwW5L7qXHqsrVtw8TLpEN7GyOa3lECLrzJo1xbVRkgj VjxODEqZrl4tdd9G2x+t41LjhCuoLO8cg7BBUKJFHSuzgruZPBigvbJUle8a9KX4 jSlw== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-transfer-encoding :content-type:date:date:feedback-id:feedback-id: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; t=1666609832; x=1666696232; bh=gbhK/eMcTlKbe nVeIyYgpWT6RRs4ePlOWO1qBGWrAKg=; b=oBCu9z2eauloy/0TjSHQq2tIMrAwk 9Km027WomJnOG9tl6XEtM/fi2qp31kT681CfU8Z2UnOeiLORtFbD+tX/0qWmDVek M1emND0dUIJVrmMA3zJ2rmGiD1v26gEtw51M8x9Rzu2270AAeLiDBjyh2f0CQuwv oAKpV7iXFTxpa2GKFLm7X61bHLmINB+fyRn4OXh/fEDDuA4q6Q2vUL6N6gd7fiB7 zQo+VSMi6K5yMp8OeMb0MfYiF07JYcSWedBdhf5NjgJ/Fi1pBG4Ye65oseLRK3yg kglp3mKOJpT5ajccMeWYzUJvr4DRDOxHJuA5JOlSRPJpbTnVZg+n2Ol8w== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvfedrgedtgedgfeefucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucenucfjughrpefhvfevufffkffogggtgfesthekre dtredtjeenucfhrhhomheptehlihhsthgrihhrucfhrhgrnhgtihhsuceorghlihhsthgr ihhrsegrlhhishhtrghirhdvfedrmhgvqeenucggtffrrghtthgvrhhnpeegtddvffefff ejkeeggfegteffffdtueevkeefvdejveetvdeuuddvvddtiefgleenucffohhmrghinhep lhifnhdrnhgvthdpghhithhhuhgsrdgtohhmnecuvehluhhsthgvrhfuihiivgeptdenuc frrghrrghmpehmrghilhhfrhhomheprghlihhsthgrihhrsegrlhhishhtrghirhdvfedr mhgv X-ME-Proxy: Feedback-ID: ifd214418:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Mon, 24 Oct 2022 07:10:22 -0400 (EDT) From: Alistair Francis To: linux-input@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org Cc: linus.walleij@linaro.org, s.hauer@pengutronix.de, robh+dt@kernel.org, andreas@kemnade.info, krzysztof.kozlowski+dt@linaro.org, alistair23@gmail.com, dmitry.torokhov@gmail.com, rydberg@bitmath.org, shawnguo@kernel.org, Alistair Francis Subject: [PATCH v9 0/4] Add support for the Cypress cyttsp5 Date: Mon, 24 Oct 2022 21:10:13 +1000 Message-Id: <20221024111017.43859-1-alistair@alistair23.me> X-Mailer: git-send-email 2.37.3 MIME-Version: 1.0 X-Spam-Status: No, score=-2.8 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_LOW, RCVD_IN_MSPIKE_H2,SPF_HELO_PASS,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1747567593794440573?= X-GMAIL-MSGID: =?utf-8?q?1747567593794440573?= 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 v9: - Fixup kernel robot failures v8: - Rebase and resend 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 | 100 ++ 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, 1120 insertions(+) create mode 100644 Documentation/devicetree/bindings/input/touchscreen/cypress,tt21000.yaml create mode 100644 drivers/input/touchscreen/cyttsp5.c