From patchwork Thu Apr 1 14:09:56 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jonathan Cameron X-Patchwork-Id: 413648 Delivered-To: patch@linaro.org Received: by 2002:a02:8562:0:0:0:0:0 with SMTP id g89csp773850jai; Thu, 1 Apr 2021 10:52:56 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxNU/KG4QXYDVv+2etu9geoi2kYTy2o64PFqah52cWmx7QV0GIagnwHx4I9fWAKAWrq+4BB X-Received: by 2002:a17:906:3c46:: with SMTP id i6mr10629150ejg.80.1617299576431; Thu, 01 Apr 2021 10:52:56 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1617299576; cv=none; d=google.com; s=arc-20160816; b=VRgXvmJKpOgFoRHaPCxUP+kMXkfJ8TbXuH+2eq2kHPVY+GHteOnTVwWJ7V7Yw62pvJ GOGBQaqNWtKfwehzPsh3cIn9pJ9AzvVS26skR6qRt6TO58Q/40UAeWb+oH02UfhBooLC lgWXORK7kDooIU6x8ShrmShgG/MFgACFkB4iljjP91W6FdOfTn8MgV/TvD13jnKIA0OW XfdXoxwEN0qGjqhbiIxGKb8YI3gSTJ/KxCyIqzC80aLfOOAKBNKBNX20J/u8Ske92tVC +UfP0I5FHXyo9Qp1Nq783Y3eMmXOrCHe/TzAh+fhjhfKqrYBcL+W+Eit91gLBMsXFiCa 9scw== 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 :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=x09zqYubmSGmjXgLfkgPIJ7XY53ENZZ5AiuJB0Z/HFk=; b=jquBoA8JYjJbdMaoIFIjn1Ga0ARet11jwXX7M3+yR5Phg4URkdiqiS19tOx7LjLdP4 UoyIzoJlIriCebE4xurcDB/ioEUDvd0tA7KpFnAeKyYVNWm6HzoYv0sMCUA+VU4cI97/ PDh1GXSN6SLB+nsWl1bbKSwT1EPppWw7oDiXRq6gTD9hgtr1RWvPiSRMMURFsBcHbomS bQG6tfBaKJGYHHkE4fimcB2zDPiXEeQO4jrBrf1azveGI3a9LcrU0tbuKSHYUKCruMnG T1naOb/7NMTGFUd2sjQe60oc9CArNbfXjsJCLPlQYrnRUCM7kmbzLR/ifaXlqWzG1uHx gPMg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=PZp0eDC+; spf=pass (google.com: domain of devicetree-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=devicetree-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id hp13si4772152ejc.210.2021.04.01.10.52.56; Thu, 01 Apr 2021 10:52:56 -0700 (PDT) Received-SPF: pass (google.com: domain of devicetree-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=PZp0eDC+; spf=pass (google.com: domain of devicetree-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=devicetree-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235050AbhDARwq (ORCPT + 6 others); Thu, 1 Apr 2021 13:52:46 -0400 Received: from mail.kernel.org ([198.145.29.99]:48906 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S237000AbhDARuA (ORCPT ); Thu, 1 Apr 2021 13:50:00 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id D47D46128C; Thu, 1 Apr 2021 14:11:54 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1617286316; bh=BB9hAFKo+2v0Bi2crV5qOykg9CQQiAJV0ZePZMybHXI=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=PZp0eDC+B6J5Y/KoopU3KX0fE2iNUUtyF0cNc2wOdUHbZMMxFsOQH9SvtNqpQj/eH EiPr/Yg/pg1IDouLScxCEOdVFVh2ivVSM764Bng6PUPZkfTBABJ7qJsw+gHj0lYeqz 7cVCSZOBiiXZvFguW2B9oBql2TEd4Skcb9tUYUlw5OSdF0sAnZZmpHbZsTGHVXmkQL 8KcMv1BPCu0za/nZas/m2wLljWjtvMcLu/PDX62f+fc3VaotF0GBthwwYDa7oOfWDh VCJMdecayASnpTD2MUPHGTYXiI2vj2NYUJ5mMfm32lWCmv0c5HOxRc1Uf+qIM51nFp nbcnJ7oHZQkTw== From: Jonathan Cameron To: linux-iio@vger.kernel.org, Rob Herring Cc: devicetree@vger.kernel.org, Jonathan Cameron , Lukas Wunner Subject: [PATCH 2/2] dt-bindings:iio:dac:ti,dac082s085 yaml conversion Date: Thu, 1 Apr 2021 15:09:56 +0100 Message-Id: <20210401140956.224084-3-jic23@kernel.org> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20210401140956.224084-1-jic23@kernel.org> References: <20210401140956.224084-1-jic23@kernel.org> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: devicetree@vger.kernel.org From: Jonathan Cameron Fairly simple conversion with the exception of the XOR between spi-cpha and spi-cpol. Signed-off-by: Jonathan Cameron Cc: Lukas Wunner Link: https://lore.kernel.org/r/20201031134110.724233-17-jic23@kernel.org --- .../bindings/iio/dac/ti,dac082s085.yaml | 72 +++++++++++++++++++ .../bindings/iio/dac/ti-dac082s085.txt | 34 --------- 2 files changed, 72 insertions(+), 34 deletions(-) -- 2.31.1 Reviewed-by: Rob Herring diff --git a/Documentation/devicetree/bindings/iio/dac/ti,dac082s085.yaml b/Documentation/devicetree/bindings/iio/dac/ti,dac082s085.yaml new file mode 100644 index 000000000000..b0157050f1ee --- /dev/null +++ b/Documentation/devicetree/bindings/iio/dac/ti,dac082s085.yaml @@ -0,0 +1,72 @@ +# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause) +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/iio/dac/ti,dac082s085.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: Texas Instruments DAC082s085 and similar DACs + +description: + A family of Texas Instruments 8/10/12-bit 2/4-channel DACs + +maintainers: + - Lukas Wunner + +properties: + compatible: + enum: + - ti,dac082s085 + - ti,dac102s085 + - ti,dac122s085 + - ti,dac084s085 + - ti,dac104s085 + - ti,dac124s085 + + reg: + maxItems: 1 + + spi-cpha: true + spi-cpol: + description: + Must be either spi-cpha, or spi-cpol but not both. + + vref-supply: + description: Needed to provide output scaling. + + spi-max-frequency: true + +required: + - compatible + - reg + - vref-supply + +additionalProperties: false + +oneOf: + - required: + - spi-cpha + - required: + - spi-cpol + +examples: + - | + vref_2v5_reg: regulator-vref { + compatible = "regulator-fixed"; + regulator-name = "2v5"; + regulator-min-microvolt = <2500000>; + regulator-max-microvolt = <2500000>; + regulator-always-on; + }; + spi { + #address-cells = <1>; + #size-cells = <0>; + + dac@0 { + compatible = "ti,dac082s085"; + reg = <0>; + spi-max-frequency = <40000000>; + spi-cpol; + vref-supply = <&vref_2v5_reg>; + }; + }; +... diff --git a/Documentation/devicetree/bindings/iio/dac/ti-dac082s085.txt b/Documentation/devicetree/bindings/iio/dac/ti-dac082s085.txt deleted file mode 100644 index 9cb0e10df704..000000000000 --- a/Documentation/devicetree/bindings/iio/dac/ti-dac082s085.txt +++ /dev/null @@ -1,34 +0,0 @@ -Texas Instruments 8/10/12-bit 2/4-channel DAC driver - -Required properties: - - compatible: Must be one of: - "ti,dac082s085" - "ti,dac102s085" - "ti,dac122s085" - "ti,dac084s085" - "ti,dac104s085" - "ti,dac124s085" - - reg: Chip select number. - - spi-cpha, spi-cpol: SPI mode (0,1) or (1,0) must be used, so specify - either spi-cpha or spi-cpol (but not both). - - vref-supply: Phandle to the external reference voltage supply. - -For other required and optional properties of SPI slave nodes please refer to -../../spi/spi-bus.txt. - -Example: - vref_2v5_reg: regulator-vref { - compatible = "regulator-fixed"; - regulator-name = "2v5"; - regulator-min-microvolt = <2500000>; - regulator-max-microvolt = <2500000>; - regulator-always-on; - }; - - dac@0 { - compatible = "ti,dac082s085"; - reg = <0>; - spi-max-frequency = <40000000>; - spi-cpol; - vref-supply = <&vref_2v5_reg>; - };