From patchwork Sun Jun 27 16:32:30 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jonathan Cameron X-Patchwork-Id: 12346883 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-19.7 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 5B522C49EA6 for ; Sun, 27 Jun 2021 16:30:37 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 40321619F1 for ; Sun, 27 Jun 2021 16:30:37 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230505AbhF0Qc7 (ORCPT ); Sun, 27 Jun 2021 12:32:59 -0400 Received: from mail.kernel.org ([198.145.29.99]:44964 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230315AbhF0Qc6 (ORCPT ); Sun, 27 Jun 2021 12:32:58 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id 9C663619EE; Sun, 27 Jun 2021 16:30:32 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1624811434; bh=hBOyjKv+0wVWVYHNsRiFNDZRxA1uNPRZ6ksWzHUapDI=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=OFITp9rcZywJFDDSlHRCUT09TQelQxNKYPqnLVsCBzHYlgFJRwdpybTH0/t3a9muB 99Ue1Tzw/V8tStO23WL6JS/12p1PTPf4gbQUpFseMNGRIfe0zYPOapWQo8aIvsYLEB l+4RoG1hqOwQLKLl0okfQCYJFiEAre8Bv6KU5ShtUMLzC9HT8f/J77rKZwcGNM5+mM zklwzyiUJH0vWdhXVVPFBPFbFMghIeVgCrn+pD+HLY8F6bNu69JNHMdGW7M4li5o7H KZLtXDpieMdP4qmpMDQb0pBE4fYLyFmt9B1fnuFMnHw1bDfp0RutdbaJotSTsD/u4G MzRBIuPOI2buA== From: Jonathan Cameron To: linux-iio@vger.kernel.org, Rob Herring , devicetree@vger.kernel.org Cc: Jonathan Cameron , Lars-Peter Clausen Subject: [PATCH 01/15] dt-bindings: iio: dac: adi,ad5421: Add missing binding document. Date: Sun, 27 Jun 2021 17:32:30 +0100 Message-Id: <20210627163244.1090296-2-jic23@kernel.org> X-Mailer: git-send-email 2.32.0 In-Reply-To: <20210627163244.1090296-1-jic23@kernel.org> References: <20210627163244.1090296-1-jic23@kernel.org> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-iio@vger.kernel.org From: Jonathan Cameron This is documented what is currently the case. There are a number of things that could be added, but I don't feel the binding elements are obvious enough to document without a driver implementation to verify they are good choices. These include * Range * Regulators, both input and potentially output (if the loop being driven is ever described). I've listed Lars and myself as maintainers of the binding, but if anyone else wants to be added they would be most welcome! Signed-off-by: Jonathan Cameron Cc: Lars-Peter Clausen Reviewed-by: Rob Herring --- .../bindings/iio/dac/adi,ad5421.yaml | 51 +++++++++++++++++++ 1 file changed, 51 insertions(+) diff --git a/Documentation/devicetree/bindings/iio/dac/adi,ad5421.yaml b/Documentation/devicetree/bindings/iio/dac/adi,ad5421.yaml new file mode 100644 index 000000000000..188f656617e3 --- /dev/null +++ b/Documentation/devicetree/bindings/iio/dac/adi,ad5421.yaml @@ -0,0 +1,51 @@ +# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause) +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/iio/dac/adi,ad5421.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: Analog Devices AD5421 DAC + +maintainers: + - Lars-Peter Clausen + - Jonathan Cameron + +description: | + AD5421 is designed for us in loop-powered, 4 mA to 20 mA smart transmitter + applications. It provides a 16-bit DAC, current amplifier, voltage regulator + to drive the loop and a voltage reference. + +properties: + compatible: + const: adi,ad5421 + + reg: + maxItems: 1 + + interrupts: + maxItems: 1 + description: Fault signal. + + spi-max-frequency: true + +required: + - compatible + - reg + +additionalProperties: false + +examples: + - | + #include + spi { + #address-cells = <1>; + #size-cells = <0>; + + dac@0 { + compatible = "adi,ad5421"; + reg = <0>; + spi-max-frequency = <30000000>; + interrupts = <55 IRQ_TYPE_LEVEL_HIGH>; + }; + }; +... From patchwork Sun Jun 27 16:32:31 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jonathan Cameron X-Patchwork-Id: 12346885 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-19.7 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,USER_AGENT_GIT autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 484C6C49EAB for ; Sun, 27 Jun 2021 16:30:40 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 2C18D61A1D for ; Sun, 27 Jun 2021 16:30:40 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231139AbhF0QdC (ORCPT ); Sun, 27 Jun 2021 12:33:02 -0400 Received: from mail.kernel.org ([198.145.29.99]:45028 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230315AbhF0QdB (ORCPT ); Sun, 27 Jun 2021 12:33:01 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id 7E091619D1; Sun, 27 Jun 2021 16:30:35 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1624811437; bh=6qrzyIL+AHe8VrjfusUVVvYznEz+S6YYi1btIDS1pdQ=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=RTT4eztm8ZG7w8y3lr1QWBkPgNKQ7ZuisJH/2krg95wh+PaBYIcNKhDKB6lcUQZ8Q 00Yecrx8qk2aHermyF8sxpIKR+yu7L+HJKINt2nuhISrEk0kpzHuhysiRJgiPRcTeG BXYhQ/TheTx6B+I3sJshIRepRnoUJlZIQv9YHqOwLGZzbpzZ8hgYt28Bwd68kDQD8b Z5DfkmCsXtpWhn0HZ6Af4Vktp9VaFgfBKDxd1qHJiwnQIoMzgsHRxyWrWgQsAndYG0 xvb35YnzEpXgQ1/0o48u1zQRcIuDns++dNCBx2YoGbRWYBLRRQjUW0H8yNQKN18g6L 5KM9vquSsefMg== From: Jonathan Cameron To: linux-iio@vger.kernel.org, Rob Herring , devicetree@vger.kernel.org Cc: Jonathan Cameron , Lars-Peter Clausen Subject: [PATCH 02/15] dt-bindings: iio: dac: adi,ad5064: Document bindings for many different DACs Date: Sun, 27 Jun 2021 17:32:31 +0100 Message-Id: <20210627163244.1090296-3-jic23@kernel.org> X-Mailer: git-send-email 2.32.0 In-Reply-To: <20210627163244.1090296-1-jic23@kernel.org> References: <20210627163244.1090296-1-jic23@kernel.org> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-iio@vger.kernel.org From: Jonathan Cameron Note this is documenting bindings that have effectively existing ever since this driver was merged. The naming conventions for the ADI parts are inconsistent on the data sheets which has lead to a mixture of -X and -reference voltage part naming. We could attempt to clean this up, but as we are stuck supporting the existing binding it is probably not worthwhile. Signed-off-by: Jonathan Cameron Cc: Lars-Peter Clausen Reviewed-by: Rob Herring --- .../bindings/iio/dac/adi,ad5064.yaml | 268 ++++++++++++++++++ 1 file changed, 268 insertions(+) diff --git a/Documentation/devicetree/bindings/iio/dac/adi,ad5064.yaml b/Documentation/devicetree/bindings/iio/dac/adi,ad5064.yaml new file mode 100644 index 000000000000..05ed4e0ec364 --- /dev/null +++ b/Documentation/devicetree/bindings/iio/dac/adi,ad5064.yaml @@ -0,0 +1,268 @@ +# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause) +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/iio/dac/adi,ad5064.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: Analog Devices AD5064 and similar DACs + +maintainers: + - Lars-Peter Clausen + - Jonathan Cameron + +description: | + A range of similar DAC devices with between 1 and 12 channels. Some parts + have internal references, others require a single shared external reference + and the remainder have a separate reference pin for each DAC. + +properties: + compatible: + oneOf: + - description: I2C devics + enum: + - adi,ad5024 + - adi,ad5025 + - adi,ad5044 + - adi,ad5045 + - adi,ad5064 + - adi,ad5064-1 + - adi,ad5065 + - adi,ad5628-1 + - adi,ad5628-2 + - adi,ad5648-1 + - adi,ad5648-2 + - adi,ad5666-1 + - adi,ad5666-2 + - adi,ad5668-1 + - adi,ad5668-2 + - adi,ad5668-3 + - description: SPI devices + enum: + - adi,ad5625 + - adi,ad5625r-1v25 + - adi,ad5625r-2v5 + - adi,ad5627 + - adi,ad5627r-1v25 + - adi,ad5627r-2v5 + - adi,ad5629-1 + - adi,ad5629-2 + - adi,ad5629-3 + - adi,ad5645r-1v25 + - adi,ad5645r-2v5 + - adi,ad5665 + - adi,ad5665r-1v25 + - adi,ad5665r-2v5 + - adi,ad5667 + - adi,ad5667r-1v25 + - adi,ad5667r-2v5 + - adi,ad5669-1 + - adi,ad5669-2 + - adi,ad5669-3 + - lltc,ltc2606 + - lltc,ltc2607 + - lltc,ltc2609 + - lltc,ltc2616 + - lltc,ltc2617 + - lltc,ltc2619 + - lltc,ltc2626 + - lltc,ltc2627 + - lltc,ltc2629 + - lltc,ltc2631-l12 + - lltc,ltc2631-h12 + - lltc,ltc2631-l10 + - lltc,ltc2631-h10 + - lltc,ltc2631-l8 + - lltc,ltc2631-h8 + - lltc,ltc2633-l12 + - lltc,ltc2633-h12 + - lltc,ltc2633-l10 + - lltc,ltc2633-h10 + - lltc,ltc2633-l8 + - lltc,ltc2633-h8 + - lltc,ltc2635-l12 + - lltc,ltc2635-h12 + - lltc,ltc2635-l10 + - lltc,ltc2635-h10 + - lltc,ltc2635-l8 + - lltc,ltc2635-h8 + + reg: + maxItems: 1 + + vrefA-supply: true + vrefB-supply: true + vrefC-supply: true + vrefD-supply: true + vref-supply: true + + spi-max-frequency: true + +additionalProperties: false + +required: + - compatible + - reg + +allOf: + - # Shared external vref, no internal reference + if: + properties: + compatible: + contains: + enum: + - adi,ad5064-1 + - adi,ad5625 + - adi,ad5627 + - adi,ad5665 + - adi,ad5667 + - lltc,ltc2606 + - lltc,ltc2607 + - lltc,ltc2616 + - lltc,ltc2617 + - lltc,ltc2626 + - lltc,ltc2627 + then: + properties: + vref-supply: true + vrefA-supply: false + vrefB-supply: false + vrefC-supply: false + vrefD-supply: false + required: + - vref-supply + - # Shared external vref, internal reference available + if: + properties: + compatible: + contains: + enum: + - adi,ad5625r-1v25 + - adi,ad5625r-2v5 + - adi,ad5627r-1v25 + - adi,ad5627r-2v5 + - adi,ad5628-1 + - adi,ad5628-2 + - adi,ad5629-1 + - adi,ad5629-2 + - adi,ad5629-3 + - adi,ad5645r-1v25 + - adi,ad5645r-2v5 + - adi,ad5647r-1v25 + - adi,ad5647r-2v5 + - adi,ad5648-1 + - adi,ad5648-2 + - adi,ad5665r-1v25 + - adi,ad5665r-2v5 + - adi,ad5666-1 + - adi,ad5666-2 + - adi,ad5667r-1v25 + - adi,ad5667r-2v5 + - adi,ad5668-1 + - adi,ad5668-2 + - adi,ad5668-3 + - adi,ad5669-1 + - adi,ad5669-2 + - adi,ad5669-3 + - lltc,ltc2631-l12 + - lltc,ltc2631-h12 + - lltc,ltc2631-l10 + - lltc,ltc2631-h10 + - lltc,ltc2631-l8 + - lltc,ltc2631-h8 + - lltc,ltc2633-l12 + - lltc,ltc2633-h12 + - lltc,ltc2633-l10 + - lltc,ltc2633-h10 + - lltc,ltc2633-l8 + - lltc,ltc2633-h8 + - lltc,ltc2635-l12 + - lltc,ltc2635-h12 + - lltc,ltc2635-l10 + - lltc,ltc2635-h10 + - lltc,ltc2635-l8 + - lltc,ltc2635-h8 + then: + properties: + vref-supply: true + vrefA-supply: false + vrefB-supply: false + vrefC-supply: false + vrefD-supply: false + - # 4 input devices, separate vrefs, no internal reference + if: + properties: + compatible: + contains: + enum: + - adi,ad5024 + - adi,ad5044 + - adi,ad5064 + - lltc,ltc2609 + - lltc,ltc2619 + - lltc,ltc2629 + then: + properties: + vrefA-supply: true + vrefB-supply: true + vrefC-supply: true + vrefD-supply: true + vref-supply: false + required: + - vrefA-supply + - vrefB-supply + - vrefC-supply + - vrefD-supply + - # 2 input devices, separate vrefs, no internal reference + if: + properties: + compatible: + contains: + enum: + - adi,ad5025 + - adi,ad5045 + - adi,ad5065 + then: + properties: + vrefA-supply: true + vrefB-supply: true + vrefC-supply: false + vrefD-supply: false + vref-supply: false + required: + - vrefA-supply + - vrefB-supply + +examples: + - | + spi { + #address-cells = <1>; + #size-cells = <0>; + dac@0 { + reg = <0>; + compatible = "adi,ad5625"; + vref-supply = <&dac_vref>; + }; + }; + - | + spi { + #address-cells = <1>; + #size-cells = <0>; + dac@0 { + reg = <0>; + compatible = "adi,ad5625r-1v25"; + }; + }; + - | + i2c { + #address-cells = <1>; + #size-cells = <0>; + dac@42 { + reg = <0x42>; + compatible = "adi,ad5024"; + vrefA-supply = <&dac_vref>; + vrefB-supply = <&dac_vref>; + vrefC-supply = <&dac_vref2>; + vrefD-supply = <&dac_vref2>; + }; + }; +... From patchwork Sun Jun 27 16:32:32 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jonathan Cameron X-Patchwork-Id: 12346887 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-19.7 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id BD633C48BC2 for ; Sun, 27 Jun 2021 16:30:41 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id A677961A1D for ; Sun, 27 Jun 2021 16:30:41 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231143AbhF0QdF (ORCPT ); Sun, 27 Jun 2021 12:33:05 -0400 Received: from mail.kernel.org ([198.145.29.99]:45090 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230315AbhF0QdE (ORCPT ); Sun, 27 Jun 2021 12:33:04 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id 6EE1E619F1; Sun, 27 Jun 2021 16:30:38 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1624811440; bh=xRdqalZ8E+dwdFxyZIJWwbxFhbSG/NZbYezfc0DgEyo=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=XGuhtJgsfqZpnG0+HVCziy7hYYy0KP/BcX6f2dU7l/Ws5JkNiqewo3WF5+zGXnfmd 6krv3zOQenfBM/Lnjwsl8X/RCeZ7GDeAZAWP3vRu8ikQyB65DKS2iC1SmsKzu/8/zh r1dkN488m5bGqm0fCyPmtOmS3mJCAyFiGiWbMjucRGlQEGKzQY+mXMDXfhUgGQcvWB XHfMpqKU4qr5mQYv/EHfJXAw1I+ABu4GN1YcwLLMcu4MJcW1bbopiCardDcn5k6QTX EwkaPMR7vXMKFITo0pI64XcCNXQ1y7grC9CU49WOY2cfQsDd83vmb2Fef+qHUcnsra PNp2YCTbSgi/Q== From: Jonathan Cameron To: linux-iio@vger.kernel.org, Rob Herring , devicetree@vger.kernel.org Cc: Jonathan Cameron , Lars-Peter Clausen Subject: [PATCH 03/15] dt-bindings: iio: dac: adi,ad5360: Add missing binding document Date: Sun, 27 Jun 2021 17:32:32 +0100 Message-Id: <20210627163244.1090296-4-jic23@kernel.org> X-Mailer: git-send-email 2.32.0 In-Reply-To: <20210627163244.1090296-1-jic23@kernel.org> References: <20210627163244.1090296-1-jic23@kernel.org> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-iio@vger.kernel.org From: Jonathan Cameron Bindings for the family of many channel DACs. Fairly straight forward with just a differing number of voltage references (an extra one for the 40 channel ad4371) Signed-off-by: Jonathan Cameron Cc: Lars-Peter Clausen Reviewed-by: Rob Herring --- .../bindings/iio/dac/adi,ad5360.yaml | 79 +++++++++++++++++++ 1 file changed, 79 insertions(+) diff --git a/Documentation/devicetree/bindings/iio/dac/adi,ad5360.yaml b/Documentation/devicetree/bindings/iio/dac/adi,ad5360.yaml new file mode 100644 index 000000000000..0d8fb56f4b09 --- /dev/null +++ b/Documentation/devicetree/bindings/iio/dac/adi,ad5360.yaml @@ -0,0 +1,79 @@ +# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause) +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/iio/dac/adi,ad5360.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: Analog Devices AD5360 and similar DACs + +maintainers: + - Lars-Peter Clausen + - Jonathan Cameron + +properties: + compatible: + enum: + - adi,ad5360 + - adi,ad5361 + - adi,ad5363 + - adi,ad5370 + - adi,ad5371 + - adi,ad5372 + - adi,ad5373 + + reg: + maxItems: 1 + + vref0-supply: true + vref1-supply: true + vref2-supply: true + + spi-max-frequency: true + +additionalProperties: false + +required: + - compatible + - reg + - vref0-supply + - vref1-supply + +allOf: + - if: + properties: + compatible: + contains: + enum: + - adi,ad5360 + - adi,ad5361 + - adi,ad5363 + - adi,ad5370 + - adi,ad5372 + - adi,ad5373 + then: + properties: + vref2-supply: false + - if: + properties: + compatible: + contains: + enum: + - adi,ad5371 + then: + required: + - vref2-supply + +examples: + - | + spi { + #address-cells = <1>; + #size-cells = <0>; + dac@0 { + reg = <0>; + compatible = "adi,ad5371"; + vref0-supply = <&dac_vref0>; + vref1-supply = <&dac_vref1>; + vref2-supply = <&dac_vref2>; + }; + }; +... From patchwork Sun Jun 27 16:32:33 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jonathan Cameron X-Patchwork-Id: 12346889 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-19.7 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 5D2E8C48BC2 for ; Sun, 27 Jun 2021 16:30:44 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 49D6C61A2B for ; Sun, 27 Jun 2021 16:30:44 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231211AbhF0QdH (ORCPT ); Sun, 27 Jun 2021 12:33:07 -0400 Received: from mail.kernel.org ([198.145.29.99]:45134 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230315AbhF0QdH (ORCPT ); Sun, 27 Jun 2021 12:33:07 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id 2ECFE61A2D; Sun, 27 Jun 2021 16:30:40 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1624811443; bh=PKZiWZrL67AoGNS72wk1iWGHrdyCelWkrNOmmL2JyZ8=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=dEYmZK9Fs2OXco0U7CS30fOxEzZ8gQwPfJpJFGu/vGS66mJZRDYDSi3YfQ/t9FTK7 Ggudc6Coavof6ZnvSUfCvg7hzW5eE1MedmR5ZLzIU4yOUemHIaSvd0b5+PpUy5VV8D yrJ0thh7cNwOI9S4UnhVCrgMO8Jro4pVHTDAWvPzJcBMseuAiQix4QdrISojo4gqYE uTpferjSBQB95JIVtofIovSkEiMRFy4JUpxdNJ2k1OfVovRXb2Hf61mQVsZH3bGtci GubseYuni+eImItL5Kgggf3c4D1MGojBhCTVpGX+ynj2rH6/AKKADHlC5kJsA2g/aN mSX5Ae5jXSwlg== From: Jonathan Cameron To: linux-iio@vger.kernel.org, Rob Herring , devicetree@vger.kernel.org Cc: Jonathan Cameron , Lars-Peter Clausen Subject: [PATCH 04/15] dt-bindings: iio: dac: ad5380: Add missing binding document Date: Sun, 27 Jun 2021 17:32:33 +0100 Message-Id: <20210627163244.1090296-5-jic23@kernel.org> X-Mailer: git-send-email 2.32.0 In-Reply-To: <20210627163244.1090296-1-jic23@kernel.org> References: <20210627163244.1090296-1-jic23@kernel.org> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-iio@vger.kernel.org From: Jonathan Cameron A simple binding for this particular DAC familly. Signed-off-by: Jonathan Cameron Cc: Lars-Peter Clausen Reviewed-by: Rob Herring --- .../bindings/iio/dac/adi,ad5380.yaml | 70 +++++++++++++++++++ 1 file changed, 70 insertions(+) diff --git a/Documentation/devicetree/bindings/iio/dac/adi,ad5380.yaml b/Documentation/devicetree/bindings/iio/dac/adi,ad5380.yaml new file mode 100644 index 000000000000..d599b418a020 --- /dev/null +++ b/Documentation/devicetree/bindings/iio/dac/adi,ad5380.yaml @@ -0,0 +1,70 @@ +# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause) +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/iio/dac/adi,ad5380.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: Analog Devices AD5380 and similar DACs + +maintainers: + - Lars-Peter Clausen + - Jonathan Cameron + +description: | + DAC devices supporting both SPI and I2C interfaces. +properties: + compatible: + enum: + - adi,ad5380-3 + - adi,ad5380-5 + - adi,ad5381-3 + - adi,ad5381-5 + - adi,ad5382-3 + - adi,ad5382-5 + - adi,ad5383-3 + - adi,ad5383-5 + - adi,ad5384-3 + - adi,ad5384-5 + - adi,ad5390-3 + - adi,ad5390-5 + - adi,ad5391-3 + - adi,ad5391-5 + - adi,ad5392-3 + - adi,ad5392-5 + + reg: + maxItems: 1 + + vref-supply: + description: + If not supplied devices will use internal regulators. + + spi-max-frequency: true + +additionalProperties: false + +required: + - compatible + - reg + +examples: + - | + spi { + #address-cells = <1>; + #size-cells = <0>; + dac@0 { + reg = <0>; + compatible = "adi,ad5390-5"; + vref-supply = <&dacvref>; + }; + }; + - | + i2c { + #address-cells = <1>; + #size-cells = <0>; + dac@42 { + reg = <0x42>; + compatible = "adi,ad5380-3"; + }; + }; +... From patchwork Sun Jun 27 16:32:34 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jonathan Cameron X-Patchwork-Id: 12346891 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-19.7 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 436F1C49EA6 for ; Sun, 27 Jun 2021 16:30:47 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 2C06761A2B for ; Sun, 27 Jun 2021 16:30:47 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231239AbhF0QdK (ORCPT ); Sun, 27 Jun 2021 12:33:10 -0400 Received: from mail.kernel.org ([198.145.29.99]:45186 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231243AbhF0QdK (ORCPT ); Sun, 27 Jun 2021 12:33:10 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id F0534619AD; Sun, 27 Jun 2021 16:30:43 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1624811446; bh=o6mqFqi+WqcWA3TRryRMSDXpaSBg5G6W9BVGpW6lxXU=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=mO0XnykA3KX/4yqBpTuRFrhjNBKZnf7/VAYhTXt5cCTibu+DpvpCm9CajqbZqTPDm ts7TeM1f1Bk67iN1QjDdUZsxLyv4/LKdSrH/RIyqY0aDSHQKQRE4HA3HkbzDIcEEim sghS2iEAsc823g5RDn/9CJUs1o2cKrFByRZmXFDmcolRSCGly1/GvEeOTUvGD/cM8D VmUxCbCGCOxVR4tX7NUmlvAEq3QB/ie/powMO97KZ9og+zf5RebbsFPi0Us+dROIr7 ZmxffHqYWXIHjkCQZoFj5Fh7YdEsqa0v3TU+zYxJijIHImtQx3aV6KHOsPMkeTBYWc 2gEEJ0AUlSrnw== From: Jonathan Cameron To: linux-iio@vger.kernel.org, Rob Herring , devicetree@vger.kernel.org Cc: Jonathan Cameron , Lars-Peter Clausen Subject: [PATCH 05/15] dt-bindings: iio: dac: ad5446: Add missing binding document Date: Sun, 27 Jun 2021 17:32:34 +0100 Message-Id: <20210627163244.1090296-6-jic23@kernel.org> X-Mailer: git-send-email 2.32.0 In-Reply-To: <20210627163244.1090296-1-jic23@kernel.org> References: <20210627163244.1090296-1-jic23@kernel.org> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-iio@vger.kernel.org From: Jonathan Cameron Binding is a little stricter than the Linux driver. It requires vcc-supply to be present for devices that don't have an internal reference, whereas the driver just prints a message and carries on. Given this means that it is impossible to establish a scaling of the output channel, let us make it required in the binding schema. Signed-off-by: Jonathan Cameron Cc: Lars-Peter Clausen --- .../bindings/iio/dac/adi,ad5446.yaml | 105 ++++++++++++++++++ 1 file changed, 105 insertions(+) diff --git a/Documentation/devicetree/bindings/iio/dac/adi,ad5446.yaml b/Documentation/devicetree/bindings/iio/dac/adi,ad5446.yaml new file mode 100644 index 000000000000..e0a0def20c8c --- /dev/null +++ b/Documentation/devicetree/bindings/iio/dac/adi,ad5446.yaml @@ -0,0 +1,105 @@ +# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause) +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/iio/dac/adi,ad5446.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: Single channel DACs similar to the AD5446 + +maintainers: + - Lars-Peter Clausen + - Jonathan Cameron + +properties: + compatible: + oneOf: + - description: I2C devices + enum: + - adi,ad5602 + - adi,ad5612 + - adi,ad5622 + - description: SPI devices + enum: + - adi,ad5300 + - adi,ad5310 + - adi,ad5320 + - adi,ad5444 + - adi,ad5446 + - adi,ad5450 + - adi,ad5451 + - adi,ad5452 + - adi,ad5453 + - adi,ad5512a + - adi,ad5541a + - adi,ad5542a + - adi,ad5543 + - adi,ad5553 + - adi,ad5600 + - adi,ad5601 + - adi,ad5611 + - adi,ad5621 + - adi,ad5641 + - adi,ad5620-2500 + - adi,ad5620-1250 + - adi,ad5640-2500 + - adi,ad5640-1250 + - adi,ad5660-2500 + - adi,ad5660-1250 + - adi,ad5662 + - ti,dac081s101 + - ti,dac101s101 + - ti,dac121s101 + - ti,dac7512 + + reg: + maxItems: 1 + + vcc-supply: true + + spi-max-frequency: true + +additionalProperties: false + +required: + - compatible + - reg + +# Ensure the scaling can be established for devices with no internal reference. +allOf: + - if: + not: + properties: + compatible: + contains: + enum: + - adi,ad5620-2500 + - adi,ad5620-1250 + - adi,ad5640-2500 + - adi,ad5640-1250 + - adi,ad5660-2500 + - adi,ad5660-1250 + then: + required: + - vcc-supply + +examples: + - | + spi { + #address-cells = <1>; + #size-cells = <0>; + dac@0 { + reg = <0>; + compatible = "adi,ad5620-2500"; + }; + }; + - | + i2c { + #address-cells = <1>; + #size-cells = <0>; + dac@42 { + reg = <0x42>; + compatible = "adi,ad5602"; + vcc-supply = <&vcc_dac>; + }; + }; +... From patchwork Sun Jun 27 16:32:35 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jonathan Cameron X-Patchwork-Id: 12346893 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-19.7 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id D15E7C49EA6 for ; Sun, 27 Jun 2021 16:30:49 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id B781A61AC0 for ; Sun, 27 Jun 2021 16:30:49 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231248AbhF0QdN (ORCPT ); Sun, 27 Jun 2021 12:33:13 -0400 Received: from mail.kernel.org ([198.145.29.99]:45240 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230315AbhF0QdM (ORCPT ); Sun, 27 Jun 2021 12:33:12 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id BC246619EE; Sun, 27 Jun 2021 16:30:46 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1624811448; bh=MeXy1XMu9z/PWDSHfoCk/MelsWxU00zLJ3GfFEqxGVg=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=qFWuVKSUbR01xUlr4duKzG7mKAGlSJUfmBEFcXD3B2lEgXps7o7qOZb6DwPcfZo8U bT7ndfJ/WiYXkrJwEibsmNjazzR/0c97gB0D2qCrUHz0fUOXs4hwa+A0mP8Wr51hmr Xi/pgUU+iTkFzm3WHZJ3tsRBxMVLsGFNdSe8UBmOYQX1gVV7LSvCF2vAbKPdTtbiK4 dSpAg71vn/+ANEHWwb0trvKy1k1Eu/fpVPlfw/UHnDgh50UKDsBWe1vZ4t6oVu1sV/ RLCqO3DUYZdNwX5sURKxnkhfkIP6fHROnR9xIFjxavWZQBG9kzPkndwbfjcZvasu+0 ZTVnalWkzTW8g== From: Jonathan Cameron To: linux-iio@vger.kernel.org, Rob Herring , devicetree@vger.kernel.org Cc: Jonathan Cameron , Lars-Peter Clausen Subject: [PATCH 06/15] dt-bindings: iio: dac: ad5449: Add missing binding document. Date: Sun, 27 Jun 2021 17:32:35 +0100 Message-Id: <20210627163244.1090296-7-jic23@kernel.org> X-Mailer: git-send-email 2.32.0 In-Reply-To: <20210627163244.1090296-1-jic23@kernel.org> References: <20210627163244.1090296-1-jic23@kernel.org> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-iio@vger.kernel.org From: Jonathan Cameron Documenting existing binding, so little flexibility available. 2 channel devices that require separate reference voltages. Signed-off-by: Jonathan Cameron Cc: Lars-Peter Clausen Reviewed-by: Rob Herring --- .../bindings/iio/dac/adi,ad5449.yaml | 97 +++++++++++++++++++ 1 file changed, 97 insertions(+) diff --git a/Documentation/devicetree/bindings/iio/dac/adi,ad5449.yaml b/Documentation/devicetree/bindings/iio/dac/adi,ad5449.yaml new file mode 100644 index 000000000000..044332c97743 --- /dev/null +++ b/Documentation/devicetree/bindings/iio/dac/adi,ad5449.yaml @@ -0,0 +1,97 @@ +# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause) +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/iio/dac/adi,ad5449.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: Analog Devices AD5449 and similar DACs + +maintainers: + - Lars-Peter Clausen + - Jonathan Cameron + +description: + Family of multiplying DACs from Analog Devices + +properties: + compatible: + enum: + - adi,ad5415 + - adi,ad5426 + - adi,ad5429 + - adi,ad5432 + - adi,ad5439 + - adi,ad5443 + - adi,ad5449 + + reg: + maxItems: 1 + + spi-max-frequency: true + + VREF-supply: true + VREFA-supply: true + VREFB-supply: true + +additionalProperties: false + +required: + - compatible + - reg + +allOf: + - if: + properties: + compatible: + contains: + enum: + - adi,ad5415 + - adi,ad5426 + - adi,ad5432 + then: + properties: + VREF-supply: true + VREFA-supply: false + VREFB-supply: false + required: + - VREF-supply + - if: + properties: + compatible: + contains: + enum: + - adi,ad5429 + - adi,ad5439 + - adi,ad5449 + then: + properties: + VREF-supply: false + VREFA-supply: true + VREFB-supply: true + required: + - VREFA-supply + - VREFB-supply + +examples: + - | + spi { + #address-cells = <1>; + #size-cells = <0>; + dac@0 { + reg = <0>; + compatible = "adi,ad5415"; + VREF-supply = <&dac_ref>; + }; + }; + - | + spi { + #address-cells = <1>; + #size-cells = <0>; + dac@0 { + reg = <0>; + compatible = "adi,ad5429"; + VREFA-supply = <&dac_refA>; + VREFB-supply = <&dac_refB>; + }; + }; +... From patchwork Sun Jun 27 16:32:36 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jonathan Cameron X-Patchwork-Id: 12346895 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-19.7 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 0C620C48BC2 for ; Sun, 27 Jun 2021 16:30:52 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id E6A34619F1 for ; Sun, 27 Jun 2021 16:30:51 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231243AbhF0QdP (ORCPT ); Sun, 27 Jun 2021 12:33:15 -0400 Received: from mail.kernel.org ([198.145.29.99]:45290 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230315AbhF0QdP (ORCPT ); Sun, 27 Jun 2021 12:33:15 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id 490F661A1D; Sun, 27 Jun 2021 16:30:49 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1624811451; bh=HfMjNfSq0JGtXaPncbMa0LA4Gsa76nqTdhYAm6Yy0nM=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=NPamKmaAGR2E4MSEitB8Yk2nodEmnXBCxyfpEXLF5ESW8VPPj9LJju/92EorE5nns qRcpFztBPj0mFkECQGNBlyVVYJynf1co19LzXDEksEBqSzrqUhE9HSEz8xeo9344sE VQqTT7Fd6F0dVx8ba4iqvY3lAkgP3JgLkq+Hms1yuEKSyjyiTWstRxth1oX1UJalXE iuX3nmTT0qu87fE8xPxr/Qg1s43ysW3/J8zsXMk/inrMhJ+wKKHVgnCwPHUTbZJEcP FZpnu4hiBdhyvxLIGg4/hpp0x/JP4OdQhGbQ03SKeqFGTAGa9AnUEH/sUtXW3AVEsT xJ49mUdgHxwFA== From: Jonathan Cameron To: linux-iio@vger.kernel.org, Rob Herring , devicetree@vger.kernel.org Cc: Jonathan Cameron Subject: [PATCH 07/15] dt-bindings: iio: dac: ad5504: Add missing binding document Date: Sun, 27 Jun 2021 17:32:36 +0100 Message-Id: <20210627163244.1090296-8-jic23@kernel.org> X-Mailer: git-send-email 2.32.0 In-Reply-To: <20210627163244.1090296-1-jic23@kernel.org> References: <20210627163244.1090296-1-jic23@kernel.org> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-iio@vger.kernel.org From: Jonathan Cameron Binding for this high voltage DAC with temperature event signal. Signed-off-by: Jonathan Cameron Reviewed-by: Rob Herring --- .../bindings/iio/dac/adi,ad5504.yaml | 50 +++++++++++++++++++ 1 file changed, 50 insertions(+) diff --git a/Documentation/devicetree/bindings/iio/dac/adi,ad5504.yaml b/Documentation/devicetree/bindings/iio/dac/adi,ad5504.yaml new file mode 100644 index 000000000000..9c2c038683b4 --- /dev/null +++ b/Documentation/devicetree/bindings/iio/dac/adi,ad5504.yaml @@ -0,0 +1,50 @@ +# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause) +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/iio/dac/adi,ad5504.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: Analog Devices AD5501 and AD5504 DACs + +maintainers: + - Lars-Peter Clausen + - Jonathan Cameron + +description: + High voltage (up to 60V) DACs with temperature sensor alarm function + +properties: + compatible: + enum: + - adi,ad5501 + - adi,ad5504 + + reg: + maxItems: 1 + + interrupts: + description: Used for temperature alarm. + maxItems: 1 + + vcc-supply: true + +additionalProperties: false + +required: + - compatible + - reg + +examples: + - | + #include + spi { + #address-cells = <1>; + #size-cells = <0>; + dac@0 { + reg = <0>; + compatible = "adi,ad5504"; + vcc-supply = <&dac_vcc>; + interrupts = <55 IRQ_TYPE_EDGE_FALLING>; + }; + }; +... From patchwork Sun Jun 27 16:32:37 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jonathan Cameron X-Patchwork-Id: 12346897 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-19.7 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id AD52AC48BC2 for ; Sun, 27 Jun 2021 16:30:54 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 95B5161A2D for ; Sun, 27 Jun 2021 16:30:54 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231280AbhF0QdS (ORCPT ); Sun, 27 Jun 2021 12:33:18 -0400 Received: from mail.kernel.org ([198.145.29.99]:45330 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231272AbhF0QdR (ORCPT ); Sun, 27 Jun 2021 12:33:17 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id ED31F61AC0; Sun, 27 Jun 2021 16:30:51 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1624811453; bh=e+5por/x6H1B9nYsnTR4ERVYy05CrPHFtL6c7o+YNK4=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=h/bAUfU3McnwuFfkS+tBojxE/uU5kvGKcYoYkaGTh+4kkdfagVLimG5ZReQRmGfVt DQIckka7uc0dooIqITCWts4Bhpqq/zdh/HGQIK3R5am5u6uhHKp/I16CnRFqcynaMQ vPBtlsTrob+U3usZtxJeORFPT3sM2VQxNFX/E/BLeNZl+JLsn+BbiA4oqmaHtIQLt3 1K1PQ5uUaXabz29gO887A1BKZQ0IxxbfPoRvK9Ef86eaWGuK9Sx1ONAlxMEC4k12ua IdllCrH+gckgxK22ngU+TXJjY8Y1UqEqNBKpxqNMspEoq0w4XWI6PY77k8rncMmbNK UjdcsTRfT/aEg== From: Jonathan Cameron To: linux-iio@vger.kernel.org, Rob Herring , devicetree@vger.kernel.org Cc: Jonathan Cameron Subject: [PATCH 08/15] iio: dac: ad5624r: Fix incorrect handling of an optional regulator. Date: Sun, 27 Jun 2021 17:32:37 +0100 Message-Id: <20210627163244.1090296-9-jic23@kernel.org> X-Mailer: git-send-email 2.32.0 In-Reply-To: <20210627163244.1090296-1-jic23@kernel.org> References: <20210627163244.1090296-1-jic23@kernel.org> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-iio@vger.kernel.org From: Jonathan Cameron The naming of the regulator is problematic. VCC is usually a supply voltage whereas these devices have a separate VREF pin. Secondly, the regulator core might have provided a stub regulator if a real regulator wasn't provided. That would in turn have failed to provide a voltage when queried. So reality was that there was no way to use the internal reference. In order to avoid breaking any dts out in the wild, make sure to fallback to the original vcc naming if vref is not available. Signed-off-by: Jonathan Cameron Reported-by: kernel test robot --- drivers/iio/dac/ad5624r_spi.c | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) diff --git a/drivers/iio/dac/ad5624r_spi.c b/drivers/iio/dac/ad5624r_spi.c index 9bde86982912..b4888c8c14a2 100644 --- a/drivers/iio/dac/ad5624r_spi.c +++ b/drivers/iio/dac/ad5624r_spi.c @@ -229,7 +229,7 @@ static int ad5624r_probe(struct spi_device *spi) if (!indio_dev) return -ENOMEM; st = iio_priv(indio_dev); - st->reg = devm_regulator_get(&spi->dev, "vcc"); + st->reg = devm_regulator_get_optional(&spi->dev, "vref"); if (!IS_ERR(st->reg)) { ret = regulator_enable(st->reg); if (ret) @@ -240,6 +240,22 @@ static int ad5624r_probe(struct spi_device *spi) goto error_disable_reg; voltage_uv = ret; + } else { + if (PTR_ERR(st->reg) != -ENODEV) { + return PTR_ERR(st->reg); + /* Backwards compatibility. This naming is not correct */ + st->reg = devm_regulator_get_optional(&spi->dev, "vcc"); + if (!IS_ERR(st->reg)) { + ret = regulator_enable(st->reg); + if (ret) + return ret; + + ret = regulator_get_voltage(st->reg); + if (ret < 0) + goto error_disable_reg; + + voltage_uv = ret; + } } spi_set_drvdata(spi, indio_dev); From patchwork Sun Jun 27 16:32:38 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jonathan Cameron X-Patchwork-Id: 12346899 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-19.7 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,USER_AGENT_GIT autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 5A3E3C49EA6 for ; Sun, 27 Jun 2021 16:30:57 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 487DD61A2D for ; Sun, 27 Jun 2021 16:30:57 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231272AbhF0QdU (ORCPT ); Sun, 27 Jun 2021 12:33:20 -0400 Received: from mail.kernel.org ([198.145.29.99]:45386 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231288AbhF0QdU (ORCPT ); Sun, 27 Jun 2021 12:33:20 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id 68E3E619F1; Sun, 27 Jun 2021 16:30:54 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1624811456; bh=b5DcIJGaJZtvQooeD30lASG5zHHRlCd4zNzKyFkCOvM=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=dVU8rfx8Pg9990qLiCR9o0isxszadpOKPLrppjE+9Lr6fDL7SH2tLC+URNAytYxfN vDSOfGGb5Ygf+sRjO7EZ7QDrlhu5RQnE47HrHJifJElvaH/lrDdNWCcq4bdvOcH5iw RNTAii/rjBdBck/7drG7lNvznhEZtXI4IDkz3ODu0js+h7JEGGmKXT08DS4T07j/js 1EAjxZIcDcfPP++A9jOxIY5hxgN69OfNO698+5F4DRbMdkN+E3UU7DeiwiQt8rSSwN Ex9uLLGtdJcEVuS1YEj9WQ9ZHqLFvyolep46wXakrsjmLBZHJ+hUq1NnpVP+S6Y5QQ JXFx0taBRl/bQ== From: Jonathan Cameron To: linux-iio@vger.kernel.org, Rob Herring , devicetree@vger.kernel.org Cc: Jonathan Cameron Subject: [PATCH 09/15] dt-bindings: iio: dac: ad5624r: Add missing binding document Date: Sun, 27 Jun 2021 17:32:38 +0100 Message-Id: <20210627163244.1090296-10-jic23@kernel.org> X-Mailer: git-send-email 2.32.0 In-Reply-To: <20210627163244.1090296-1-jic23@kernel.org> References: <20210627163244.1090296-1-jic23@kernel.org> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-iio@vger.kernel.org From: Jonathan Cameron Simple binding, with optional vref. Note that the Linux driver does support vcc-supply for historical reasons, but lets not let that get into any bindings that are checked going forwards. Hence I have deliberately not documented it. Signed-off-by: Jonathan Cameron Reviewed-by: Rob Herring --- .../bindings/iio/dac/adi,ad5624r.yaml | 47 +++++++++++++++++++ 1 file changed, 47 insertions(+) diff --git a/Documentation/devicetree/bindings/iio/dac/adi,ad5624r.yaml b/Documentation/devicetree/bindings/iio/dac/adi,ad5624r.yaml new file mode 100644 index 000000000000..330383b85eeb --- /dev/null +++ b/Documentation/devicetree/bindings/iio/dac/adi,ad5624r.yaml @@ -0,0 +1,47 @@ +# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause) +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/iio/dac/adi,ad5624r.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: Analog Devices AD5624r and similar DACs + +maintainers: + - Jonathan Cameron + +properties: + compatible: + enum: + - adi,ad5624r3 + - adi,ad5644r3 + - adi,ad5664r3 + - adi,ad5624r5 + - adi,ad5644r5 + - adi,ad5664r5 + + reg: + maxItems: 1 + + spi-max-frequency: true + + vref-supply: + description: If not present, internal reference will be used. + +additionalProperties: false + +required: + - compatible + - reg + +examples: + - | + spi { + #address-cells = <1>; + #size-cells = <0>; + dac@0 { + reg = <0>; + compatible = "adi,ad5624r3"; + vref-supply = <&vref>; + }; + }; +... From patchwork Sun Jun 27 16:32:39 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jonathan Cameron X-Patchwork-Id: 12346901 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-19.7 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,USER_AGENT_GIT autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 31FA0C49EA6 for ; Sun, 27 Jun 2021 16:31:04 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 1AAEC61AC0 for ; Sun, 27 Jun 2021 16:31:04 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231348AbhF0QdZ (ORCPT ); Sun, 27 Jun 2021 12:33:25 -0400 Received: from mail.kernel.org ([198.145.29.99]:45432 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231335AbhF0QdW (ORCPT ); Sun, 27 Jun 2021 12:33:22 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id C48A4619AD; Sun, 27 Jun 2021 16:30:56 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1624811458; bh=UEasIvT43WJvGGnmc3s7yO7hCaHy5uC+Ko8xz+oHGhU=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=gt31NFzkm9LTrcXXfac8+XxgNka8wTHLLaS0iVi4Jqcse1OBcWzhPCbkwTqRc4Xeq JSqT008KDG9MBrnYVHAflsCl1es11KLbZzQ5Ku3FyeAx6ENzqzAZT+bWvl2hbh4zEC w+GwPxa45z48ucIq+ItLNG/YXT4VLUZrFtMrk3o2anwaM9NvHJblGXZI/MUJCEp/5i W5XZR/cIRBYpuvKKZBAgczcxWjTI+R/vVh0PSiFXot2nQY7OEmYaoBwIKZplwXxpzn n0O5gS+3ZRXKHmwerbQrasqtNmLHb1c7KrKOHdsl6Ulj0wKUqEk6IQT7fkOsBV0nfu c1mF4GJSGVeZw== From: Jonathan Cameron To: linux-iio@vger.kernel.org, Rob Herring , devicetree@vger.kernel.org Cc: Jonathan Cameron Subject: [PATCH 10/15] dt-bindings: iio: dac: ad5686 and ad5696: Add missing binding document. Date: Sun, 27 Jun 2021 17:32:39 +0100 Message-Id: <20210627163244.1090296-11-jic23@kernel.org> X-Mailer: git-send-email 2.32.0 In-Reply-To: <20210627163244.1090296-1-jic23@kernel.org> References: <20210627163244.1090296-1-jic23@kernel.org> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-iio@vger.kernel.org From: Jonathan Cameron The use of vcc-supply for the reference voltage is unsual and should probably be deprecated as there is an explicit VREF pin on at least some of these parts. Signed-off-by: Jonathan Cameron Reviewed-by: Rob Herring --- .../bindings/iio/dac/adi,ad5686.yaml | 75 +++++++++++++++++++ 1 file changed, 75 insertions(+) diff --git a/Documentation/devicetree/bindings/iio/dac/adi,ad5686.yaml b/Documentation/devicetree/bindings/iio/dac/adi,ad5686.yaml new file mode 100644 index 000000000000..5c26441eae9f --- /dev/null +++ b/Documentation/devicetree/bindings/iio/dac/adi,ad5686.yaml @@ -0,0 +1,75 @@ +# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause) +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/iio/dac/adi,ad5686.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: Analog Devices AD5360 and similar DACs + +maintainers: + - Michael Hennerich + - Jonathan Cameron + +properties: + compatible: + oneOf: + - description: SPI devices + enum: + - adi,ad5310r + - adi,ad5672r + - adi,ad5674r + - adi,ad5676 + - adi,ad5676r + - adi,ad5679r + - adi,ad5681r + - adi,ad5682r + - adi,ad5683 + - adi,ad5683r + - adi,ad5684 + - adi,ad5684r + - adi,ad5685r + - adi,ad5686 + - adi,ad5686r + - description: I2C devices + enum: + - adi,ad5311r + - adi,ad5338r + - adi,ad5671r + - adi,ad5675r + - adi,ad5691r + - adi,ad5692r + - adi,ad5693 + - adi,ad5693r + - adi,ad5694 + - adi,ad5694r + - adi,ad5695r + - adi,ad5696 + - adi,ad5696r + + + reg: + maxItems: 1 + + vcc-supply: + description: If not supplied the internal reference is used. + + spi-max-frequency: true + +additionalProperties: false + +required: + - compatible + - reg + +examples: + - | + spi { + #address-cells = <1>; + #size-cells = <0>; + dac@0 { + reg = <0>; + compatible = "adi,ad5310r"; + vcc-supply = <&dac_vref0>; + }; + }; +... From patchwork Sun Jun 27 16:32:40 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jonathan Cameron X-Patchwork-Id: 12346903 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-19.7 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,USER_AGENT_GIT autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 68136C49EB7 for ; Sun, 27 Jun 2021 16:31:04 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 4363A61A2D for ; Sun, 27 Jun 2021 16:31:04 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231359AbhF0Qd1 (ORCPT ); Sun, 27 Jun 2021 12:33:27 -0400 Received: from mail.kernel.org ([198.145.29.99]:45460 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231294AbhF0QdZ (ORCPT ); Sun, 27 Jun 2021 12:33:25 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id 5971761A2B; Sun, 27 Jun 2021 16:30:59 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1624811461; bh=FRR0xYI09jli8iFHy0b+7kNgcpOOy9LtqHVGcsG5u5Y=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=eQQENEWrbUm2VyPVFwbiV+8UE26vlOGqotR4ZcfnxHRLW7+72fLkA0sWwPuTLXzTY OJJH7x86FsmLd303xue4f5LlP0cfS+lNlnUZPUbn9dcj2hnTwNu92wjWjh6Fcx9Syq cEsft/h4AdKbzaeNHIM5mVThG80j73zQVNx56FL1nHnjRiciMY6Dj7mZPqmN/wmN2V KRVQqN1VD0BxmHIakrdZj8eXE5DoM/xbSGrczhwVgipfxqYxSp2mPWfs/FjhHppLtr Ehm0a37jnSB7Q0cKRxtfVOxiy6YI7R2Cg8/CsdiAoDjHA3t6pSlHBHYnqSaxeJkDUz 3ALxBuXvrifSw== From: Jonathan Cameron To: linux-iio@vger.kernel.org, Rob Herring , devicetree@vger.kernel.org Cc: Jonathan Cameron , Ricardo Ribalda Subject: [PATCH 11/15] dt-bindings: iio: dac: ad5761: Add missing binding doc. Date: Sun, 27 Jun 2021 17:32:40 +0100 Message-Id: <20210627163244.1090296-12-jic23@kernel.org> X-Mailer: git-send-email 2.32.0 In-Reply-To: <20210627163244.1090296-1-jic23@kernel.org> References: <20210627163244.1090296-1-jic23@kernel.org> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-iio@vger.kernel.org From: Jonathan Cameron Straight forward binding with vref optional for those part with internal regulators, but required for those without. Signed-off-by: Jonathan Cameron Cc: Ricardo Ribalda Reviewed-by: Rob Herring Acked-by: Ricardo Ribalda --- .../bindings/iio/dac/adi,ad5761.yaml | 60 +++++++++++++++++++ 1 file changed, 60 insertions(+) diff --git a/Documentation/devicetree/bindings/iio/dac/adi,ad5761.yaml b/Documentation/devicetree/bindings/iio/dac/adi,ad5761.yaml new file mode 100644 index 000000000000..7f95a9ed55fe --- /dev/null +++ b/Documentation/devicetree/bindings/iio/dac/adi,ad5761.yaml @@ -0,0 +1,60 @@ +# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause) +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/iio/dac/adi,ad5761.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: Analog Devices AD5761 and similar DACs + +maintainers: + - Ricardo Ribalda + - Jonathan Cameron + +properties: + + compatible: + enum: + - adi,ad5721 + - adi,ad5721r + - adi,ad5761 + - adi,ad5761r + + reg: + maxItems: 1 + + spi-max-frequency: true + + vref-supply: + description: If not supplied, internal reference will be used. + +additionalProperties: false + +required: + - compatible + - reg + +allOf: + - if: + properties: + compatible: + contains: + enum: + - adi,ad5721 + - adi,ad5761 + then: + required: + - vref-supply + +examples: + - | + spi { + #address-cells = <1>; + #size-cells = <0>; + + dac@0 { + compatible = "adi,ad5721"; + reg = <0>; + vref-supply = <&dac_vref>; + }; + }; +... From patchwork Sun Jun 27 16:32:41 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jonathan Cameron X-Patchwork-Id: 12346905 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-19.7 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 70E8EC49EBA for ; Sun, 27 Jun 2021 16:31:05 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 5C19E61C5C for ; Sun, 27 Jun 2021 16:31:05 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231335AbhF0Qd1 (ORCPT ); Sun, 27 Jun 2021 12:33:27 -0400 Received: from mail.kernel.org ([198.145.29.99]:45492 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231364AbhF0Qd1 (ORCPT ); Sun, 27 Jun 2021 12:33:27 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id D8419619EE; Sun, 27 Jun 2021 16:31:01 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1624811463; bh=e0lfQMQ98H7nPRXlX+QiaZAYOsdTAbkWcxvEJVVK3Tg=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=J+g+ItZm/viYynCwdaonkswGZRcGVmiKp+MVXach+UeodcbX8vbP3JAplEfPthHqG MDloAwKnWPQERq31lo/lcmftAYUIP0oHxNAeX/jzZZE4zgo/CRUwrX6+VAj4HtOLfq 046PC59N6Y3UgRKPq3Eq7SRaicNzBq0AU47SIc4puwLAEaKr2XArqQNngdV+ruBIDd WtnHXqfmQxe6fAV83fmgdg+SYExKVEuVO3HRVf7btyxXd9BopkrBNhNV7JDN3bE4DC B6FWHILYIA9IX5VifHDG7TXBvwBAowtNXgDuE2t3i01BoNZlYDGJwNCu1hG70d+vhK XhQcX00T1FbCA== From: Jonathan Cameron To: linux-iio@vger.kernel.org, Rob Herring , devicetree@vger.kernel.org Cc: Jonathan Cameron , Lars-Peter Clausen Subject: [PATCH 12/15] dt-bindings: iio: dac: adi,ad5764: Add missing binding document Date: Sun, 27 Jun 2021 17:32:41 +0100 Message-Id: <20210627163244.1090296-13-jic23@kernel.org> X-Mailer: git-send-email 2.32.0 In-Reply-To: <20210627163244.1090296-1-jic23@kernel.org> References: <20210627163244.1090296-1-jic23@kernel.org> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-iio@vger.kernel.org From: Jonathan Cameron This binding covers the ad5744, ad5744r, ad5764 and ad5764r DACs. Note that the driver currently assumes the internal reference is used for the r parts. The binding as defined relaxes this constraint. There is no support in the binding or driver for the two digital IO signals. I do not propose to add that until we have a means to test any such binding. Signed-off-by: Jonathan Cameron Cc: Lars-Peter Clausen Reviewed-by: Rob Herring --- .../bindings/iio/dac/adi,ad5764.yaml | 62 +++++++++++++++++++ 1 file changed, 62 insertions(+) diff --git a/Documentation/devicetree/bindings/iio/dac/adi,ad5764.yaml b/Documentation/devicetree/bindings/iio/dac/adi,ad5764.yaml new file mode 100644 index 000000000000..8e893d52bfb1 --- /dev/null +++ b/Documentation/devicetree/bindings/iio/dac/adi,ad5764.yaml @@ -0,0 +1,62 @@ +# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause) +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/iio/dac/adi,ad5764.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: Analog Devices AD5744 and AD5764 DAC families + +maintainers: + - Lars-Peter Clausen + - Jonathan Cameron + +properties: + + compatible: + enum: + - adi,ad5744 + - adi,ad5744r + - adi,ad5764 + - adi,ad5764r + + reg: + maxItems: 1 + + spi-max-frequency: true + + vrefAB-supply: true + vrefCD-supply: true + +additionalProperties: false + +required: + - compatible + - reg + +allOf: + - if: + properties: + compatible: + contains: + enum: + - adi,ad5744 + - adi,ad5764 + then: + required: + - vrefAB-supply + - vrefCD-supply + +examples: + - | + spi { + #address-cells = <1>; + #size-cells = <0>; + + dac@0 { + compatible = "adi,ad5744"; + reg = <0>; + vrefAB-supply = <&dac_vref>; + vrefCD-supply = <&dac_vref>; + }; + }; +... From patchwork Sun Jun 27 16:32:42 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jonathan Cameron X-Patchwork-Id: 12346907 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-19.7 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,USER_AGENT_GIT autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 84728C49EAB for ; Sun, 27 Jun 2021 16:31:06 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 6E76761A1D for ; Sun, 27 Jun 2021 16:31:06 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231352AbhF0Qd3 (ORCPT ); Sun, 27 Jun 2021 12:33:29 -0400 Received: from mail.kernel.org ([198.145.29.99]:45580 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231339AbhF0Qd2 (ORCPT ); Sun, 27 Jun 2021 12:33:28 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id A69D9619AD; Sun, 27 Jun 2021 16:31:03 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1624811464; bh=Ksk17R4D3ghCvdxqXTL/5nJIgq88JtydCqN7MwYh3Ow=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=jSIwj/3ULuFdX1bPE4S+8sOVBGTC60fQK0JQotcbBYVx3sXK3oj/L27ZTUwy/jMVp zWWS0ybl+yXbQdY4VfE6UEIEhaNp+luo/PEabD6UPCxnJVIAU2pfNHJ5sLfVjTc4/i kHRUv0bMoGpM84kHR0J6RSaxk5UL/b8G6IoK9IKZZt4qDssJ9CijyUViQkw4qbGpuk MwSOlES4XlzRaKuVPvb+FTWY2AdqkSR+fJ7vdbtTOwzSo5rCLgpXGQh7ac4D66mzsC G16kfKDgscC9l0pASWjICr1pl9QLN5n27M9mFK47mfa+z/D6dSuxQAHpGTLk8ehrfE ipD7sva2snEHg== From: Jonathan Cameron To: linux-iio@vger.kernel.org, Rob Herring , devicetree@vger.kernel.org Cc: Jonathan Cameron , Michael Hennerich Subject: [PATCH 13/15] dt-bindings: iio: dac: adi,ad5791: Add missing bindings document Date: Sun, 27 Jun 2021 17:32:42 +0100 Message-Id: <20210627163244.1090296-14-jic23@kernel.org> X-Mailer: git-send-email 2.32.0 In-Reply-To: <20210627163244.1090296-1-jic23@kernel.org> References: <20210627163244.1090296-1-jic23@kernel.org> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-iio@vger.kernel.org From: Jonathan Cameron Documenting existing bindings for this device. The Linux driver in theory 'works' without the two supplies that I have listed as required, but without a valid scale. As such I've documented it as required. Signed-off-by: Jonathan Cameron Cc: Michael Hennerich Reviewed-by: Rob Herring --- .../bindings/iio/dac/adi,ad5791.yaml | 52 +++++++++++++++++++ 1 file changed, 52 insertions(+) diff --git a/Documentation/devicetree/bindings/iio/dac/adi,ad5791.yaml b/Documentation/devicetree/bindings/iio/dac/adi,ad5791.yaml new file mode 100644 index 000000000000..650d1ebdcec3 --- /dev/null +++ b/Documentation/devicetree/bindings/iio/dac/adi,ad5791.yaml @@ -0,0 +1,52 @@ +# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause) +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/iio/dac/adi,ad5791.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: Analog Devices AD5791 and similar DACs + +maintainers: + - Michael Hennerich + - Jonathan Cameron + +properties: + + compatible: + enum: + - adi,ad5760 + - adi,ad5780 + - adi,ad5781 + - adi,ad5790 + - adi,ad5791 + + reg: + maxItems: 1 + + spi-max-frequency: true + + vdd-supply: true + vss-supply: true + +additionalProperties: false + +required: + - compatible + - reg + - vdd-supply + - vss-supply + +examples: + - | + spi { + #address-cells = <1>; + #size-cells = <0>; + + dac@0 { + compatible = "adi,ad5791"; + reg = <0>; + vss-supply = <&dac_vss>; + vdd-supply = <&dac_vdd>; + }; + }; +... From patchwork Sun Jun 27 16:32:43 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jonathan Cameron X-Patchwork-Id: 12346909 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-19.7 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,USER_AGENT_GIT autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id EF2BCC48BC2 for ; Sun, 27 Jun 2021 16:31:08 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id DBA40619F1 for ; Sun, 27 Jun 2021 16:31:08 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231378AbhF0Qdc (ORCPT ); Sun, 27 Jun 2021 12:33:32 -0400 Received: from mail.kernel.org ([198.145.29.99]:45644 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231339AbhF0Qda (ORCPT ); Sun, 27 Jun 2021 12:33:30 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id 08F9E61A2D; Sun, 27 Jun 2021 16:31:04 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1624811466; bh=528RYEkDvcb3g+na6HYClWgZj4+rl50+j9vJXJwl+qI=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=G7iiCDkQtad/Oxcko5cJudvr5ysnrHimatwbUuPZqbi3Ed3MUT7Of7WfON/OsQWzU /Z6+AafrHLseOUy0AsRC3Y9SZR/hFZOfg1IJvYVRG4bUFGJxyiWn/LOe9pnh/Dx9v/ hx1cHd49/BDijcrm409oWerfph9swzaO56S8XaPJ9otvdJTnrw0fdM+TJrhxGh/5KC H7ssqrCRlVohAW+TQQq7dRSbaWXLN5xk5ditq/z0Rjh+Kn7MidmfVtZQQMhNQ3cTw1 ctrYHZodV+gZEBEAOLtlLy0bwwKmyhSUgOYZWP7Kb8hSuHGj+sQUiiwsHlyTK/sOMW M9G9+1bRNHF3w== From: Jonathan Cameron To: linux-iio@vger.kernel.org, Rob Herring , devicetree@vger.kernel.org Cc: Jonathan Cameron , Gwenhael Goavec-Merou Subject: [PATCH 14/15] dt-bindings: iio: dac: adi,ad8801: Add missing binding document. Date: Sun, 27 Jun 2021 17:32:43 +0100 Message-Id: <20210627163244.1090296-15-jic23@kernel.org> X-Mailer: git-send-email 2.32.0 In-Reply-To: <20210627163244.1090296-1-jic23@kernel.org> References: <20210627163244.1090296-1-jic23@kernel.org> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-iio@vger.kernel.org From: Jonathan Cameron This device was missing a binding document. Simple binding with the ad8803 requiring two both low and high references whilst the 8801 only has a high reference. Signed-off-by: Jonathan Cameron Cc: Gwenhael Goavec-Merou Reviewed-by: Rob Herring --- .../bindings/iio/dac/adi,ad8801.yaml | 60 +++++++++++++++++++ 1 file changed, 60 insertions(+) diff --git a/Documentation/devicetree/bindings/iio/dac/adi,ad8801.yaml b/Documentation/devicetree/bindings/iio/dac/adi,ad8801.yaml new file mode 100644 index 000000000000..6a3990a8d0ad --- /dev/null +++ b/Documentation/devicetree/bindings/iio/dac/adi,ad8801.yaml @@ -0,0 +1,60 @@ +# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause) +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/iio/dac/adi,ad8801.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: Analog Devices AD8801 and AD8803 DACs + +maintainers: + - Jonathan Cameron + +properties: + + compatible: + enum: + - adi,ad8801 + - adi,ad8803 + + reg: + maxItems: 1 + + spi-max-frequency: true + + vrefh-supply: true + vrefl-supply: true + +additionalProperties: false + +required: + - compatible + - reg + - vrefh-supply + +allOf: + - if: + properties: + compatible: + contains: + const: adi,ad8803 + then: + required: + - vrefl-supply + else: + properties: + vrefl-supply: false + +examples: + - | + spi { + #address-cells = <1>; + #size-cells = <0>; + + dac@0 { + compatible = "adi,ad8803"; + reg = <0>; + vrefl-supply = <&dac_vrefl>; + vrefh-supply = <&dac_vrefh>; + }; + }; +... From patchwork Sun Jun 27 16:32:44 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jonathan Cameron X-Patchwork-Id: 12346911 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-19.7 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,USER_AGENT_GIT autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id C8417C49EAB for ; Sun, 27 Jun 2021 16:31:12 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id B1447619D1 for ; Sun, 27 Jun 2021 16:31:12 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231364AbhF0Qdf (ORCPT ); Sun, 27 Jun 2021 12:33:35 -0400 Received: from mail.kernel.org ([198.145.29.99]:45700 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231350AbhF0Qde (ORCPT ); Sun, 27 Jun 2021 12:33:34 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id 8921F619AD; Sun, 27 Jun 2021 16:31:07 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1624811469; bh=58MyanpF+CguHFikUqTuPVvkHhFLPL6cRoRjkZwfOd4=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=BtFTTEW5llOifaWFZNm4NgmVEXqpcXf2lfSNKsqdKhAxdZCdLXqO7vvawkGRUREiM QMJvnI+/PsYBuMa/bCpA+rZmFTIsTvU8tphI/sPGrTlP1IYXvRFUynsig09JBTSky3 A1kGkjquMWKptFvN+CrPcFgzroZ6NDXuxA/kY8+d2gKJuMZi94njRKnHYzkV6owvyA 3tc8bM35cPviBMuEAXtPn1MsgIS7ZbxwW9LLxkIQSh3baDQrl6MgKjFgWX7bIlzZIh FB03htJ4/vtmZd9K7jCh7Gcbr+XZD3SaaO6M3T/m+wQdWc92Cqftzvj61L7VFO/cBe Qiq7G4PXRjcRg== From: Jonathan Cameron To: linux-iio@vger.kernel.org, Rob Herring , devicetree@vger.kernel.org Cc: Jonathan Cameron , Michael Welling Subject: [PATCH 15/15] dt-bindings: iio: dac: microchip,mcp4922: Add missing binding document Date: Sun, 27 Jun 2021 17:32:44 +0100 Message-Id: <20210627163244.1090296-16-jic23@kernel.org> X-Mailer: git-send-email 2.32.0 In-Reply-To: <20210627163244.1090296-1-jic23@kernel.org> References: <20210627163244.1090296-1-jic23@kernel.org> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-iio@vger.kernel.org From: Jonathan Cameron Simple binding for this family of microchip DACs. Signed-off-by: Jonathan Cameron Cc: Michael Welling Reviewed-by: Rob Herring --- .../bindings/iio/dac/microchip,mcp4922.yaml | 46 +++++++++++++++++++ 1 file changed, 46 insertions(+) diff --git a/Documentation/devicetree/bindings/iio/dac/microchip,mcp4922.yaml b/Documentation/devicetree/bindings/iio/dac/microchip,mcp4922.yaml new file mode 100644 index 000000000000..12a14b3f36cb --- /dev/null +++ b/Documentation/devicetree/bindings/iio/dac/microchip,mcp4922.yaml @@ -0,0 +1,46 @@ +# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause) +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/iio/dac/microchip,mcp4922.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: Microchip MCP4902, MCP4912 and MPC4922 dual output SPI DACs + +maintainers: + - Jonathan Cameron + - Michael Welling + +properties: + compatible: + enum: + - microchip,mcp4902 + - microchip,mcp4912 + - microchip,mcp4922 + + reg: + maxItems: 1 + + spi-max-frequency: true + + vref-supply: true + +additionalProperties: false + +required: + - compatible + - reg + - vref-supply + +examples: + - | + spi { + #address-cells = <1>; + #size-cells = <0>; + + dac@0 { + compatible = "microchip,mcp4912"; + reg = <0>; + vref-supply = <&dac_vref>; + }; + }; +...