Received: by 2002:a05:6902:102b:0:0:0:0 with SMTP id x11csp1496184ybt; Thu, 9 Jul 2020 08:23:32 -0700 (PDT) X-Google-Smtp-Source: ABdhPJx/JOAVMyjha39xWoW85pU3A4PyB6TX5+GimiZQ19/xS/GKHIqfRGJzy79tkoeM2/hxJzbX X-Received: by 2002:a17:906:2318:: with SMTP id l24mr60285825eja.291.1594308212169; Thu, 09 Jul 2020 08:23:32 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1594308212; cv=none; d=google.com; s=arc-20160816; b=sjjvPvR5d1gOr9lGxFjDmulJJ+CZK+Gu/ZCShVcph2dkJn/GbTWyWTSCURjtD53fW2 AGIp0MBHxEu6WcFl8BALn+AvBYW7pxP0qgCfbKnIEvf1fZ5QNQ/LdpBZNhbxGzR5k/iF WzCdX2W4WMSbgGogitmUqt3M9WatUeLQZYJGyl00Y+9LcEG42VktuD6s8hMjpyhoCvrv QZcSf8IepjSg4f9Ffbr9maGjGtUX0IWK805CVHBQj1WBb8CIclrJ4x2NpXdcr6ky8m6Y 5NadvdFLN8SJyEma70/rWPArs3XPIQyQZptqRYS7SFPoOU2hEKFQdwxuD1OTZcJTdPe5 v5iQ== 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; bh=GdOKYfYxqngF7XiuwZtZBH96/sWDdo9hShw12kisEy4=; b=ljl4a8+Bsd+y4mc64/bPq7Y+iL9xr1V/qJAVI3trRvvRVJHSlyyykq9UuvNOxK3Bpn CXv/j5V3ddAwKy5NW9STo/Tk7Dvwm9qx1WuhzCi76PjigMQ2Skvm7NicQFMr6ZEWDg4D qvW4ck9kJtEboQG4hAqOcFYJ6xH6ReIqBtjKaMsN18MYw2Glu8jp19odgN8/EGTrHnQS 3AUfxnZqhp8Que3jy/tD2DeZxqS8l93oRnOTn9Oid2Ziuqa11DAgNIKH0tMJYuHqyqj3 9E7R5Aj/DLfW8yxaMszr0v8Q5R6y/VtUA2/DEPed6/vSq6DCuuOd/2ldu9EEUC9b61HC csNg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id dn12si2283797ejc.287.2020.07.09.08.23.09; Thu, 09 Jul 2020 08:23:32 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728211AbgGIPWp (ORCPT + 99 others); Thu, 9 Jul 2020 11:22:45 -0400 Received: from relay6-d.mail.gandi.net ([217.70.183.198]:44849 "EHLO relay6-d.mail.gandi.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726852AbgGIPWo (ORCPT ); Thu, 9 Jul 2020 11:22:44 -0400 X-Originating-IP: 195.189.32.242 Received: from pc.localdomain (unknown [195.189.32.242]) (Authenticated sender: contact@artur-rojek.eu) by relay6-d.mail.gandi.net (Postfix) with ESMTPSA id 53BC0C0008; Thu, 9 Jul 2020 15:22:39 +0000 (UTC) From: Artur Rojek To: Dmitry Torokhov , Rob Herring , Mark Rutland , Jonathan Cameron , Paul Cercueil , Andy Shevchenko Cc: Heiko Stuebner , Ezequiel Garcia , devicetree@vger.kernel.org, linux-iio@vger.kernel.org, linux-kernel@vger.kernel.org, Artur Rojek , Rob Herring Subject: [PATCH v8 1/6] dt-bindings: iio/adc: Convert ingenic-adc docs to YAML. Date: Thu, 9 Jul 2020 17:21:55 +0200 Message-Id: <20200709152200.10039-2-contact@artur-rojek.eu> X-Mailer: git-send-email 2.27.0 In-Reply-To: <20200709152200.10039-1-contact@artur-rojek.eu> References: <20200709152200.10039-1-contact@artur-rojek.eu> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Convert the textual documentation of Device Tree bindings for the Ingenic JZ47xx SoCs ADC controller to YAML. The `interrupts` property is now explicitly listed and marked as required. While missing from the previous textual documentation, this property has been used with all the boards which probe this driver. Signed-off-by: Artur Rojek Tested-by: Paul Cercueil Reviewed-by: Rob Herring --- Changes: v6: new patch v7: - specify `maxItems: 1` for single entry properties - get rid of redundant descriptions of said properties v8: no change .../bindings/iio/adc/ingenic,adc.txt | 49 ------------- .../bindings/iio/adc/ingenic,adc.yaml | 71 +++++++++++++++++++ 2 files changed, 71 insertions(+), 49 deletions(-) delete mode 100644 Documentation/devicetree/bindings/iio/adc/ingenic,adc.txt create mode 100644 Documentation/devicetree/bindings/iio/adc/ingenic,adc.yaml diff --git a/Documentation/devicetree/bindings/iio/adc/ingenic,adc.txt b/Documentation/devicetree/bindings/iio/adc/ingenic,adc.txt deleted file mode 100644 index cd9048cf9dcf..000000000000 --- a/Documentation/devicetree/bindings/iio/adc/ingenic,adc.txt +++ /dev/null @@ -1,49 +0,0 @@ -* Ingenic JZ47xx ADC controller IIO bindings - -Required properties: - -- compatible: Should be one of: - * ingenic,jz4725b-adc - * ingenic,jz4740-adc - * ingenic,jz4770-adc -- reg: ADC controller registers location and length. -- clocks: phandle to the SoC's ADC clock. -- clock-names: Must be set to "adc". -- #io-channel-cells: Must be set to <1> to indicate channels are selected - by index. - -ADC clients must use the format described in iio-bindings.txt, giving -a phandle and IIO specifier pair ("io-channels") to the ADC controller. - -Example: - -#include - -adc: adc@10070000 { - compatible = "ingenic,jz4740-adc"; - #io-channel-cells = <1>; - - reg = <0x10070000 0x30>; - - clocks = <&cgu JZ4740_CLK_ADC>; - clock-names = "adc"; - - interrupt-parent = <&intc>; - interrupts = <18>; -}; - -adc-keys { - ... - compatible = "adc-keys"; - io-channels = <&adc INGENIC_ADC_AUX>; - io-channel-names = "buttons"; - ... -}; - -battery { - ... - compatible = "ingenic,jz4740-battery"; - io-channels = <&adc INGENIC_ADC_BATTERY>; - io-channel-names = "battery"; - ... -}; diff --git a/Documentation/devicetree/bindings/iio/adc/ingenic,adc.yaml b/Documentation/devicetree/bindings/iio/adc/ingenic,adc.yaml new file mode 100644 index 000000000000..9f414dbdae86 --- /dev/null +++ b/Documentation/devicetree/bindings/iio/adc/ingenic,adc.yaml @@ -0,0 +1,71 @@ +# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause) +# Copyright 2019-2020 Artur Rojek +%YAML 1.2 +--- +$id: "http://devicetree.org/schemas/iio/adc/ingenic,adc.yaml#" +$schema: "http://devicetree.org/meta-schemas/core.yaml#" + +title: Ingenic JZ47xx ADC controller IIO bindings + +maintainers: + - Artur Rojek + +description: > + Industrial I/O subsystem bindings for ADC controller found in + Ingenic JZ47xx SoCs. + + ADC clients must use the format described in iio-bindings.txt, giving + a phandle and IIO specifier pair ("io-channels") to the ADC controller. + +properties: + compatible: + enum: + - ingenic,jz4725b-adc + - ingenic,jz4740-adc + - ingenic,jz4770-adc + + '#io-channel-cells': + const: 1 + description: + Must be set to <1> to indicate channels are selected by index. + + reg: + maxItems: 1 + + clocks: + maxItems: 1 + + clock-names: + items: + - const: adc + + interrupts: + maxItems: 1 + +required: + - compatible + - '#io-channel-cells' + - reg + - clocks + - clock-names + - interrupts + +additionalProperties: false + +examples: + - | + #include + #include + + adc@10070000 { + compatible = "ingenic,jz4740-adc"; + #io-channel-cells = <1>; + + reg = <0x10070000 0x30>; + + clocks = <&cgu JZ4740_CLK_ADC>; + clock-names = "adc"; + + interrupt-parent = <&intc>; + interrupts = <18>; + }; -- 2.27.0