From patchwork Sat Sep 5 17:29:55 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jonathan Cameron X-Patchwork-Id: 249167 Delivered-To: patch@linaro.org Received: by 2002:a92:5b9c:0:0:0:0:0 with SMTP id c28csp2420759ilg; Sat, 5 Sep 2020 10:32:51 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyvgib8yh8lkkFWABqdhQS+jVIlVDt3cZb5N7YB9y+1qRSlhRqmARljwyM1Fd3xSCfDH3CG X-Received: by 2002:a17:906:5a83:: with SMTP id l3mr14037730ejq.14.1599327171064; Sat, 05 Sep 2020 10:32:51 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1599327171; cv=none; d=google.com; s=arc-20160816; b=XjZNyjInYdBGtSulu/l1im5rXsRZ40jQ9bRhpvXtI9+pV/1aqv1QrmwkbxCP8b0NHK YEI74Umb3Yr++I1V/NKiKNhaN9pOmjIjJNckgSfRfxd+mRw/OccfLlM/XbJyYUTlk7Tp SGi1YMZ3Nrr7O4oULfJhqQGJZt7LfKQHDfQwZu6yt3p3RnN25z+iksvrsCY3mmL+Cn+S YfhtFMkGv6u4FqxjW84TbbgCOX7yYwlBRkK8CFtThedAjkD2EOkJoGTmSEiHOdD5qKtC /9kbuQzqlch3m2JsA4Uzqelda0400kRwiuUd7Fre3mBkpjCzYA0ZOoYdckgMPWXbIkK8 pfkQ== 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=nKoUx1LkbY4LsBZyXlrVXaRXhRqil2dIVwqnr6BCA9ny0qULa8QD0p5+fqVAizHYsS uEMqcp/z0O8M0C4Z9Z4+1Y5D0fgjgyD5TWZhufXLn6aKRKl9Iq0NBPJ7kgxY8SlZRLxp UkS8pYv6cHwc1mS6TRnIRGQ38n8xvRrEDbPgpluTNb9xzY80TohMxMZlPEVhw8u+8YZ8 i8ajEM1SeL3KOSHT8n6RCt1PXFKAfy2RoZ8dBUjitOFdXB9vfW9X8bVvljQZG5mjukMz SZBeu+uSL6GxYEMniKfpnL6wLcUMXQTJPt3wSsg86vfEl1GrXO1HbC/i4q2g4eZtu9Nt wRGw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=O+z0XvlW; 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.50; Sat, 05 Sep 2020 10:32:51 -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=O+z0XvlW; 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 S1728458AbgIERcp (ORCPT + 6 others); Sat, 5 Sep 2020 13:32:45 -0400 Received: from mail.kernel.org ([198.145.29.99]:60390 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728426AbgIERcn (ORCPT ); Sat, 5 Sep 2020 13:32:43 -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 513512098B; Sat, 5 Sep 2020 17:32:41 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1599327162; bh=XpngdjpF08FQex0xcA2ugQ5BaeqEMiH6ImmMdQcJOM8=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=O+z0XvlWfcptQ4ypMjyQ13xcsk+UvRXXZvMFoPgZiBtecrtRH9ql8NvcX0M593mvS YzPPAGR3K3j/0G5KSMtbrzvuoWGNPASEXPY+zyKH90Xp4vRWDMy3MXIWmirAd12wzL U7MrFh2xlHQ4226rGfeoLz/xag8ag0UEmUMy2xDM= From: Jonathan Cameron To: linux-iio@vger.kernel.org, Rob Herring , devicetree@vger.kernel.org Cc: Jonathan Cameron , Tony Lindgren Subject: [PATCH 11/20] dt-bindings:iio:adc:motorola, cpcap-adc yaml conversion Date: Sat, 5 Sep 2020 18:29:55 +0100 Message-Id: <20200905173004.216081-12-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 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 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>; + }; + }; +...