Received: by 2002:a25:1985:0:0:0:0:0 with SMTP id 127csp2825743ybz; Sun, 3 May 2020 10:10:51 -0700 (PDT) X-Google-Smtp-Source: APiQypJYZ3bcH61QufWnTsi04uchXIxDxNgSq+BVC8i6qwi0tQC+iuOq6q/9rLWz7MPOj+hhg2IC X-Received: by 2002:a17:906:dc02:: with SMTP id yy2mr11370650ejb.11.1588525851431; Sun, 03 May 2020 10:10:51 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1588525851; cv=none; d=google.com; s=arc-20160816; b=lN8WagL/eITFePVVMQNz4ny15SPo6NKyS9KnBDcL1HwMBNYL5ZWBnJz50Sq/S38Slq XDyLz0bB+PEvgRmHRnKaLp/YGjb8TNTxBwlKiFkzhzwcN4FNy6+uoQKVol/iowAKu8SL FMonfLA6H2o5BAQ3b220+5Sez4LONAKHBBXu+mWhRTwLgo3cCisvHH/dWSD7j9z4Aolv 5G8LzcEw8Crr7JAC0EFyrSXtZDk0aMfQ6Ky2wuk9UMti1Z9fAEJ8r4+qV2NcWMT7bqN0 47fYLXNEfOeF4SXH2pVCp/tnQMgy3wtzWQZaYh61FfcjZI1GmOtaS4FvbjX5Hxiq6T1z M8uA== 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=dxUNnCrTVolzd4AM0ffgNhAUWC8iF/LgRKaBDPm/354=; b=G5FYJgj4J4ONUHXJJNYZRRYLazqJYio56bJVv6WVPuXDGvmizmjCKvc79Q/+tclSm1 zxQ/Y1hOcqOLXITABCf3QwMLC+DCNDSVtJ3DRqvkIdo8lBQnI/yMJNB3zER7N8AiWeKg qefDXdRihrwsD9XAIisSjPk9PhjAstvaLUO3Nnp7UexULPXaOBz9PjYI30ot/YeEyWuf JA7FiuDdzawPrG/ZTSkZb6xUbDsqC0CKtzRUNCXvg5jfeqO/3g8ke0zNWAvSQgtIuhvD X9bJV0q3cOa51pdOdrpkN21k8xKEv80TSGaBw1Lhd8N0Ln8dPxoanwBukrVC3bD1rSGs HAyg== 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 d24si5256588edq.199.2020.05.03.10.10.28; Sun, 03 May 2020 10:10:51 -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 S1728859AbgECRFv (ORCPT + 99 others); Sun, 3 May 2020 13:05:51 -0400 Received: from relay2-d.mail.gandi.net ([217.70.183.194]:58493 "EHLO relay2-d.mail.gandi.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728753AbgECRFu (ORCPT ); Sun, 3 May 2020 13:05:50 -0400 X-Originating-IP: 195.189.32.242 Received: from pc.localdomain (unknown [195.189.32.242]) (Authenticated sender: contact@artur-rojek.eu) by relay2-d.mail.gandi.net (Postfix) with ESMTPSA id 9FC9640007; Sun, 3 May 2020 17:05:44 +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 v6 1/7] dt-bindings: iio/adc: Convert ingenic-adc docs to YAML. Date: Sun, 3 May 2020 19:14:45 +0200 Message-Id: <20200503171451.44034-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 .../bindings/iio/adc/ingenic,adc.txt | 49 ------------ .../bindings/iio/adc/ingenic,adc.yaml | 74 +++++++++++++++++++ 2 files changed, 74 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..e9c46fff840a --- /dev/null +++ b/Documentation/devicetree/bindings/iio/adc/ingenic,adc.yaml @@ -0,0 +1,74 @@ +# 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: + items: + - description: ADC controller registers location and length. + + clocks: + items: + - description: phandle to the SoC's ADC clock. + + clock-names: + items: + - const: adc + + interrupts: + items: + - description: IRQ line for the ADC. + +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