From patchwork Wed Sep 9 17:59:39 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jonathan Cameron X-Patchwork-Id: 249534 Delivered-To: patch@linaro.org Received: by 2002:a05:6e02:ecf:0:0:0:0 with SMTP id i15csp56955ilk; Wed, 9 Sep 2020 11:05:35 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwIPgKnmoUnfaw/z9nklYuceeILqVzzufYNxTe4O/P1k60728VXbFqJLers6BxvSPgraYdn X-Received: by 2002:a05:6402:1710:: with SMTP id y16mr5560211edu.197.1599674735133; Wed, 09 Sep 2020 11:05:35 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1599674735; cv=none; d=google.com; s=arc-20160816; b=KUFJUWuILNRKDVYC1lc40WOS/gAKwIdF36oNz+wDi/hUfr+pO47mcqvjyjeneBHkCU iUJEg9INSk8pEpEXNsGBE5AKoVEnP0rQ40vSRavbyjRS9FbtqFk2VVhW0k7/RJyBp99k XdCtKYmnXS11IGCE1KSw4RbGNXbzKZTlWcsPm5ksEZnq0J/6EiVakYxAocH+Q9ZmrQ7E wcs70Wj/7IKQ3vSf6AAYJs3H05aeHIjZ5/23Mrp9CA0UhlH/+u9FNi8uinKH9O38SVni F7PQDgdWd3QCNJVuus0xx6B6fKdmsG87HBG4mrnnFuay7rB4Lyeo0wq/9t5y+xwj/1wU CX6g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=gcYNpJLLo9PvsvN3JcCuXzL3TH5wEaYsHWBgYYlG4Yg=; b=eAMs/rrcnMiTkJdzFqjKVZTbCZFeh/5xGjOQh3oOd/Pd562ZzHjhEPgjvt8uDGsZeF gFBV2LeyS5a3VOJ2CjZcYQ0n73PGvPcROxis1Sfrvim9KoJ17HbT+saTZE+dc6jTzuVG s/MG8Gnn+abIHzXf2MVypMqJh7PkFCRbQ8RXe2qopZuz0Jg1se5QUfx/qiiQagFxG7fs fGbW7bRJFO/7qy0Y3inaW5+FCtaBStNm9msbptpee1qK42q1KCGYFD+Zdu2fZXZ8qzKJ QUnVk8di4oB9I6kcfSbOI/Ox7k+/PIBAk2u0SBTrkK7EgP9z8MiKm1C4VJto5JaCJaY2 chQg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=K7D9Ksko; 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 m3si1923698ejk.485.2020.09.09.11.05.34; Wed, 09 Sep 2020 11:05:35 -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=K7D9Ksko; 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 S1728350AbgIISF3 (ORCPT + 6 others); Wed, 9 Sep 2020 14:05:29 -0400 Received: from mail.kernel.org ([198.145.29.99]:59114 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726415AbgIISEa (ORCPT ); Wed, 9 Sep 2020 14:04:30 -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 7357B221E9; Wed, 9 Sep 2020 18:02:38 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1599674559; bh=oR2e7KTlOJXHjrle7xG5qsZ13sayZ38P4sCsd50ANTc=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=K7D9KskoQ97wh+SxXNsEpmOIitbsjirR9HSJnD/9lt2cWTnQntbKyizwzT9k/Khxh dVHJIqYDYcr6vy8DuLtZ9SgBOXAL/0j3IhjeB2EDreRDXRhTlS2eD24umCZr6GSslD Nom6HoXUub8xe3Cp8Z3fwtRWlXhr2DoAfDfWA5LM= From: Jonathan Cameron To: linux-iio@vger.kernel.org Cc: Rob Herring , devicetree@vger.kernel.org, Jonathan Cameron , Phani Movva Subject: [PATCH v2 13/20] dt-bindings:iio:adc:cosmic, 10001-adc yaml conversion Date: Wed, 9 Sep 2020 18:59:39 +0100 Message-Id: <20200909175946.395313-14-jic23@kernel.org> X-Mailer: git-send-email 2.28.0 In-Reply-To: <20200909175946.395313-1-jic23@kernel.org> References: <20200909175946.395313-1-jic23@kernel.org> MIME-Version: 1.0 Sender: devicetree-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: devicetree@vger.kernel.org From: Jonathan Cameron I don't really know much about this one, hence the binding is a simple conversion of what was in the txt file. Signed-off-by: Jonathan Cameron Cc: Phani Movva --- .../bindings/iio/adc/cc10001_adc.txt | 22 ------- .../bindings/iio/adc/cosmic,10001-adc.yaml | 59 +++++++++++++++++++ 2 files changed, 59 insertions(+), 22 deletions(-) -- 2.28.0 Reviewed-by: Rob Herring diff --git a/Documentation/devicetree/bindings/iio/adc/cc10001_adc.txt b/Documentation/devicetree/bindings/iio/adc/cc10001_adc.txt deleted file mode 100644 index 904f76de9055..000000000000 --- a/Documentation/devicetree/bindings/iio/adc/cc10001_adc.txt +++ /dev/null @@ -1,22 +0,0 @@ -* Cosmic Circuits - Analog to Digital Converter (CC-10001-ADC) - -Required properties: - - compatible: Should be "cosmic,10001-adc" - - reg: Should contain adc registers location and length. - - clock-names: Should contain "adc". - - clocks: Should contain a clock specifier for each entry in clock-names - - vref-supply: The regulator supply ADC reference voltage. - -Optional properties: - - adc-reserved-channels: Bitmask of reserved channels, - i.e. channels that cannot be used by the OS. - -Example: -adc: adc@18101600 { - compatible = "cosmic,10001-adc"; - reg = <0x18101600 0x24>; - adc-reserved-channels = <0x2>; - clocks = <&adc_clk>; - clock-names = "adc"; - vref-supply = <®_1v8>; -}; diff --git a/Documentation/devicetree/bindings/iio/adc/cosmic,10001-adc.yaml b/Documentation/devicetree/bindings/iio/adc/cosmic,10001-adc.yaml new file mode 100644 index 000000000000..1c4838d4a547 --- /dev/null +++ b/Documentation/devicetree/bindings/iio/adc/cosmic,10001-adc.yaml @@ -0,0 +1,59 @@ +# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause) +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/iio/adc/cosmic,10001-adc.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: Cosmic Circuits CC-10001 ADC + +maintainers: + - Phani Movva + +description: + Cosmic Circuits 10001 10-bit ADC device. + +properties: + compatible: + const: cosmic,10001-adc + + reg: + maxItems: 1 + + adc-reserved-channels: + $ref: /schemas/types.yaml#/definitions/uint32 + description: + Bitmask of reserved channels, i.e. channels that cannot be + used by the OS. + + clocks: + maxItems: 1 + + clock-names: + const: adc + + vref-supply: true + + "#io-channel-cells": + const: 1 + + +required: + - compatible + - reg + - clocks + - clock-names + - vref-supply + +additionalProperties: false + +examples: + - | + adc@18101600 { + compatible = "cosmic,10001-adc"; + reg = <0x18101600 0x24>; + adc-reserved-channels = <0x2>; + clocks = <&adc_clk>; + clock-names = "adc"; + vref-supply = <®_1v8>; + }; +...