Received: by 2002:a25:868d:0:0:0:0:0 with SMTP id z13csp2183085ybk; Sun, 17 May 2020 12:51:07 -0700 (PDT) X-Google-Smtp-Source: ABdhPJy1l3ofxgz1WiyVU34TdvHOfjvMk1t9QRP/ITBo8e7ih1S5+gQpgeUae+jBOo/LO+MKOW9G X-Received: by 2002:a17:906:278e:: with SMTP id j14mr12923915ejc.270.1589745067801; Sun, 17 May 2020 12:51:07 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1589745067; cv=none; d=google.com; s=arc-20160816; b=j3Uvx8a6DAroxFjGRfvSaECp0c4wUBFBpbG2g2EooIN04W0kG4z1eoNQ+U/7utPMel MyrTME1dqG5LwExPtXfVluZFvcv+2Tzp2uwh1kMt4o1CSqPR3d/rCb1dQrI+Oqed4UHq JqwB1j8Mxp8wjelbA8fQV1pl7e3iEzxuEArm4E9CBa3Qe7KvKBZEfdKzdBYPDtmnWGJs dFG58qA7IMR9MpvbYkbPMlbYNJCnzxWD6lKQOtl4Jq1hwY/qzFcFIi8xADdwLS5hWTsg ot3avbiUgq/UOcm0c2mSYv4JrepEwz9MBOfyTizq4tdntNQKs7kUVxqCYmKCBKMBoMWk PovQ== 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 :message-id:date:subject:cc:to:from; bh=ZjqvGP4F4zHreFI1NIAelEJc3KUhy+JMqCvu/QB4b4o=; b=hiprsCPVw1IZPBr/83cmkgXocGwe7+xlI9lAZLPomcr5Eop5rRdUVz0rXaDJUFJgkr hA9KAJNyq0j60p9u3qS88bcIlqnALZuXgJir3/StMBT2L/I9ESLt2sozBTBmsmUbq8Zu KhznxMHraAdsJM6TZysE5wUDBzEHrN/LLY8RipgVSxo3qVJ03XyhbS4XwvOYW9Wdl2W0 uxKcazVFdHM22iBDyXX9XqJfT5/idJj1bqftO1E5bNZH+UMEm6IvowlX1lhZtTz5jhJG AuNxYkpgbWAmfD8xIKJ3CI5qcGJ5NpOBhebxhO6ktPIHL0bRUavpQaHwps2Dl28O19av JRaA== 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 i12si5486676edf.273.2020.05.17.12.50.44; Sun, 17 May 2020 12:51:07 -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 S1726458AbgEQTt2 (ORCPT + 99 others); Sun, 17 May 2020 15:49:28 -0400 Received: from relay8-d.mail.gandi.net ([217.70.183.201]:52015 "EHLO relay8-d.mail.gandi.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726269AbgEQTt1 (ORCPT ); Sun, 17 May 2020 15:49:27 -0400 X-Originating-IP: 195.189.32.242 Received: from pc.localdomain (unknown [195.189.32.242]) (Authenticated sender: contact@artur-rojek.eu) by relay8-d.mail.gandi.net (Postfix) with ESMTPSA id F08B71BF204; Sun, 17 May 2020 19:49:22 +0000 (UTC) From: Artur Rojek To: Dmitry Torokhov , Rob Herring , Mark Rutland , Jonathan Cameron , Paul Cercueil , Andy Shevchenko Cc: Heiko Stuebner , Ezequiel Garcia , linux-input@vger.kernel.org, devicetree@vger.kernel.org, linux-iio@vger.kernel.org, linux-kernel@vger.kernel.org, Artur Rojek Subject: [PATCH v7 1/7] dt-bindings: iio/adc: Convert ingenic-adc docs to YAML. Date: Sun, 17 May 2020 21:48:58 +0200 Message-Id: <20200517194904.34758-1-contact@artur-rojek.eu> X-Mailer: git-send-email 2.26.2 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 --- Changes: v6: new patch v7: - specify `maxItems: 1` for single entry properties - get rid of redundant descriptions of said properties .../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.26.2