From patchwork Wed Sep 9 17:59:37 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jonathan Cameron X-Patchwork-Id: 249532 Delivered-To: patch@linaro.org Received: by 2002:a05:6e02:ecf:0:0:0:0 with SMTP id i15csp56714ilk; Wed, 9 Sep 2020 11:05:19 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxGTAbkSiLev1vtMAIcWZB+SEw7STHobhCzSfhfURtVWCw9u//R8aYLi4azgqT3IF0+F6/w X-Received: by 2002:a17:906:b813:: with SMTP id dv19mr4779660ejb.70.1599674719141; Wed, 09 Sep 2020 11:05:19 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1599674719; cv=none; d=google.com; s=arc-20160816; b=lVgJBgmClk61qCvHuBlDMhVF1GGoiztJS0sn3NnNWz5uqRaSW17h1+iah8uGkT9zh0 /jYI6cq8oynk0SIrwQvaV4zfOBJO7bIYOEryQVHtdKsn9cEBKd9pHc9SZa33FErLiIk9 1mnLjc+FMs/KaAMn9QWDTii2EgwuTw6MANnUQJRnLBIpdsT2NjWkCi+UK18WIxO999zf Ee3Ol6EHbZCJ718qjz2CUgzZutTjrc8JOH7ub43Rb0PZktVsJ4flmY/qyWxt1Tf3HxDW ec3yMPfCF7p59axP6BHz5UgIUDARtJsNPRy5vICQWiHX6exvQ9T13rSmtKRMLfIotlWG tVFw== 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=tWEkAC4nF4rzCQcExbX53r/cVmcTi74Lf3aze0P5Sis=; b=uRDQhqMoaX/1kOj568xV0tHnq8jUhx/9/JNTklWhwLUmCJC/VpvsRGjqoYI5TgBtvC 1BzHXNdlnxOFJ+/1RbfiBnQEkm+WiPdJfejtDW1LXqo764f/aV2rxG8M4UeuGKN8hppA FfD2hAvJlw2dsPmwkyY6sYHEpYfivRNqkAiMqHht+EIqp8jLQB7a0zdGz6gED4gDzZUa dDXpVYs6KmfOiq3gmQ6dj4w1nmIp/oTKkNQ3xdAphUKqrI3/hL7gSolfQdDDfuxRqWx2 N2P6mk0cHfgKy2TnrIV009sYEJybCzatPcGZFHO9EH5qSepsc1A56S/TiySEJgpi9DxG Bunw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=bX32jlDn; 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 m3si1923698ejk.485.2020.09.09.11.05.18; Wed, 09 Sep 2020 11:05:19 -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=bX32jlDn; 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 S1727055AbgIISFA (ORCPT + 6 others); Wed, 9 Sep 2020 14:05:00 -0400 Received: from mail.kernel.org ([198.145.29.99]:59390 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730157AbgIISCh (ORCPT ); Wed, 9 Sep 2020 14:02:37 -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 790E9221E7; Wed, 9 Sep 2020 18:02:35 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1599674556; bh=XpngdjpF08FQex0xcA2ugQ5BaeqEMiH6ImmMdQcJOM8=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=bX32jlDnJGbSIFx+F77VwaTpCR0vBhixoRVD/9sud97LmW19PZsXsC/32IRChViFt QIlZZpcFZwz5p1D+0Gh/a6wrfJZR5F+dygZgx/Q+M4ATAaGwuKwNNeFOz7A7GIBCBn b19GhIDWlEOCcL42of0VqorZZ8ldBAlKlG+6ZrY4= From: Jonathan Cameron To: linux-iio@vger.kernel.org Cc: Rob Herring , devicetree@vger.kernel.org, Jonathan Cameron , Tony Lindgren Subject: [PATCH v2 11/20] dt-bindings:iio:adc:motorola, cpcap-adc yaml conversion Date: Wed, 9 Sep 2020 18:59:37 +0100 Message-Id: <20200909175946.395313-12-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 Conversion from txt to yaml. Slightly expanded example to give a bit more context. Description lifted from the original driver commit. Signed-off-by: Jonathan Cameron Cc: Tony Lindgren --- .../devicetree/bindings/iio/adc/cpcap-adc.txt | 17 ------- .../bindings/iio/adc/motorola,cpcap-adc.yaml | 51 +++++++++++++++++++ 2 files changed, 51 insertions(+), 17 deletions(-) -- 2.28.0 Reviewed-by: Rob Herring diff --git a/Documentation/devicetree/bindings/iio/adc/cpcap-adc.txt b/Documentation/devicetree/bindings/iio/adc/cpcap-adc.txt deleted file mode 100644 index ec04008e8f4f..000000000000 --- a/Documentation/devicetree/bindings/iio/adc/cpcap-adc.txt +++ /dev/null @@ -1,17 +0,0 @@ -Motorola CPCAP PMIC ADC binding - -Required properties: -- compatible: Should be "motorola,cpcap-adc" or "motorola,mapphone-cpcap-adc" -- interrupts: The interrupt number for the ADC device -- interrupt-names: Should be "adcdone" -- #io-channel-cells: Number of cells in an IIO specifier - -Example: - -cpcap_adc: adc { - compatible = "motorola,mapphone-cpcap-adc"; - interrupt-parent = <&cpcap>; - interrupts = <8 IRQ_TYPE_NONE>; - interrupt-names = "adcdone"; - #io-channel-cells = <1>; -}; diff --git a/Documentation/devicetree/bindings/iio/adc/motorola,cpcap-adc.yaml b/Documentation/devicetree/bindings/iio/adc/motorola,cpcap-adc.yaml new file mode 100644 index 000000000000..7811c0abd5d0 --- /dev/null +++ b/Documentation/devicetree/bindings/iio/adc/motorola,cpcap-adc.yaml @@ -0,0 +1,51 @@ +# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause) +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/iio/adc/motorola,cpcap-adc.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: Motorola CPCAP PMIC ADC binding + +maintainers: + - Tony Lindgren + +description: + On Motorola phones like droid 4 there is a custom CPCAP PMIC. This PMIC + has ADCs that are used for battery charging and USB PHY VBUS and ID pin + detection. + +properties: + compatible: + enum: + - motorola,cpcap-adc + - motorola,mapphone-cpcap-adc + + interrupts: + maxItems: 1 + + interrupt-names: + const: adcdone + + "#io-channel-cells": + const: 1 + +required: + - compatible + - interrupts + - "#io-channel-cells" + +examples: + - | + #include + pmic { + #address-cells = <1>; + #size-cells = <0>; + adc { + compatible = "motorola,mapphone-cpcap-adc"; + interrupt-parent = <&cpcap>; + interrupts = <8 IRQ_TYPE_NONE>; + interrupt-names = "adcdone"; + #io-channel-cells = <1>; + }; + }; +...