Received: by 2002:a05:6a10:9848:0:0:0:0 with SMTP id x8csp1354741pxf; Fri, 12 Mar 2021 07:46:28 -0800 (PST) X-Google-Smtp-Source: ABdhPJwAbBtvjwwYai0JTn7CQPDE8o6EYMHOlLYH/OgN8jknTsK2BUzeLlYcgV6mhlVoahvfMW4p X-Received: by 2002:a17:906:b015:: with SMTP id v21mr8962065ejy.243.1615563988112; Fri, 12 Mar 2021 07:46:28 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1615563988; cv=none; d=google.com; s=arc-20160816; b=ChQ1tz/Bqu3LJ62QQYi+Cyt/bBqMV7LRL136Z7ymv3c6qEXaK2RDgrM1RnGgdznGyL BCDVELfmgSrZGy8nsba6ZefGWs5Sj/RM9Dzo1fv/p3wR2b9m0uRCRqZ9G3PIyxiihy4Z gQ0unSfHb0H46Tn5wl0hZFjQVEoInGH0k3XhWn40xMtgzqZyT7ptgD8VoAqokZlyXZHU LvzPG41erx+CHM2fdqjyXPNoo+YQZy+5o4Il8BGpRF+rTpwoZ7BpasHdw4zimZpFu4Kd JKy+aceazHsWuvmUmvJ3/V93evxw/SjodzfpGt5m58NxgRigEzc8X35JzJd7uWZiPXuZ 9brA== 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=bQ9xC3olrSoVYzw9tczIiaUF7kuZhFOwZ9KybQls2to=; b=xrNf3ZJHWLX3QhYWGULAPUkhdtcoyJFXJ24izxPPaPXey6+s5j1Wdut6+L777TcN6B O+CrjMG0W0zp5NI8LkPZ6uJVuSRhVvrTQR7TLlMpAuPc9aXFF5XUIOoOfXC3+s3PQlb7 oFP4wP1iwJogMK7luhT1RIOA2+hhGcibr8eyKwYNvU9PHUEw7+nyQsG+1lNpLP7EzN4V Y4yiSYILMqjndyIXlGjCKA0PgB10B5XqyMxvZRQ3W9xiz2MX4DjE9isGkqgqAw1pcV6W T8qWoGfffnMoKSvO8Ma/Sr6gKpasl1BAXiGzZLfbfybcogeSLpQuz6YfEs+xYrkZaqKI rLiA== 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 i17si5449069ejo.365.2021.03.12.07.46.05; Fri, 12 Mar 2021 07:46:28 -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 S233029AbhCLPpA (ORCPT + 99 others); Fri, 12 Mar 2021 10:45:00 -0500 Received: from bhuna.collabora.co.uk ([46.235.227.227]:55618 "EHLO bhuna.collabora.co.uk" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232528AbhCLPoO (ORCPT ); Fri, 12 Mar 2021 10:44:14 -0500 Received: from [127.0.0.1] (localhost [127.0.0.1]) (Authenticated sender: sre) with ESMTPSA id 8FC201F46E98 Received: by jupiter.universe (Postfix, from userid 1000) id 428CE4800E2; 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 Subject: [PATCH 10/38] dt-bindings: power: supply: sbs-charger: Convert to DT schema format Date: Fri, 12 Mar 2021 16:43:29 +0100 Message-Id: <20210312154357.1561730-11-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-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Convert the binding to DT schema format. Signed-off-by: Sebastian Reichel --- .../power/supply/sbs,sbs-charger.yaml | 55 +++++++++++++++++++ .../bindings/power/supply/sbs_sbs-charger.txt | 21 ------- 2 files changed, 55 insertions(+), 21 deletions(-) create mode 100644 Documentation/devicetree/bindings/power/supply/sbs,sbs-charger.yaml delete mode 100644 Documentation/devicetree/bindings/power/supply/sbs_sbs-charger.txt diff --git a/Documentation/devicetree/bindings/power/supply/sbs,sbs-charger.yaml b/Documentation/devicetree/bindings/power/supply/sbs,sbs-charger.yaml new file mode 100644 index 000000000000..cb73ffa4778e --- /dev/null +++ b/Documentation/devicetree/bindings/power/supply/sbs,sbs-charger.yaml @@ -0,0 +1,55 @@ +# SPDX-License-Identifier: GPL-2.0 +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/power/supply/sbs,sbs-charger.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: SBS compliant charger + +maintainers: + - Sebastian Reichel + +description: | + Charger compatible with the smart battery system specifications + +allOf: + - $ref: power-supply.yaml# + +properties: + compatible: + oneOf: + - items: + - enum: + - lltc,ltc4100 + - enum: + - sbs,sbs-charger + - items: + - const: sbs,sbs-charger + + reg: + maxItems: 1 + + interrupts: + maxItems: 1 + +required: + - compatible + - reg + +additionalProperties: false + +examples: + - | + #include + + i2c { + #address-cells = <1>; + #size-cells = <0>; + + charger@9 { + compatible = "lltc,ltc4100", "sbs,sbs-charger"; + reg = <0x9>; + interrupt-parent = <&gpio6>; + interrupts = <7 IRQ_TYPE_LEVEL_LOW>; + }; + }; diff --git a/Documentation/devicetree/bindings/power/supply/sbs_sbs-charger.txt b/Documentation/devicetree/bindings/power/supply/sbs_sbs-charger.txt deleted file mode 100644 index 84e74151eef2..000000000000 --- a/Documentation/devicetree/bindings/power/supply/sbs_sbs-charger.txt +++ /dev/null @@ -1,21 +0,0 @@ -SBS sbs-charger -~~~~~~~~~~ - -Required properties: - - compatible: ",", "sbs,sbs-charger" as fallback. The part - number compatible string might be used in order to take care of vendor - specific registers. - -Optional properties: -- interrupts: Interrupt mapping for GPIO IRQ. Use in conjunction with - "interrupt-parent". If an interrupt is not provided the driver will switch - automatically to polling. - -Example: - - ltc4100@9 { - compatible = "lltc,ltc4100", "sbs,sbs-charger"; - reg = <0x9>; - interrupt-parent = <&gpio6>; - interrupts = <7 IRQ_TYPE_LEVEL_LOW>; - }; -- 2.30.1