Received: by 2002:a25:ca44:0:0:0:0:0 with SMTP id a65csp329269ybg; Sun, 26 Jul 2020 06:01:03 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzhZiSb0uUquMjORbW6mNfqPMSwuHV5H4eN4o3JfYm1FuQaUwrqDlB8okA84KB4Ww42NSLV X-Received: by 2002:a17:906:c7d2:: with SMTP id dc18mr1773436ejb.135.1595768463303; Sun, 26 Jul 2020 06:01:03 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1595768463; cv=none; d=google.com; s=arc-20160816; b=OM38Yqio5tuYWqOcYa5Ve8+tMQf1yiF4IPkyGuNXff3bitkRk9GMe8J9bJGIs8/Zsn 2iW56aFo5O2oLL6gQmNp/aegFPXAbtDPewnAu55plM+boz1gRptdyUMBpGDLzrLCQz/l 6r4N6fkgutxuMeqh2qe+5pFuUX7F6KoLm7neYZNK76tBu9b83uMZKpYexLy0t7r0LoIj IsgUOSsIVysltJJX7E+dmwNVChIIyktOs5eldo1meDw+qFBjigGMU8PTtTNmtLQRWIv7 OeWQX8jXcCbkT5GpXP/wqOh1pQarMWpwU+OwRg/fpbYAyW0FPg4+UcuYqwY+bwuWw/t4 5UTA== 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 :message-id:date:subject:cc:to:from; bh=YJ8Kad418lhLthZ+L5y1jQNDkcD8BTj0nip21hwqxUI=; b=rdtwZa5ZdB1fA+yg2h0FK2HfQs6DEpvqh6BnuqenA0PjXuKeH4t//y5OTWDgKBTC9F ucqbmJbOaYV85QqwQSg5z4nE+E9DWld86fcFvKzaAHbGrxsg7+9wLoyiriapuCvLcKZx 63xY1+fJsCUaDtxpPBB6lD5EojAN0jRHIMa/vm/D3nOo1p2XV8oFOFQkemmdQm+fB8pd OeEqPXJ0q+pJiu+XkHk/un9ABWpGx4Q6K0sbNcY9g2OXjCu8zatuDztWJlBpJ6Z0px7Q Bn0VX9wmQVB5+YIvHGwCX3d6ffmsMqCYow7p1jbLF/NsjqYzSvo2Q/sdKpLmb7bb0+2v tMxw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id k13si1239791ejr.354.2020.07.26.06.00.40; Sun, 26 Jul 2020 06:01:03 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727798AbgGZM6L (ORCPT + 99 others); Sun, 26 Jul 2020 08:58:11 -0400 Received: from relay10.mail.gandi.net ([217.70.178.230]:43051 "EHLO relay10.mail.gandi.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726719AbgGZM6L (ORCPT ); Sun, 26 Jul 2020 08:58:11 -0400 Received: from pc.localdomain (unknown [195.189.32.242]) (Authenticated sender: contact@artur-rojek.eu) by relay10.mail.gandi.net (Postfix) with ESMTPSA id 35ADE240007; Sun, 26 Jul 2020 12:58:07 +0000 (UTC) From: Artur Rojek To: Sebastian Reichel , Rob Herring Cc: Paul Cercueil , linux-pm@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, Artur Rojek Subject: [PATCH] dt-bindings: power: Convert ingenic,battery.txt to YAML Date: Sun, 26 Jul 2020 14:56:05 +0200 Message-Id: <20200726125605.7009-1-contact@artur-rojek.eu> X-Mailer: git-send-email 2.27.0 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Convert the textual documentation of Device Tree bindings for the Ingenic JZ47xx SoCs battery to YAML. Signed-off-by: Artur Rojek --- .../bindings/power/supply/ingenic,battery.txt | 31 --------- .../power/supply/ingenic,battery.yaml | 67 +++++++++++++++++++ 2 files changed, 67 insertions(+), 31 deletions(-) delete mode 100644 Documentation/devicetree/bindings/power/supply/ingenic,battery.txt create mode 100644 Documentation/devicetree/bindings/power/supply/ingenic,battery.yaml diff --git a/Documentation/devicetree/bindings/power/supply/ingenic,battery.txt b/Documentation/devicetree/bindings/power/supply/ingenic,battery.txt deleted file mode 100644 index 66430bf73815..000000000000 --- a/Documentation/devicetree/bindings/power/supply/ingenic,battery.txt +++ /dev/null @@ -1,31 +0,0 @@ -* Ingenic JZ47xx battery bindings - -Required properties: - -- compatible: Must be "ingenic,jz4740-battery". -- io-channels: phandle and IIO specifier pair to the IIO device. - Format described in iio-bindings.txt. -- monitored-battery: phandle to a "simple-battery" compatible node. - -The "monitored-battery" property must be a phandle to a node using the format -described in battery.txt, with the following properties being required: - -- voltage-min-design-microvolt: Drained battery voltage. -- voltage-max-design-microvolt: Fully charged battery voltage. - -Example: - -#include - -simple_battery: battery { - compatible = "simple-battery"; - voltage-min-design-microvolt = <3600000>; - voltage-max-design-microvolt = <4200000>; -}; - -ingenic_battery { - compatible = "ingenic,jz4740-battery"; - io-channels = <&adc INGENIC_ADC_BATTERY>; - io-channel-names = "battery"; - monitored-battery = <&simple_battery>; -}; diff --git a/Documentation/devicetree/bindings/power/supply/ingenic,battery.yaml b/Documentation/devicetree/bindings/power/supply/ingenic,battery.yaml new file mode 100644 index 000000000000..8d36216f6c0e --- /dev/null +++ b/Documentation/devicetree/bindings/power/supply/ingenic,battery.yaml @@ -0,0 +1,67 @@ +# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause) +# Copyright 2019-2020 Artur Rojek +%YAML 1.2 +--- +$id: "http://devicetree.org/schemas/power/supply/ingenic,battery.yaml#" +$schema: "http://devicetree.org/meta-schemas/core.yaml#" + +title: Ingenic JZ47xx battery bindings + +maintainers: + - Artur Rojek + +properties: + compatible: + oneOf: + - enum: + - ingenic,jz4740-battery + - items: + - enum: + - ingenic,jz4725b-battery + - ingenic,jz4770-battery + - const: ingenic,jz4740-battery + + io-channels: + items: + - description: > + phandle and IIO specifier pair to the IIO device. + See Documentation/devicetree/bindings/iio/iio-bindings.txt for more + details. + + io-channel-names: + const: "battery" + + monitored-battery: + items: + - description: > + phandle to a "simple-battery" compatible node. + + This property must be a phandle to a node using the format described + in battery.txt, with the following properties being required: + - voltage-min-design-microvolt: drained battery voltage, + - voltage-max-design-microvolt: fully charged battery voltage. + +required: + - compatible + - io-channels + - io-channel-names + - monitored-battery + +additionalProperties: false + +examples: + - | + #include + + simple_battery: battery { + compatible = "simple-battery"; + voltage-min-design-microvolt = <3600000>; + voltage-max-design-microvolt = <4200000>; + }; + + ingenic-battery { + compatible = "ingenic,jz4740-battery"; + io-channels = <&adc INGENIC_ADC_BATTERY>; + io-channel-names = "battery"; + monitored-battery = <&simple_battery>; + }; -- 2.27.0