Received: by 2002:a05:6a10:9848:0:0:0:0 with SMTP id x8csp353194pxf; Wed, 17 Mar 2021 06:53:52 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzeJlR4tw2N4H5SypvLT8g1hM/mwOTgHPzLO3w0qPoIlMicNFGf5f5BU6KuSOkw5H2S4+F1 X-Received: by 2002:a17:906:9501:: with SMTP id u1mr35803602ejx.324.1615989232655; Wed, 17 Mar 2021 06:53:52 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1615989232; cv=none; d=google.com; s=arc-20160816; b=EUMIuK3XT3clRNqc1FKMsgu5LIeX4giWns25d/iUVoKhaCiDgKGIfOAEZI/+7suAVt 5Zp+zy/NW2PImExesA8DTcYX+ZwgDm4GG9l4bIlQLA0BgoOY7jgNdzf0lK23tPuZHsY9 dVPexEmBAWFKL/zXzliSKAb45V3MSLyJ9qjlLhYLnH6wiyAEL85TdfBOULgfHX/Aaecw WFqqqxu18sT34brwmZ6yt6fW47cwTuLv+1I1cjfoDYqzDwLmUeCR8M0g+JjhqWrhnr56 8f7ZVCABw8mxJDH1Y0DhXAZ/3akkj7Ia8YDQkNBgS4rXdosEzWdo2Dmma5ay2jxuveDA wk1A== 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=Auwf1V6jgYeNYExcH5TjqLrbHdWRX3X3Hp412akdieo=; b=UNSqpGoQquktehLmrU+PZBzzcCzbJN01yZuRHmQWsqtVfM6952Ky76oKcWc4hRvgFi PjtyeEndndgkXVKBDi2z3E7FOnfXboK2RKnkIUDfQmYGXpZUkt6qSdziepqbpVoYFLaA A+V/vmSErneJWYWVGK/bJSsoLwJVNwNzJe9eNVkbpEJ49YEKic8+l1RdZGdldPkMf2yc qPgzFB3B5SDFpDsgR+zQfDrcw7yeeJxKWWmTuHVnA9D3+YI12uK8CUgbYu4c3HvqcCRs vmBn7tz8jnJ05/Ak5W4XsBWYFfTlgrU3PU/ZTInzKgkWdLL2WioFDd16Pi+NsbY/wIEM eUaw== 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 g4si15424428ejp.171.2021.03.17.06.53.29; Wed, 17 Mar 2021 06:53:52 -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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=collabora.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231794AbhCQNu1 (ORCPT + 99 others); Wed, 17 Mar 2021 09:50:27 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:46314 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231478AbhCQNtN (ORCPT ); Wed, 17 Mar 2021 09:49:13 -0400 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 8176DC061763; Wed, 17 Mar 2021 06:49:13 -0700 (PDT) Received: from [127.0.0.1] (localhost [127.0.0.1]) (Authenticated sender: sre) with ESMTPSA id 4E2211F45170 Received: by jupiter.universe (Postfix, from userid 1000) id EB2C4480104; Wed, 17 Mar 2021 14:49:05 +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: [PATCHv2 18/38] dt-bindings: power: supply: n900-battery: Convert to DT schema format Date: Wed, 17 Mar 2021 14:48:44 +0100 Message-Id: <20210317134904.80737-19-sebastian.reichel@collabora.com> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20210317134904.80737-1-sebastian.reichel@collabora.com> References: <20210317134904.80737-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.2