From patchwork Thu Dec 22 20:36:07 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Hugo Villeneuve X-Patchwork-Id: 3244 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:adf:e747:0:0:0:0:0 with SMTP id c7csp152802wrn; Thu, 22 Dec 2022 12:38:57 -0800 (PST) X-Google-Smtp-Source: AMrXdXtiF2Z0bsbQE7XfjPqztwk8AVPDQTtHCgON3diyDriBnictAiuiUcFKNq0d0osIJg0PABYr X-Received: by 2002:a17:906:503:b0:7c1:7c38:f079 with SMTP id j3-20020a170906050300b007c17c38f079mr5884320eja.71.1671741537237; Thu, 22 Dec 2022 12:38:57 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1671741537; cv=none; d=google.com; s=arc-20160816; b=ygjJ3I3E/SzGtWSPNPKLdKfAeGSFpkUCRahYFMDC4p8lFASqXQsNXzaMeYTL4sWPlO KCL6JbwA6c3r8XViYqOpt7MRxpf3FO4EoxIiF/97/L8vcnmry8/lndwC/W1J3KXqerC4 X7V1cIpGCyBNZt9rI1/Rea1HieWgP+fYj5CkKXbRApTaKYB0grJui12jBG/wdbQbic+n t2OPPDNghz9us8Yaat68VavWPXL2mv4CAbC1ORcFjRlQztIs8s6iP2TYb5AovYe1jE7P rtWB4rSplXe4ttK6N/kTwBxw81nip+DSUciY0b+umdBPI7BbJa0MFbGxhXrSuIQSa4A7 vGWA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:subject:content-transfer-encoding:mime-version :message-id:date:cc:to:from:dkim-signature; bh=vuWOTfKuoqimGP9F3MtcglDHIino9so3a/7+/AE/35M=; b=qL+x04akaqlzPsxzIeTCjatk4y6WjKWiXle1+lFc3XnzIZpQzZB1GCFBYUTc0qMqvW cQbZ9SPjiHtx2itQesXwTdvRM/9wwSf6h4GvCBnZsEkJfXIX1Tz55l3yly+Bn32p2Y94 orqN/bn46awbEv+L+EBWPmO3XiH3rA3/2Fd/xdOr4D37WJMPb6PwmyBGKBxwwJhqGL7P b0Pm2Khq0xQSRaY0ro6jtHyYOuUJg3AlawgWSDRIX0Vag3pCWgKvrjGJF5OAYT5bRIdy 1wcsIUJetW2d/bv2euOFJ+6+IZeq8APqiWoLvum1hNYqQ4bGxogMzH2NyEgoP5i+ZxlV LrDQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@hugovil.com header.s=x header.b=y5GkQ88x; 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 a17-20020a05640213d100b0046fa2af972dsi1239935edx.336.2022.12.22.12.38.33; Thu, 22 Dec 2022 12:38:57 -0800 (PST) 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=fail header.i=@hugovil.com header.s=x header.b=y5GkQ88x; 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 S235540AbiLVUhT (ORCPT + 99 others); Thu, 22 Dec 2022 15:37:19 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:54238 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235084AbiLVUhA (ORCPT ); Thu, 22 Dec 2022 15:37:00 -0500 Received: from mail.hugovil.com (mail.hugovil.com [162.243.120.170]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 31F5520BE1; Thu, 22 Dec 2022 12:36:57 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=hugovil.com ; s=x; h=Subject:Content-Transfer-Encoding:MIME-Version:Message-Id:Date:Cc:To :From:Sender:Reply-To:Content-Type:Content-ID:Content-Description:Resent-Date :Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To: References:List-Id:List-Help:List-Unsubscribe:List-Subscribe:List-Post: List-Owner:List-Archive; bh=vuWOTfKuoqimGP9F3MtcglDHIino9so3a/7+/AE/35M=; b=y 5GkQ88xn6kFPZzsT36DO5e403WKD6ikk2O+WBtCbDlRr6ImdPh4PFvJrsuVbB9zrcrTvW7y0ubk5U A0vs4rb6okChazf+GMm12CYOJwYo4pkBiie7Em8X+NdYrr99Yr3L5jfDSzRI87lW/yPgmxRFQ64C8 ECdtE/LkZC5vlJck=; Received: from modemcable168.174-80-70.mc.videotron.ca ([70.80.174.168]:48920 helo=pettiford.lan) by mail.hugovil.com with esmtpa (Exim 4.92) (envelope-from ) id 1p8SJ7-000070-U4; Thu, 22 Dec 2022 15:36:50 -0500 From: Hugo Villeneuve To: hvilleneuve@dimonoff.com, jic23@kernel.org, lars@metafoo.de, robh+dt@kernel.org, krzysztof.kozlowski+dt@linaro.org Cc: linux-iio@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, hugo@hugovil.com Date: Thu, 22 Dec 2022 15:36:07 -0500 Message-Id: <20221222203610.2571287-1-hugo@hugovil.com> X-Mailer: git-send-email 2.30.2 MIME-Version: 1.0 X-SA-Exim-Connect-IP: 70.80.174.168 X-SA-Exim-Mail-From: hugo@hugovil.com X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net X-Spam-Level: X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,SPF_HELO_PASS,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 Subject: [PATCH v1 0/3] iio: adc: ti-ads7924: add ADS7924 driver X-SA-Exim-Version: 4.2.1 (built Wed, 08 May 2019 21:11:16 +0000) X-SA-Exim-Scanned: Yes (on mail.hugovil.com) 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?1752948054136002965?= X-GMAIL-MSGID: =?utf-8?q?1752948054136002965?= From: Hugo Villeneuve Hello, this patch series adds the driver for the Texas Instruments ADS7924. The Texas Instruments ADS7924 is a 4 channels, 12-bit analog to digital converter (ADC) with an I2C interface. Patch 1 adds a Kconfig comment to help differentiate between the Analog Devices AD7924 (SPI) and the TI ADS7924 (I2C). Patch 2 contains the driver for the ADS7924. Patch 3 add the dt-bindings for the ADS7924. I have tested the driver using the Texas Instruments ADS7924EVM board connected to a Variscite Symphony EVK with a IMX8MN NANO SOM: - Tested reset pin Ok - Tested regulator setup Ok - Tested reading sysfs in_voltage_scale Ok - Tested reading sysfs in_voltageX_raw (x=0 to 3) Ok Thank you. Hugo Villeneuve (3): iio: adc: Kconfig: add SPI interface mention to AD7924 description iio: adc: ti-ads7924: add ADS7924 driver dt-bindings: iio: adc: add ADS7924 .../bindings/iio/adc/ti,ads7924.yaml | 103 ++++ MAINTAINERS | 7 + drivers/iio/adc/Kconfig | 15 +- drivers/iio/adc/Makefile | 1 + drivers/iio/adc/ti-ads7924.c | 514 ++++++++++++++++++ 5 files changed, 639 insertions(+), 1 deletion(-) create mode 100644 Documentation/devicetree/bindings/iio/adc/ti,ads7924.yaml create mode 100644 drivers/iio/adc/ti-ads7924.c base-commit: 4652bc537a2e0b44959489f45e4684fa4f143a45