Received: by 2002:a05:6a10:9848:0:0:0:0 with SMTP id x8csp1356565pxf; Fri, 12 Mar 2021 07:48:49 -0800 (PST) X-Google-Smtp-Source: ABdhPJw1bcAK2plxlFDkKwN987wWGaIWxmJmL3HSGGojZffFxlTDBOg119hgMZLKtlIJ7U9ct6AA X-Received: by 2002:a17:906:4a19:: with SMTP id w25mr9051664eju.180.1615564129462; Fri, 12 Mar 2021 07:48:49 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1615564129; cv=none; d=google.com; s=arc-20160816; b=ervDM5ZWonvljxFoulAEtjKUOPkrPNppghCZO4O3ZztThyZ6t3lafwv0VfDZpV4Ob1 9Ikp6ju89Kq+Oy5dpHh8iU5Fw0yar94+hN3iCdQHUd+1PjxB6qaO8EODSZoy3S2dkBfG H82mo+0UlGsfz7Nzs9OZAMGSUxBO3Re7DSDgkIe/aZYGUSzf1GEtDn7Om9+yeBocTlJp 1MDDM9rEqGxQH3BuTvdaZOkoUx5RKB4B3j9Gh4Pu+lyTdne+0mAew4BlxnfaVmJKg7YE BG2yphbDhEIvLZ7r/Ywmduewu8EPwVaNWNVD2QifTeSKU0+G1bX23Dhy6qF6ccjWO5Vl ZllQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from; bh=unjfmslyV2zcXNfbAGH9u8M2Nu3rgWKBYAQSFITXMRs=; b=V5vrtBiZ6nXb2GwBYBFPkPtR2qlZ/6EuCZFrfMKlYihmxxFfOPy4WcoT5R5m+yc9sh d/ikOtnJcW3Aela5CckwYoccVvkwoP82qIqRHanNvE2niUni0d9lEJYhsszcoETGiPON 2gCkizLbB6cd5dCxtOGc+1d+ww4nez8n2DzqAPIFdkR/iSqhe2onkkDx2w0KbyGJEdti lamJvh4kXJb1eKoffHSn62q7oKwTETm+4dSkymCb50Xp34sV+7RkYu90FwgMOUMrUOjp Txy/UGuHwurwTMad0xu5Q87zd3Nyr/USYY04K1bkIrSsEACoktT1G90P9Rc3E83meZCx fAyg== 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=collabora.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id l23si4391006ejb.12.2021.03.12.07.48.24; Fri, 12 Mar 2021 07:48:49 -0800 (PST) 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=collabora.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232515AbhCLPpR (ORCPT + 99 others); Fri, 12 Mar 2021 10:45:17 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:47048 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231789AbhCLPoQ (ORCPT ); Fri, 12 Mar 2021 10:44:16 -0500 Received: from bhuna.collabora.co.uk (bhuna.collabora.co.uk [IPv6:2a00:1098:0:82:1000:25:2eeb:e3e3]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 4EE9DC061574; Fri, 12 Mar 2021 07:44:16 -0800 (PST) Received: from [127.0.0.1] (localhost [127.0.0.1]) (Authenticated sender: sre) with ESMTPSA id 3EFA51F46EC2 Received: by jupiter.universe (Postfix, from userid 1000) id 5687D480104; Fri, 12 Mar 2021 16:44:08 +0100 (CET) From: Sebastian Reichel To: Sebastian Reichel , Rob Herring Cc: linux-pm@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, Sebastian Reichel , kernel@collabora.com, =?UTF-8?q?Pali=20Roh=C3=A1r?= Subject: [PATCH 18/38] dt-bindings: power: supply: n900-battery: Convert to DT schema format Date: Fri, 12 Mar 2021 16:43:37 +0100 Message-Id: <20210312154357.1561730-19-sebastian.reichel@collabora.com> X-Mailer: git-send-email 2.30.1 In-Reply-To: <20210312154357.1561730-1-sebastian.reichel@collabora.com> References: <20210312154357.1561730-1-sebastian.reichel@collabora.com> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Convert the binding to DT schema format. Cc: Pali Rohár Signed-off-by: Sebastian Reichel --- .../power/supply/nokia,n900-battery.yaml | 49 +++++++++++++++++++ .../bindings/power/supply/rx51-battery.txt | 25 ---------- 2 files changed, 49 insertions(+), 25 deletions(-) create mode 100644 Documentation/devicetree/bindings/power/supply/nokia,n900-battery.yaml delete mode 100644 Documentation/devicetree/bindings/power/supply/rx51-battery.txt diff --git a/Documentation/devicetree/bindings/power/supply/nokia,n900-battery.yaml b/Documentation/devicetree/bindings/power/supply/nokia,n900-battery.yaml new file mode 100644 index 000000000000..4a1489f2b28d --- /dev/null +++ b/Documentation/devicetree/bindings/power/supply/nokia,n900-battery.yaml @@ -0,0 +1,49 @@ +# SPDX-License-Identifier: GPL-2.0 +%YAML 1.2 +--- +$id: "http://devicetree.org/schemas/power/supply/nokia,n900-battery.yaml#" +$schema: "http://devicetree.org/meta-schemas/core.yaml#" + +title: Nokia N900 battery + +maintainers: + - Pali Rohár + - Sebastian Reichel + +allOf: + - $ref: power-supply.yaml# + +properties: + compatible: + const: nokia,n900-battery + + io-channels: + items: + - description: ADC channel for temperature reading + - description: ADC channel for battery size identification + - description: ADC channel to measure the battery voltage + + io-channel-names: + items: + - const: temp + - const: bsi + - const: vbat + +required: + - compatible + - io-channels + - io-channel-names + +additionalProperties: false + +examples: + - | + battery { + compatible = "nokia,n900-battery"; + io-channels = <&twl4030_madc 0>, + <&twl4030_madc 4>, + <&twl4030_madc 12>; + io-channel-names = "temp", + "bsi", + "vbat"; + }; diff --git a/Documentation/devicetree/bindings/power/supply/rx51-battery.txt b/Documentation/devicetree/bindings/power/supply/rx51-battery.txt deleted file mode 100644 index 90438453db58..000000000000 --- a/Documentation/devicetree/bindings/power/supply/rx51-battery.txt +++ /dev/null @@ -1,25 +0,0 @@ -Binding for Nokia N900 battery - -The Nokia N900 battery status can be read via the TWL4030's A/D converter. - -Required properties: -- compatible: Should contain one of the following: - * "nokia,n900-battery" -- io-channels: Should contain IIO channel specifiers - for each element in io-channel-names. -- io-channel-names: Should contain the following values: - * "temp" - The ADC channel for temperature reading - * "bsi" - The ADC channel for battery size identification - * "vbat" - The ADC channel to measure the battery voltage - -Example from Nokia N900: - -battery: n900-battery { - compatible = "nokia,n900-battery"; - io-channels = <&twl4030_madc 0>, - <&twl4030_madc 4>, - <&twl4030_madc 12>; - io-channel-names = "temp", - "bsi", - "vbat"; -}; -- 2.30.1