From patchwork Fri Nov 25 22:09:03 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Samuel Holland X-Patchwork-Id: 26147 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:adf:f944:0:0:0:0:0 with SMTP id q4csp4316993wrr; Fri, 25 Nov 2022 14:10:56 -0800 (PST) X-Google-Smtp-Source: AA0mqf5FZBMZ3bn7xyD1IaPWtGGHZasd3Zg/R5QaeWgSrH4ZUxY0Jw8QgxUr8LADRbXbQtwV5y3E X-Received: by 2002:a17:902:bf06:b0:17b:d6ad:94c8 with SMTP id bi6-20020a170902bf0600b0017bd6ad94c8mr33963824plb.110.1669414255987; Fri, 25 Nov 2022 14:10:55 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1669414255; cv=none; d=google.com; s=arc-20160816; b=bTCNVrK9b8PBYRL2JDffIthtKADYskaGIgTDCS5W9LezibiY65mog8Nro+o79y2Sbw 6HyHOt9AbJgHxlFUoe2LIFcu1S9FHs5fRAl4CRw9GhDAs2xcQ6jFyZ7AEr7J/KzxFWXj kwbnu4z9ID2k9zp3VnElyACB3xWympZiqlH6j3y0sX1dpbBbScgVMIskMNp6xZOyxmIP YkWzfcLrJ/CF7y4uXxeS8FVL3VlEkmO22HyLn1RB89c16amGu/QOwMnhb/zDNuTHFNVh cvVVnqRb8yCmg6+r5vqO9Ntofw8cFCh1+15rAHszf6q5z3xWKWlx9neiZn2jJqlQf2DD a0EQ== 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=4cM7oNUdfCrlaSJutCnkmr2DSEvNa89l2bj+Gk9Ktgs=; b=Gd4L4hkan3yzdRGJN2tqtoPVp7ufleMDNBR7qTKGuZg6Eb7aEveY4JTN6SLqMSmYgQ 9BDnsGYH5asLsuAkUMM7BuqOlEpcDkbgMXWRFEnlhtXAiGzEKgN7bOvQmcAmGQcWgdmX 3frTP0HGsTCaXCUFEmyUlSKgkZ9dh/n7p0s99q0+Bg5qptOhJrTffyXOuZXOXat/YA4L 0RkO6bKq+1DnpeT0d++hlmjcQ6nk2Hd6pABrFruNQlcJuGWXPJsDxqXlyvby+RS9tnzK OsiNo3jLquUC+X7jFpIXPJHdhQCTS2iVdPU66vyvLupjfIQspVffZD+v6Je/rhmklVFd yY4g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@sholland.org header.s=fm2 header.b=s+lO9y6I; dkim=pass header.i=@messagingengine.com header.s=fm1 header.b=umPjCECf; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=sholland.org Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id 9-20020a630609000000b0046f4696a544si5078324pgg.128.2022.11.25.14.10.43; Fri, 25 Nov 2022 14:10:55 -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=pass header.i=@sholland.org header.s=fm2 header.b=s+lO9y6I; dkim=pass header.i=@messagingengine.com header.s=fm1 header.b=umPjCECf; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=sholland.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229931AbiKYWJH (ORCPT + 99 others); Fri, 25 Nov 2022 17:09:07 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:59946 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229582AbiKYWJG (ORCPT ); Fri, 25 Nov 2022 17:09:06 -0500 Received: from out3-smtp.messagingengine.com (out3-smtp.messagingengine.com [66.111.4.27]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C413230F62; Fri, 25 Nov 2022 14:09:05 -0800 (PST) Received: from compute3.internal (compute3.nyi.internal [10.202.2.43]) by mailout.nyi.internal (Postfix) with ESMTP id 39F325C00BB; Fri, 25 Nov 2022 17:09:05 -0500 (EST) Received: from mailfrontend1 ([10.202.2.162]) by compute3.internal (MEProxy); Fri, 25 Nov 2022 17:09:05 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sholland.org; h= cc:cc:content-transfer-encoding:date:date:from:from:in-reply-to :message-id:mime-version:reply-to:sender:subject:subject:to:to; s=fm2; t=1669414145; x=1669500545; bh=4cM7oNUdfCrlaSJutCnkmr2DS EvNa89l2bj+Gk9Ktgs=; b=s+lO9y6IgAxAoQATpo319Vik09JCjdzjRLrVMaR1k xBK5BVySFXV1Yb8z/yFCqh5wYMOtJ25nfqmgixBxaw5MUUzIlLAIvGIMQdS6WBVG j81xPq1JfwJeGLt1fTQdm3aquX8PhavOu+9rsJdecBYgwnLJJh0Fk8uGeVnP1ytS +r/x7NBBJr4vm3IkPkTNzVDKemWzmgvkoVsp/q95B8KqG3BEJoqCdN1Ni1N/Actp LG58R+kzjp8fE2aAz8NI2l/AXg2uRLUuVI/N01EJ4ZHiJjztZe/Fyyi/ZVsz0FoW 19PeW9IWINS2dGtXsYyU8ypr1S6exs0HjAbz3OvHl3RcA== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-transfer-encoding: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=fm1; t= 1669414145; x=1669500545; bh=4cM7oNUdfCrlaSJutCnkmr2DSEvNa89l2bj +Gk9Ktgs=; b=umPjCECfK0vyccZOO8bYUymxE1owvvdzLy1lIJ9l1Hay4l0WGLl RR9kriJ6iQ0VqwKd9GwmoF1UwCCezK7WWGfcjmFlwp+/2PtrHSGUGw9vo0gpB7Fj N6EOWLZKtpykRW2Ks84nNn7RFZnjHP+56FPNyRHWmvP/Nim1jsg5MYHWOL+HLwxC xq9B5T4IMokHdTa2gpROJ+J7pjvzsw6QDwhrVgVqFykzHqjM0cd2YhBRwBce5V72 GvJwvbEJr8ZjO1wNtUq3oA9oKkQW8EPWPgPERKFOrenpZJTfYxZUjFlAtRtoveir WbokxlrBr6eBYHODXqBfhyKWMbgmwsq43Mg== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvgedrieehgdduheekucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne cujfgurhephffvvefufffkofgggfestdekredtredttdenucfhrhhomhepufgrmhhuvghl ucfjohhllhgrnhguuceoshgrmhhuvghlsehshhholhhlrghnugdrohhrgheqnecuggftrf grthhtvghrnhepfeduffffueetveefudehueelgefgvdfffeelledtjeegudeiudehffdt jefhgefhnecuffhomhgrihhnpeguvghvihgtvghtrhgvvgdrohhrghenucevlhhushhtvg hrufhiiigvpedtnecurfgrrhgrmhepmhgrihhlfhhrohhmpehsrghmuhgvlhesshhhohhl lhgrnhgurdhorhhg X-ME-Proxy: Feedback-ID: i0ad843c9:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Fri, 25 Nov 2022 17:09:04 -0500 (EST) From: Samuel Holland To: Jonathan Cameron , Lars-Peter Clausen , Rob Herring , Krzysztof Kozlowski Cc: Samuel Holland , devicetree@vger.kernel.org, linux-iio@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH] dt-bindings: iio: adc: ti,adc081c: Document the binding Date: Fri, 25 Nov 2022 16:09:03 -0600 Message-Id: <20221125220903.8632-1-samuel@sholland.org> X-Mailer: git-send-email 2.37.4 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,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?1750507722605101088?= X-GMAIL-MSGID: =?utf-8?q?1750507722605101088?= Linux has a driver for these ADCs at drivers/iio/adc/ti-adc081c.c, but the compatible strings were undocumented. Add a binding for them. The hardware has an alert interrupt output, but existing ti,adc081c users do not provide the 'interrupts' property, so leave it as optional. Signed-off-by: Samuel Holland Reviewed-by: Krzysztof Kozlowski --- .../bindings/iio/adc/ti,adc081c.yaml | 55 +++++++++++++++++++ 1 file changed, 55 insertions(+) create mode 100644 Documentation/devicetree/bindings/iio/adc/ti,adc081c.yaml diff --git a/Documentation/devicetree/bindings/iio/adc/ti,adc081c.yaml b/Documentation/devicetree/bindings/iio/adc/ti,adc081c.yaml new file mode 100644 index 000000000000..caaad777580c --- /dev/null +++ b/Documentation/devicetree/bindings/iio/adc/ti,adc081c.yaml @@ -0,0 +1,55 @@ +# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause) +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/iio/adc/ti,adc081c.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: TI Single-channel I2C ADCs + +maintainers: + - Jonathan Cameron + - Lars-Peter Clausen + +description: | + Single-channel ADC supporting 8, 10, or 12-bit samples and high/low alerts. + +properties: + compatible: + enum: + - ti,adc081c + - ti,adc101c + - ti,adc121c + + reg: + maxItems: 1 + + interrupts: + maxItems: 1 + + vref-supply: + description: + Regulator for the combined power supply and voltage reference + + "#io-channel-cells": + const: 1 + +required: + - compatible + - reg + - vref-supply + +additionalProperties: false + +examples: + - | + i2c { + #address-cells = <1>; + #size-cells = <0>; + + adc@52 { + compatible = "ti,adc081c"; + reg = <0x52>; + vref-supply = <®_2p5v>; + }; + }; +...