From patchwork Wed Sep 9 17:59:35 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jonathan Cameron X-Patchwork-Id: 249530 Delivered-To: patch@linaro.org Received: by 2002:a05:6e02:ecf:0:0:0:0 with SMTP id i15csp56442ilk; Wed, 9 Sep 2020 11:04:58 -0700 (PDT) X-Google-Smtp-Source: ABdhPJygqoWc1/P6Y7NgucwiWhnPVPAz+T4e/nODLIn/N7hls5dIwilGXKEoDNEgSVokuP4XrQoS X-Received: by 2002:a05:6402:1110:: with SMTP id u16mr5347995edv.253.1599674698668; Wed, 09 Sep 2020 11:04:58 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1599674698; cv=none; d=google.com; s=arc-20160816; b=MwFipUVccCFdVGVaWez/Zub7FK6uGru4PBRamoWUW7Y3ig5k3csc2p0BNniUSBW8JD 4bVdd+qT77cNqlcOPJahG4iLXjILp1TR5FsCzJYr0MI4zWJK/SsZb1Ciz2d87HDPNlG/ wqOz7BFA87PdF/s3KEQHYayxFENGqgNUSwrqw6RFcxt1m6NxhIZqAQ1B3Hi8D070CpkK Z3X3JT0wpXCGM2tQZbutftcu5cM/rqQOlbxVJ2p7dkw0NSfn6YIKX6KKP50ehhCzujeo Th0Rn4A3d34W1ntGtkfWtZNvYguV5DLrNQscU1Xnu6XX6f1+ZivdmrIS8czO3cGAunNZ g8Dg== 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=InaHgGkcaBOQD1KAX4qeeh9VxIXcHiat/djmAdepQG9weRkEDdFm/KVAEFkSgBKHC9 c5kivlB/ZxjsRkP5dHkLoiF8zeQbssmJ6burXv5suXc2nUprnjLUmwBNsxp013+vGADo CD9Bd9NJwdouwjulUqg76d5f7TlRGl4+3loIGlc6XCQf8NMnYvK34VskvpD9AGLX+d6j QFKANGnSdg78fcTNsf4XW9bicECMTl/txWrr3qjZDnKqET4M5J04haDR2FGn0iZudef7 NrrQLUkYfuYmujOVihGa+mn62/kZV1YdH3hSccimpCQfdhyxeXHwTEnvtOuOMgZOHQhY wEIA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=KRnrnE7c; 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 n12si1886631ejx.468.2020.09.09.11.04.58; Wed, 09 Sep 2020 11:04:58 -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=KRnrnE7c; 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 S1729824AbgIISEy (ORCPT + 6 others); Wed, 9 Sep 2020 14:04:54 -0400 Received: from mail.kernel.org ([198.145.29.99]:59356 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730154AbgIISCe (ORCPT ); Wed, 9 Sep 2020 14:02:34 -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 73CD3221E5; Wed, 9 Sep 2020 18:02:32 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1599674553; bh=32NlETNlgjAzx6DtnmnvP+RC6sufGpUZINDy8r4BguE=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=KRnrnE7cUb7c++rgCOkITTPpXd8gpk6o7WtRG2aJ5VLTdBCRWThfAbLm2ckBAeVuF SsGwnmtIk9Vbob3ISwr8R44zPjKxrUzUNUV4KfZs/sItX62aDO2Q1cTjQ+cVXy5unp Va2VSYYsJqPE/3NwZmqDlSCcClnvfnaJWnia3d1Q= From: Jonathan Cameron To: linux-iio@vger.kernel.org Cc: Rob Herring , devicetree@vger.kernel.org, Jonathan Cameron , Joachim Eastwood Subject: [PATCH v2 09/20] dt-bindings:iio:adc:nxp, lpc1850-adc yaml conversion Date: Wed, 9 Sep 2020 18:59:35 +0100 Message-Id: <20200909175946.395313-10-jic23@kernel.org> X-Mailer: git-send-email 2.28.0 In-Reply-To: <20200909175946.395313-1-jic23@kernel.org> References: <20200909175946.395313-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 Reviewed-by: Rob Herring 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>; + }; + }; +...