From patchwork Mon Dec 11 12:14:26 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kamel Bouhara X-Patchwork-Id: 17842 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:bcd1:0:b0:403:3b70:6f57 with SMTP id r17csp6998830vqy; Mon, 11 Dec 2023 04:15:01 -0800 (PST) X-Google-Smtp-Source: AGHT+IHYM80HRfjIwbvn7OtjdTKBQx7ihjejoNMlG458WEunHmKGhS9AgjPEOddv4tiktPsf4iTU X-Received: by 2002:a05:6e02:12c6:b0:35a:fad3:2b2a with SMTP id i6-20020a056e0212c600b0035afad32b2amr7050063ilm.12.1702296901658; Mon, 11 Dec 2023 04:15:01 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1702296901; cv=none; d=google.com; s=arc-20160816; b=VaAszZXZupPEZob4l6eT1NGdidKghvNsRQ7z0C9k+xyyhCOUp4k8+UXWSA04NWz/H5 2z9ee1+/P1t9cOrCByh/6qE/qBqElp6qa6u47FW9+rPUZiJM61mcPizhMVYcjNz3RM6d J8ef6RookRBiGg5wPSjLI3RTNAKdVTmGwsq73/KplLjs4ZlnhMUxPHzpL2xnGj/NIr6O MNBjEVYCYxd6cMurWvYhMbAQeTTHL5B49Qj2ODMHmW6bsel6eSSj5B2XFl/wiuj9JhMh ot4BXi7KAkI7h6wXRzguMEP0I5rTOy59nuRtZ6a9QvGung+QK9cRjRPhY57oeKyno1vg 9HuQ== 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:dkim-signature; bh=li3fkgdd1h7/PzgJbhx3icmAeCcuFW9T2WdfuNDW6JQ=; fh=EgA3ynOL0MYidVPneEorVrq8MDk7rnKA329crS/81pE=; b=zUgZN1lTKSK0BgMI0YnOFqThk7O+KaDmcpVodhV9NBrY36D7urPvyGzRKvRszoLgrV mGn+wxcWh7sTAaJtjb2VQxc+PGVdG/rWWzMQGXlc5jRx9S9aGn78zAsxbh54zcDn+gxw T7WrnZqOkE+2PB/07cKLjJczxQt1WaHs/qwTBMjmlEP+7rpMSWlFRliDJlydEbVUtmfg +CeMaTM0+TDldsRne08vv1ZQcenkhNLSHgRhbWrHkKblvWLIgp4ax8WbFT4mIJnGTlPA JSeP5562HcAdyc6my+vRMLsZK9GkFaSCbgx0ip+sRX7eiN31nGxlly7yzvzh4CxRSbtL sq3Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@bootlin.com header.s=gm1 header.b=SG4QWu6F; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.31 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=bootlin.com Received: from morse.vger.email (morse.vger.email. [23.128.96.31]) by mx.google.com with ESMTPS id s13-20020a65690d000000b005c65d0dd9a0si5800394pgq.503.2023.12.11.04.15.00 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 11 Dec 2023 04:15:01 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.31 as permitted sender) client-ip=23.128.96.31; Authentication-Results: mx.google.com; dkim=pass header.i=@bootlin.com header.s=gm1 header.b=SG4QWu6F; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.31 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=bootlin.com Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by morse.vger.email (Postfix) with ESMTP id 594938043AD4; Mon, 11 Dec 2023 04:14:56 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at morse.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234760AbjLKMOg (ORCPT + 99 others); Mon, 11 Dec 2023 07:14:36 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:60450 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229768AbjLKMOf (ORCPT ); Mon, 11 Dec 2023 07:14:35 -0500 Received: from relay5-d.mail.gandi.net (relay5-d.mail.gandi.net [217.70.183.197]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 44C34CF; Mon, 11 Dec 2023 04:14:40 -0800 (PST) Received: by mail.gandi.net (Postfix) with ESMTPSA id D62221C0004; Mon, 11 Dec 2023 12:14:38 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bootlin.com; s=gm1; t=1702296879; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding; bh=li3fkgdd1h7/PzgJbhx3icmAeCcuFW9T2WdfuNDW6JQ=; b=SG4QWu6FXf80+rGPX80bz9b7PZQ9sx8IfQdWv1GfVP67U5CttsGLVDrc4zg9sQdfh0L/NQ p4b/6qXSiKg3WDzYOh6RO8ctKDzpIfVkyTGMSOR94ZVGORCxB8570y2PVrj911u3NuFLkp L5bu/xMxtLx48F9JIYXQ18XbhN/drNU6qKtPALyMf54AQ7yTaGe6ahY6C5eSROZBNj6Fdt BLvjTRnrg2DAlNLPUHnj3vjqP5n8iKEBopTU7dvsxKuv4nWiy8O0Ydrj6GoLkW0j/BTLlK zbE76kdp/+rwdSIrUtsGS/yJ9d9KihJo93ALyaok6ZG5JF1oyOAk02/IQD3x9A== From: Kamel Bouhara To: Dmitry Torokhov , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Henrik Rydberg , linux-input@vger.kernel.org, linux-kernel@vger.kernel.org, devicetree@vger.kernel.org, Marco Felsch , Jeff LaBundy Cc: catalin.popescu@leica-geosystems.com, mark.satterthwaite@touchnetix.com, bartp@baasheep.co.uk, hannah.rossiter@touchnetix.com, Thomas Petazzoni , Gregory Clement , bsp-development.geo@leica-geosystems.com, Kamel Bouhara Subject: [PATCH v5 0/3] Input: Add TouchNetix axiom touchscreen driver Date: Mon, 11 Dec 2023 13:14:26 +0100 Message-ID: <20231211121430.1689139-1-kamel.bouhara@bootlin.com> X-Mailer: git-send-email 2.42.0 MIME-Version: 1.0 X-GND-Sasl: kamel.bouhara@bootlin.com X-Spam-Status: No, score=-0.9 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on morse.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (morse.vger.email [0.0.0.0]); Mon, 11 Dec 2023 04:14:56 -0800 (PST) X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1784987675921237617 X-GMAIL-MSGID: 1784987675921237617 Add a new driver for the TouchNetix's axiom family of touchscreen controller. This driver only support i2c and can be later adapted for SPI and USB support. --- Changes in v2: - Add device tree binding documentation - Move core functions in axiom_i2c as we only care about i2c support now - Use static function when required - Use syntax dev_err_probe() - Add an hardware based reset Changes in v3: - Remove irq-gpios property in dt-binding - Use a generic node name - Fix issues reported in https://lore.kernel.org/oe-kbuild-all/202310100300.oAC2M62R-lkp@intel.com/ Changes in v4: - Cleanup unused headers and macros - Use standard kernel type - Namespace structures and functions - Use packed struct when possible to avoid bitfield operators - Fix missing break when address is found in axiom_populate_target_address() - Split reads in two steps for the reports, first length then report itself so we only read required bytes - Get poll-interval from devicetree - Add VDDI/VDDA regulators - Add a startup delay of 110 ms required after VDDA/VDDI is applied - Remove axiom_i2c_write() as it is no more used Changes in v5: - Fix wrong message constructed in axiom_i2c_read - Delay required between i2c reads is >= 250us - Do not split report reading in two phases as we'll have to wait 500us - Use lower-case in properties names - Make regulators properties are required in dt-binding - Fix bug report: https://lore.kernel.org/lkml/202312051457.y3N1q3sZ-lkp@intel.com/ - Fix bug report: https://lore.kernel.org/lkml/6f8e3b64-5b21-4a50-8680-063ef7a93bdb@suswa.mountain/ Kamel Bouhara (3): dt-bindings: vendor-prefixes: Add TouchNetix AS dt-bindings: input: Add TouchNetix axiom touchscreen Input: Add TouchNetix axiom i2c touchscreen driver .../input/touchscreen/touchnetix,ax54a.yaml | 64 ++ .../devicetree/bindings/vendor-prefixes.yaml | 2 + MAINTAINERS | 7 + drivers/input/touchscreen/Kconfig | 12 + drivers/input/touchscreen/Makefile | 1 + drivers/input/touchscreen/touchnetix_axiom.c | 667 ++++++++++++++++++ 6 files changed, 753 insertions(+) create mode 100644 Documentation/devicetree/bindings/input/touchscreen/touchnetix,ax54a.yaml create mode 100644 drivers/input/touchscreen/touchnetix_axiom.c -- 2.25.1