From patchwork Sat Sep 5 17:29:52 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jonathan Cameron X-Patchwork-Id: 249164 Delivered-To: patch@linaro.org Received: by 2002:a92:5b9c:0:0:0:0:0 with SMTP id c28csp2420694ilg; Sat, 5 Sep 2020 10:32:45 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwFTVBPQHu+IGynLDo1yu5rq26CMUgEmqDk4Fex8O3JX6UvXTy4iLVHb12ot54r3vmyuQuD X-Received: by 2002:aa7:dd11:: with SMTP id i17mr13945466edv.170.1599327165357; Sat, 05 Sep 2020 10:32:45 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1599327165; cv=none; d=google.com; s=arc-20160816; b=kZdcu1HP2dRd6J/0kLkf/Jf98LwH4rqa/IADNUvm1FRiHcvwBtjFzzAI6VU1XDFWD3 +U6sVfRIlsgnJGRw1KfoPVxKBYIUD7LDEQlxtzIExnih4RfwehyJl9ixMD9wCSDyegIG KKqoJqD1bVKieZFCHICTaDqpiQ0SyEkZbss8hkEHCl0hhd2f55ojNJAmEBwtzEkBag3a P/m6GZtJvk2VNsAjYHyqAu60OfrB+lwU3GrPSv5seWla4Hmj0BMicxxNkc0iqE169uhX IqCoghKaP9e8ZjtzEGa/iq03RsYDID57VGejhcHq0ybDhQP+kDNKKlBEBBv+cX8KBqAa HnTw== 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=jGOnjN2Sy5ZrE7VoxBIKMeTr36ZbSVTPRcDaKQVvvoM=; b=Q8uA3hQWwOK1J+T/x5LiZfrQtktPu70mrTsVPZ3wa3F7vRdsDHq9Bj+7mhi5XWaExU 4WX29wU6V2DjaTHEXyZGhuA1lufysAu5snH20rCpSES1DlTAkmM+u2YXeh6sG8c/j30r CL9Vd674Jspy/dNi09sHAMpvFX62hp4vbcx5m897PEe7Mxk+JodsqUtZOJY9CLkiYiMy 6cJdBKNzAd+Dw5QejAvKz7q1j+CL0C6fU3HvRKKVKO0Vac8jk1CnsxeIw812keQGAcNU N7proTUxYIiHKtA8ogUkvVL6oGmL3ZzBKMgRPeivauDHv5G0quJG3yYagIaqmHNAiW+T AKpg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=BFRor7VH; 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 u17si5687486ejk.29.2020.09.05.10.32.45; Sat, 05 Sep 2020 10:32:45 -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=BFRor7VH; 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 S1728442AbgIERcm (ORCPT + 6 others); Sat, 5 Sep 2020 13:32:42 -0400 Received: from mail.kernel.org ([198.145.29.99]:60298 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727875AbgIERci (ORCPT ); Sat, 5 Sep 2020 13:32:38 -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 1373420760; Sat, 5 Sep 2020 17:32:36 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1599327158; bh=yVzMrl68x91g4MIaNHgNpaL4VqCsGXD9sO86U7mJ/wY=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=BFRor7VH2/K61atCVGhCPrdsE7kmjg6CCeB7T1oD4TxG2N/ESCiPfnN6lgCAJKfhv RDd5ou0JPLlJWhl67YlTH+9aEoAluk8vRy/2Q9Z3KJ5/pnGWHjj8lkTojBigBXdNQC xcpz0es0ikJ73hG6b+Z/O7ajeKaQnGB+tqHgHPJ4= From: Jonathan Cameron To: linux-iio@vger.kernel.org, Rob Herring , devicetree@vger.kernel.org Cc: Jonathan Cameron , Tomer Maimon Subject: [PATCH 08/20] dt-bindings:iio:adc:nuvoton, npcm750-adc yaml conversion Date: Sat, 5 Sep 2020 18:29:52 +0100 Message-Id: <20200905173004.216081-9-jic23@kernel.org> X-Mailer: git-send-email 2.28.0 In-Reply-To: <20200905173004.216081-1-jic23@kernel.org> References: <20200905173004.216081-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 Renamed the file to reflect the only compatible. Added #io-channel-cells to make it easier to support consumers of the ADC channels this device provides. Signed-off-by: Jonathan Cameron Cc: Tomer Maimon --- .../bindings/iio/adc/nuvoton,npcm-adc.txt | 26 -------- .../bindings/iio/adc/nuvoton,npcm750-adc.yaml | 64 +++++++++++++++++++ 2 files changed, 64 insertions(+), 26 deletions(-) -- 2.28.0 diff --git a/Documentation/devicetree/bindings/iio/adc/nuvoton,npcm-adc.txt b/Documentation/devicetree/bindings/iio/adc/nuvoton,npcm-adc.txt deleted file mode 100644 index ef8eeec1a997..000000000000 --- a/Documentation/devicetree/bindings/iio/adc/nuvoton,npcm-adc.txt +++ /dev/null @@ -1,26 +0,0 @@ -Nuvoton NPCM Analog to Digital Converter (ADC) - -The NPCM ADC is a 10-bit converter for eight channel inputs. - -Required properties: -- compatible: "nuvoton,npcm750-adc" for the NPCM7XX BMC. -- reg: specifies physical base address and size of the registers. -- interrupts: Contain the ADC interrupt with flags for falling edge. -- resets : phandle to the reset control for this device. - -Optional properties: -- clocks: phandle of ADC reference clock, in case the clock is not - added the ADC will use the default ADC sample rate. -- vref-supply: The regulator supply ADC reference voltage, in case the - vref-supply is not added the ADC will use internal voltage - reference. - -Example: - -adc: adc@f000c000 { - compatible = "nuvoton,npcm750-adc"; - reg = <0xf000c000 0x8>; - interrupts = ; - clocks = <&clk NPCM7XX_CLK_ADC>; - resets = <&rstc NPCM7XX_RESET_IPSRST1 NPCM7XX_RESET_ADC>; -}; diff --git a/Documentation/devicetree/bindings/iio/adc/nuvoton,npcm750-adc.yaml b/Documentation/devicetree/bindings/iio/adc/nuvoton,npcm750-adc.yaml new file mode 100644 index 000000000000..59382e2805d1 --- /dev/null +++ b/Documentation/devicetree/bindings/iio/adc/nuvoton,npcm750-adc.yaml @@ -0,0 +1,64 @@ +# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause) +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/iio/adc/nuvoton,npcm750-adc.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: Nuvoton NPCM BMC Analog to Digital Converter (ADC) + +maintainers: + - Tomer Maimon + +description: + The NPCM ADC is a 10-bit converter for eight channel inputs. + +properties: + compatible: + const: nuvoton,npcm750-adc + + reg: + maxItems: 1 + + interrupts: + maxItems: 1 + description: ADC interrupt, should be set for falling edge. + + resets: + maxItems: 1 + + clocks: + maxItems: 1 + description: If not provided the defulat ADC sample rate will be used. + + vref-supply: + description: If not supplied, the internal voltage reference will be used. + + "#io-channel-cells": + const: 1 + +required: + - compatible + - reg + - interrupts + - resets + +additionalProperties: false + +examples: + - | + #include + #include + #include + #include + soc { + #address-cells = <1>; + #size-cells = <1>; + adc@f000c000 { + compatible = "nuvoton,npcm750-adc"; + reg = <0xf000c000 0x8>; + interrupts = ; + clocks = <&clk NPCM7XX_CLK_ADC>; + resets = <&rstc NPCM7XX_RESET_IPSRST1 NPCM7XX_RESET_ADC>; + }; + }; +...