Received: by 2002:a05:6a10:9848:0:0:0:0 with SMTP id x8csp3701435pxf; Mon, 15 Mar 2021 16:39:10 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyNjawRlucPHDoFP13s+x3lYAgEL1uGnS6VG4gkbAk/XL7XZF3xuJOknAWCfVU7EtFN/INM X-Received: by 2002:a17:906:6a06:: with SMTP id o6mr25754470ejr.306.1615851550104; Mon, 15 Mar 2021 16:39:10 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1615851550; cv=none; d=google.com; s=arc-20160816; b=sk8Mbe1SUKiA9hnBu0LgqrMXZ2ILEqp2xHI3FO0h4mxkfMwbQyNMl58P/ODSjpDw63 WLp3DTbaBRNzeQYToySHxOJoYEv8L+zTa59iicpa3UIMJb8rk50Vox+K0zkGpwUxMHYJ Hj98AulDY+tN6XITQqPW8t81aenVrHN4MquCvc6q7mzJFU3s9kCTV93N53viG4qj/p8R lnNowovgE3xc8tLkhsc5dKGDaNzcq5qKkkCt/9yGbb+yjmTOPRkZaBAklez27TU9xSoq xtj9zcWxZGyHyx9emGicRBEQPetv+4OEljuwDb9E5TKfJO08Hoh8EffYImqh6YWISp5P sI2w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version:dkim-signature; bh=p8VYLNIBtrzXFLyXsSSiWsSz80isVWNI1AfEAmy1IVw=; b=h6jxv6MLM2y1sMAmUhswxJd9Ayl/J7jn5UuxMlN4ejM6yWRjmz6fnSSFWxKU+xD9z2 TAD7fwE6DMC1xSIG/ayDVCx/xxHUDSreMggW+F1J8vrEWSwPcfKEAdWSBUMilOHVbjqJ wywBAFvH+2kSK9qCPYRDhTTOIjp15JR3DDuiCWGiEk6fiYtmZnwH/e983iTTqwBzN1+P oaP5/OC0bMOOrSM9xUSrR3FUREV2gHuLgPC+Q0PGuKYP2yVW6WQx7tiyRMjn5+LFzPPO srtsP26MVfjbrISfL7d1QrWS7OZX5aXtBJcPlSRQ7XJjBrOVWmyHkmM0I/BX4KtZsvRw a8gQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=DbkMKoXK; 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=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 l19si13253440ejz.43.2021.03.15.16.38.48; Mon, 15 Mar 2021 16:39:10 -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; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=DbkMKoXK; 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=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231816AbhCOS2L (ORCPT + 99 others); Mon, 15 Mar 2021 14:28:11 -0400 Received: from mail.kernel.org ([198.145.29.99]:52342 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229806AbhCOS1r (ORCPT ); Mon, 15 Mar 2021 14:27:47 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id EEE3F64F42; Mon, 15 Mar 2021 18:27:45 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1615832866; bh=qoYDstJDuKBPusQErDzsKJ7v8otxcmd+GoIi3yjBdvs=; h=References:In-Reply-To:From:Date:Subject:To:Cc:From; b=DbkMKoXKBITh8xp1IDTw5UlEpIGgV3TC9Xt3eDaxf9ytfDqJqotl2s7hcr/e9rSwG O/PltwnQVJXFw3mjbY83DCoF1TtLzlc93Ivgk51slyXBzBuKJt7HT/kq8fdkXpCbMy EgVZfCSGdfMvfF5WoUFMSizIOJ6Z3Ew58eH1ywnpXmYdw/5U7/oewvwId5G+4oW0Bq I3avcRVRfRF75g77uZJRpGQnY0q4K0ENr9aLPIC3unksxUnnKZB4gr4Jrqsh6yeTfv A/3MQd1NGXr7ygmsckhrOrZJGiXW8wim+e1OJKj2If3ZhbCNBR7tm9KF0fCwkuQ4Oy j5DvAkYpAw+/w== Received: by mail-ej1-f41.google.com with SMTP id dx17so67996214ejb.2; Mon, 15 Mar 2021 11:27:45 -0700 (PDT) X-Gm-Message-State: AOAM5310jR4im5n2Da3fx0qeYBy174KtJahtgaOlTNvCVhXwZ8NQ03hn SLoFD/wIfI7jsD2bDXaWTXlCQEnyMaWuRypY+Q== X-Received: by 2002:a17:906:7806:: with SMTP id u6mr4851146ejm.130.1615832864582; Mon, 15 Mar 2021 11:27:44 -0700 (PDT) MIME-Version: 1.0 References: <20210312154357.1561730-1-sebastian.reichel@collabora.com> <20210312154357.1561730-12-sebastian.reichel@collabora.com> In-Reply-To: <20210312154357.1561730-12-sebastian.reichel@collabora.com> From: Rob Herring Date: Mon, 15 Mar 2021 12:27:33 -0600 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH 11/38] dt-bindings: power: supply: sbs-manager: Convert to DT schema format To: Sebastian Reichel Cc: Sebastian Reichel , "open list:THERMAL" , devicetree@vger.kernel.org, "linux-kernel@vger.kernel.org" , Collabora Kernel ML Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Mar 12, 2021 at 8:45 AM Sebastian Reichel wrote: > > Convert the binding to DT schema format. > > Signed-off-by: Sebastian Reichel > --- > .../bindings/power/supply/sbs,sbs-manager.txt | 66 ----------- > .../power/supply/sbs,sbs-manager.yaml | 111 ++++++++++++++++++ > 2 files changed, 111 insertions(+), 66 deletions(-) > delete mode 100644 Documentation/devicetree/bindings/power/supply/sbs,sbs-manager.txt > create mode 100644 Documentation/devicetree/bindings/power/supply/sbs,sbs-manager.yaml > > diff --git a/Documentation/devicetree/bindings/power/supply/sbs,sbs-manager.yaml b/Documentation/devicetree/bindings/power/supply/sbs,sbs-manager.yaml > new file mode 100644 > index 000000000000..592c476d83e6 > --- /dev/null > +++ b/Documentation/devicetree/bindings/power/supply/sbs,sbs-manager.yaml > @@ -0,0 +1,111 @@ > +# SPDX-License-Identifier: GPL-2.0 > +%YAML 1.2 > +--- > +$id: http://devicetree.org/schemas/power/supply/sbs,sbs-manager.yaml# > +$schema: http://devicetree.org/meta-schemas/core.yaml# > + > +title: SBS compliant manger > + > +maintainers: > + - Sebastian Reichel > + > +allOf: > + - $ref: power-supply.yaml# > + > +properties: > + compatible: > + oneOf: > + - items: > + - enum: > + - lltc,ltc1760 > + - enum: > + - sbs,sbs-manager > + - items: > + - const: sbs,sbs-manager > + > + reg: > + const: 0xa > + > + "#address-cells": > + const: 1 > + > + "#size-cells": > + const: 0 > + > + gpio-controller: true > + > + "#gpio-cells": > + const: 2 > + > +required: > + - compatible > + - reg > + > +additionalProperties: false > + > +dependencies: > + '#gpio-cells': [gpio-controller] > + gpio-controller: ['#gpio-cells'] The core schema should capture these dependencies. > + > +patternProperties: > + "^i2c@[1-4]$": > + type: object > + > + allOf: > + - $ref: /schemas/i2c/i2c-controller.yaml# > + > +examples: > + - | > + #include > + #include > + > + i2c { > + #address-cells = <1>; > + #size-cells = <0>; > + > + batman: battery-manager@a { > + compatible = "lltc,ltc1760", "sbs,sbs-manager"; > + reg = <0x0a>; > + #address-cells = <1>; > + #size-cells = <0>; > + > + gpio-controller; > + #gpio-cells = <2>; > + > + i2c@1 { > + #address-cells = <1>; > + #size-cells = <0>; > + reg = <1>; > + > + battery@b { > + compatible = "ti,bq20z65", "sbs,sbs-battery"; > + reg = <0x0b>; > + sbs,battery-detect-gpios = <&batman 1 1>; > + }; > + }; > + > + i2c@2 { > + #address-cells = <1>; > + #size-cells = <0>; > + reg = <2>; > + > + battery@b { > + compatible = "ti,bq20z65", "sbs,sbs-battery"; > + reg = <0x0b>; > + sbs,battery-detect-gpios = <&batman 2 1>; > + }; > + }; > + > + i2c@3 { > + #address-cells = <1>; > + #size-cells = <0>; > + reg = <3>; > + > + battery@b { > + compatible = "ti,bq20z65", "sbs,sbs-battery"; > + reg = <0x0b>; > + sbs,battery-detect-gpios = <&batman 3 1>; > + }; > + }; > + }; > + }; > -- > 2.30.1 >