From patchwork Sat Sep 5 17:29:53 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jonathan Cameron X-Patchwork-Id: 249177 Delivered-To: patch@linaro.org Received: by 2002:a92:5b9c:0:0:0:0:0 with SMTP id c28csp2420945ilg; Sat, 5 Sep 2020 10:33:10 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwFYV6oMMae/8UYUjPtV7YeWu4goT//6heL+W3HthlMy4TSitiAh7D4Ty9YfLm87icQqP8t X-Received: by 2002:aa7:ce15:: with SMTP id d21mr14317490edv.284.1599327190614; Sat, 05 Sep 2020 10:33:10 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1599327190; cv=none; d=google.com; s=arc-20160816; b=GC8Pys8bIiwcz+xlrugBwG0XEp6D/t/J2VMCSFOsoorlBvWgFBEZQVimv5OtaiaiKB 6DK6pOajelFMRjRBU9jUhgp2Pet6MzHPDy9AF5a8vkPr1iHKpuPOuji1iloVcRSmnenV oCTlHUOAW9KSWzgIeMO14SVl2+8nrNLvaU5PQ6z2yMyaR/F7MGf/0NN++TNhhQ0odP4w HcVQHqR2QNkS8g28xGfGvzt4QJcNQg22iXLv8bfjIFrgaUL+19WtW7XMn5gKXT9x6+4Y O5+X1ltnUpVPj9vV4iS34FVfrm55vrkSER9CA/WWDpsblm9ANLF7zk+5nFG0pWToBZu1 Pkkg== 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=voXUIsWH9e+wFezKkZe6pYHmDVA4qWqAtX36IUezENI=; b=dQ+UiT3z2h013iA/FD1wMEOGKnyzv/7SUA44cyRR7g+oXpmNYu7EkzP0yxh5ob+7+K lx55GsmIBADK8PEsbKOcgqY+t3HyQk4kQ1T/6J0zhb6bYygjI+ZLN2YFtG+1OWMpp+pe sZ98hlC7N/IqiljDibER2ifv4EsbS+y2cE1ftYZxRT7MvmFNSMrsQhfJAfqWHt4b8Wuq iny0nznBoP0/FF6ljGC7z+ZP015FyJfrfi3LT11cpf7vi9s4Ptb5wzXxo0XqsK3rRKWH KYYLkfpaYglA56XZUvw/W72vC89JzxKThyCVrtiYBpnlgG3SA86cY2QQ87TFejL7bfh9 5nng== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=ywELv7ss; 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.33.10; Sat, 05 Sep 2020 10:33:10 -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=ywELv7ss; 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 S1728423AbgIERcm (ORCPT + 6 others); Sat, 5 Sep 2020 13:32:42 -0400 Received: from mail.kernel.org ([198.145.29.99]:60288 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728405AbgIERcj (ORCPT ); Sat, 5 Sep 2020 13:32:39 -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 80B4C20C09; Sat, 5 Sep 2020 17:32:38 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1599327159; bh=32NlETNlgjAzx6DtnmnvP+RC6sufGpUZINDy8r4BguE=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=ywELv7ssqtTRdsQoPAtm7tnbt507S+K9Ot3Yi7+RUHIrRZGR4i8iYok1nNOH60zjJ EG1J799+LVTNoWNvy15EN6rXjcaBI1dfGIdW5/vHIJj19QY5DBPo4iSrE4fXBideFj NUzN/r67tgSPhK0GlWIIB+VQskbk3oFm+C41pkXw= From: Jonathan Cameron To: linux-iio@vger.kernel.org, Rob Herring , devicetree@vger.kernel.org Cc: Jonathan Cameron , Joachim Eastwood Subject: [PATCH 09/20] dt-bindings:iio:adc:nxp,lpc1850-adc yaml conversion Date: Sat, 5 Sep 2020 18:29:53 +0100 Message-Id: <20200905173004.216081-10-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 Most of the description in the original doc is effectively boilerplate and does not bring much value so I have not carried it over into the yaml. Added #io-channel-cells to simplify use of channels on this ADC by consumer drivers. Signed-off-by: Jonathan Cameron Cc: Joachim Eastwood --- .../bindings/iio/adc/lpc1850-adc.txt | 20 ------ .../bindings/iio/adc/nxp,lpc1850-adc.yaml | 61 +++++++++++++++++++ 2 files changed, 61 insertions(+), 20 deletions(-) -- 2.28.0 diff --git a/Documentation/devicetree/bindings/iio/adc/lpc1850-adc.txt b/Documentation/devicetree/bindings/iio/adc/lpc1850-adc.txt deleted file mode 100644 index 9ada5abd45fa..000000000000 --- a/Documentation/devicetree/bindings/iio/adc/lpc1850-adc.txt +++ /dev/null @@ -1,20 +0,0 @@ -NXP LPC1850 ADC bindings - -Required properties: -- compatible: Should be "nxp,lpc1850-adc" -- reg: Offset and length of the register set for the ADC device -- interrupts: The interrupt number for the ADC device -- clocks: The root clock of the ADC controller -- vref-supply: The regulator supply ADC reference voltage -- resets: phandle to reset controller and line specifier - -Example: - -adc0: adc@400e3000 { - compatible = "nxp,lpc1850-adc"; - reg = <0x400e3000 0x1000>; - interrupts = <17>; - clocks = <&ccu1 CLK_APB3_ADC0>; - vref-supply = <®_vdda>; - resets = <&rgu 40>; -}; diff --git a/Documentation/devicetree/bindings/iio/adc/nxp,lpc1850-adc.yaml b/Documentation/devicetree/bindings/iio/adc/nxp,lpc1850-adc.yaml new file mode 100644 index 000000000000..6404fb73f8ed --- /dev/null +++ b/Documentation/devicetree/bindings/iio/adc/nxp,lpc1850-adc.yaml @@ -0,0 +1,61 @@ +# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause) +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/iio/adc/nxp,lpc1850-adc.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: NXP LPC1850 ADC bindings + +maintainers: + - Joachim Eastwood + +description: + Supports the ADC found on the LPC1850 SoC. + +properties: + compatible: + const: nxp,lpc1850-adc + + reg: + maxItems: 1 + + interrupts: + maxItems: 1 + + clocks: + maxItems: 1 + + vref-supply: true + + resets: + maxItems: 1 + + "#io-channel-cells": + const: 1 + +required: + - compatible + - reg + - interrupts + - clocks + - vref-supply + - resets + +additionalProperties: false + +examples: + - | + #include + soc { + #address-cells = <1>; + #size-cells = <1>; + adc@400e3000 { + compatible = "nxp,lpc1850-adc"; + reg = <0x400e3000 0x1000>; + interrupts = <17>; + clocks = <&ccu1 CLK_APB3_ADC0>; + vref-supply = <®_vdda>; + resets = <&rgu 40>; + }; + }; +...