From patchwork Sat Oct 31 18:12:34 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jonathan Cameron X-Patchwork-Id: 320093 Delivered-To: patch@linaro.org Received: by 2002:a92:7b12:0:0:0:0:0 with SMTP id w18csp2433959ilc; Sat, 31 Oct 2020 11:14:57 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxuiGVdtKu1f6cEP6nDQx4IG60GdOUPyd0NMgaSPWz2ndW8pma7tCwRJPXnU82EiGal+rqx X-Received: by 2002:a50:c38e:: with SMTP id h14mr9023915edf.174.1604168097541; Sat, 31 Oct 2020 11:14:57 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1604168097; cv=none; d=google.com; s=arc-20160816; b=Fzd2MM6pBPj/1i9QdAK/YWtwLWZESPNSBdenA+cfb20xbH6XIa7+MCQmtjymK5lLf+ ouv3guel2dgRsf1x5dFj28+9GhN5Ml/TaAkStKoYbSoV0cReNkb8iwLsK7dvIprCgIKq 4d9+iy9zuNfxImRFUC3mg0AV9O35wKJ/i/9jnCejJBT+9AUDcvBvqYxBj+vkKc+UpqQg I5vyXMUO3tIIZr4fqMdJee5EDKmu8hIvjZ3SlkDP4z6e3k8i/TJc0/8ZMSZQrnyiUJYN BIoBXLlZ2EbB5l3RrU3Boz3PSON75dubkXlJZrHv4ZaYtPHrlB3gUk75NMXktIzaZNBg OcPA== 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=F8giOxVj8XYbImuKDsQLRDVBRu2g2vQkYYcpoZrac98=; b=meSuEAXKLkUT8zyC3072sQjK1tUp1YQtHA+GsYcExVCSpqZGqVuwif7lOMoHU1YhAf tzHfFD+8uBz8mKSP2JY32Qpg/kiRO2saOvvfxccVEtStZRrWv3mQMC49r0kmTsTRbSO9 e19Ab4aJJviyDM60th6ObAXq+FwZOPhMncNx1f+xgx4jaD8UcrAJFwolVRdXj6nks+Cg CrIgooZNCr8V2SkoPlB+rrvkowzYdH2WoaPPQOhFavoCQNDZfbRq4piY6R3VxjQHgl5f e4/k3qCTxTMKd+SHKdWd/9MVsNM6HlX3Q+YAQm5JtdkIgzSO72JUmUsIpOu8zftSs19H v0CA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=a6sjw362; 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 d26si7178767ejy.425.2020.10.31.11.14.57; Sat, 31 Oct 2020 11:14:57 -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=default header.b=a6sjw362; 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 S1728331AbgJaSO4 (ORCPT + 6 others); Sat, 31 Oct 2020 14:14:56 -0400 Received: from mail.kernel.org ([198.145.29.99]:46120 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728324AbgJaSOz (ORCPT ); Sat, 31 Oct 2020 14:14:55 -0400 Received: from localhost.localdomain (cpc149474-cmbg20-2-0-cust94.5-4.cable.virginm.net [82.4.196.95]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 0A69F206DD; Sat, 31 Oct 2020 18:14:53 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1604168095; bh=r/HMSSHlxN7A44SSKNFurR/Pa6IplZTBID1cSbgL6aM=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=a6sjw362l/vZIfp+FC6Ne5HEZHZPwT4MQ8E17CYl6Re4yyQa2jZXHODvVlX1lf41A 8brfG/NUVllV2DOCpxRWOmdSWAGTNirl6pw4zZaspWdsZa+B7qI71qjKgeXcA7IqLD 8UZGruB/pLiZq0LT/a9gATTAOWf6U6txGEYcliPk= From: Jonathan Cameron To: linux-iio@vger.kernel.org, Rob Herring , devicetree@vger.kernel.org Cc: Jonathan Cameron , Peter Rosin Subject: [PATCH 02/10] dt-bindings:iio:dac:dpot-dac: yaml conversion. Date: Sat, 31 Oct 2020 18:12:34 +0000 Message-Id: <20201031181242.742301-3-jic23@kernel.org> X-Mailer: git-send-email 2.28.0 In-Reply-To: <20201031181242.742301-1-jic23@kernel.org> References: <20201031181242.742301-1-jic23@kernel.org> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: devicetree@vger.kernel.org From: Jonathan Cameron Txt to yaml format conversion. I dropped the example section describing the measurement ADC, as that isn't strictly part of this binding. Uses the new dt-schema/schema/iio/iio-consumer.yaml schema. Signed-off-by: Jonathan Cameron Cc: Peter Rosin --- .../devicetree/bindings/iio/dac/dpot-dac.txt | 41 ------------ .../devicetree/bindings/iio/dac/dpot-dac.yaml | 64 +++++++++++++++++++ 2 files changed, 64 insertions(+), 41 deletions(-) -- 2.28.0 diff --git a/Documentation/devicetree/bindings/iio/dac/dpot-dac.txt b/Documentation/devicetree/bindings/iio/dac/dpot-dac.txt deleted file mode 100644 index fdf47a01bfef..000000000000 --- a/Documentation/devicetree/bindings/iio/dac/dpot-dac.txt +++ /dev/null @@ -1,41 +0,0 @@ -Bindings for DAC emulation using a digital potentiometer - -It is assumed that the dpot is used as a voltage divider between the -current dpot wiper setting and the maximum resistance of the dpot. The -divided voltage is provided by a vref regulator. - - .------. - .-----------. | | - | vref |--' .---. - | regulator |--. | | - '-----------' | | d | - | | p | - | | o | wiper - | | t |<---------+ - | | | - | '---' dac output voltage - | | - '------+------------+ - -Required properties: -- compatible: Should be "dpot-dac" -- vref-supply: The regulator supplying the voltage divider. -- io-channels: Channel node of the dpot to be used for the voltage division. -- io-channel-names: Should be "dpot". - -Example: - - &i2c { - dpot: mcp4651-503@28 { - compatible = "microchip,mcp4651-503"; - reg = <0x28>; - #io-channel-cells = <1>; - }; - }; - - dac { - compatible = "dpot-dac"; - vref-supply = <®_3v3>; - io-channels = <&dpot 0>; - io-channel-names = "dpot"; - }; diff --git a/Documentation/devicetree/bindings/iio/dac/dpot-dac.yaml b/Documentation/devicetree/bindings/iio/dac/dpot-dac.yaml new file mode 100644 index 000000000000..6a7ca8e432d1 --- /dev/null +++ b/Documentation/devicetree/bindings/iio/dac/dpot-dac.yaml @@ -0,0 +1,64 @@ +# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause) +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/iio/dac/dpot-dac.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: DAC emulation using a digital potentiometer + +maintainers: + - Peter Rosin + +description: | + It is assumed that the dpot is used as a voltage divider between the + current dpot wiper setting and the maximum resistance of the dpot. The + divided voltage is provided by a vref regulator. + + .------. + .-----------. | | + | vref |--' .---. + | regulator |--. | | + '-----------' | | d | + | | p | + | | o | wiper + | | t |<---------+ + | | | + | '---' dac output voltage + | | + '------+------------+ + +properties: + compatible: + const: dpot-dac + + vref-supply: + description: Regulator supplying the voltage divider. + + io-channels: + maxItems: 1 + description: | + Channel node of the dpot to be used for the voltage division. + + io-channel-names: + const: dpot + + "#io-channel-cells": + const: 1 + +required: + - compatible + - vref-supply + - io-channels + - io-channel-names + +additionalProperties: false + +examples: + - | + dac { + compatible = "dpot-dac"; + vref-supply = <®_3v3>; + io-channels = <&dpot 0>; + io-channel-names = "dpot"; + }; +...