Received: by 2002:a05:6a10:9848:0:0:0:0 with SMTP id x8csp3703119pxf; Mon, 15 Mar 2021 16:42:53 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyVoCj+Ar79B7guVRCtTSZdn8Bb5TmDLXewzEHh+zdcrG8T3exMXHSIGtWJyTlyVI5MqWH0 X-Received: by 2002:a17:906:bd2:: with SMTP id y18mr26557113ejg.482.1615851773694; Mon, 15 Mar 2021 16:42:53 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1615851773; cv=none; d=google.com; s=arc-20160816; b=ucTPSA7dtmMEoytG/s8EWhTowp6KaZlsDLo8oFqeBkwg08fatcNREG+SQ8LzaSzR5g U27g1DgPO6mokB/rJi+jqHSUkERixJo34blYDGgA1ZUvgjY+Rf80aIdTFgVqfGZrHZmp Y7ObnmzjMDblW3oHErlLxbiH1lS2xloaOy5rB/xMmEu2jg57KjC262xxrMCBXy96ypuu wcf4Ru7Y/WhNMUyyE3RSAcCCcf7+ywKUrd7hSIsFXYTNkxkUVk4vjA+f+uefNBGp7Nze 8P5elgI0KXYlt3I9JL+5o5x4z7PljYvVDMENaIc06sC49oKoyaVxKWb0Et4SzWaE1XyR 6E3A== 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=ywft/mqOgLfYHphAuO0LJBFgxSGp39uyHfGf28rv7Zs=; b=CY5Trmb8VvSek2fJfaya2wUmK/kOmLoTkvRrXTCtfZMSd4JJDR5Zb+roOisnT3ifT6 g70lK6cCLF92OaE2/7jQi+6pfha0VoeeT9Qs6lK3VRYTEXxYfLA6gwkebYUTm/s1uCjA Y7IEPfpQK1CICrFCsUJrvkHhRdEjvOd1P1gqIXbB+d0NqxZ6a+hZwQUBPvCxZ+cere5p 2fipt0GK1WUDxDrVr63ge00M80fpCGkgXZRq7lJc64jN/T1UFS6uDfitp6iLxNOLBq+x OY0P4ebP7RyygqBJnUW8M0WqAwPXc9eQJUXr+6Fm/rlJJXbizktMj5A9tYT7tXOJn9bO iGyg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=uAtWa8bO; 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 k9si11946798eje.254.2021.03.15.16.42.31; Mon, 15 Mar 2021 16:42:53 -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=uAtWa8bO; 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 S232859AbhCOSeB (ORCPT + 99 others); Mon, 15 Mar 2021 14:34:01 -0400 Received: from mail.kernel.org ([198.145.29.99]:53830 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231307AbhCOSdh (ORCPT ); Mon, 15 Mar 2021 14:33:37 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id B2D7B64F42; Mon, 15 Mar 2021 18:33:36 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1615833217; bh=HVQWGqz8y8OqhhYyK2J1S+Va64nH3a8Cr9xCQdP2MqQ=; h=References:In-Reply-To:From:Date:Subject:To:Cc:From; b=uAtWa8bOXn0C+MmuWGMXduycNNH402Y8ouR/4SD8TQmTPDv5iPINim3vk6cFbQqDb Yz0dxH/oLIadSqaHmMXjc67Uh4+DsqS5uVnpj40/NXbrMKJq0zX758GPEb2FALADXQ 56MDIJpAILAP+bhCWL2l4L8hX/x6zq7Igg7W52b3oPCvt1NEkN/06klJ5UNFQxIyje ch0f0DkgHwXTiuyV13Zedrp/XS0rlg8vDTs6+sUPnq1nj90K2cZxtZ90x6VcOagaxP xuMyo5HPKT7Uknw1Q85xviKiJuCEADnB4bC6nkCJp4Rth/vst144aZwGI9A2wh3BXc Vf/H3SReK8uBw== Received: by mail-ej1-f54.google.com with SMTP id jt13so68041394ejb.0; Mon, 15 Mar 2021 11:33:36 -0700 (PDT) X-Gm-Message-State: AOAM532QJtI6jaszytuqaxnmPZQ1Ed0+dgKz/7Cu3+3OOEckGnwxuRGw 9SluR1Q/XDsH/h5ViMYSl8+E2O7HPbSWNh3NWA== X-Received: by 2002:a17:906:2312:: with SMTP id l18mr25811201eja.468.1615833215265; Mon, 15 Mar 2021 11:33:35 -0700 (PDT) MIME-Version: 1.0 References: <20210312154357.1561730-1-sebastian.reichel@collabora.com> <20210312154357.1561730-17-sebastian.reichel@collabora.com> In-Reply-To: <20210312154357.1561730-17-sebastian.reichel@collabora.com> From: Rob Herring Date: Mon, 15 Mar 2021 12:33:23 -0600 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH 16/38] dt-bindings: power: supply: tps65217: 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:44 AM Sebastian Reichel wrote: > > Convert the binding to DT schema format. > > Signed-off-by: Sebastian Reichel > --- > .../power/supply/tps65217-charger.yaml | 43 +++++++++++++++++++ > .../power/supply/tps65217_charger.txt | 17 -------- > 2 files changed, 43 insertions(+), 17 deletions(-) > create mode 100644 Documentation/devicetree/bindings/power/supply/tps65217-charger.yaml > delete mode 100644 Documentation/devicetree/bindings/power/supply/tps65217_charger.txt > > diff --git a/Documentation/devicetree/bindings/power/supply/tps65217-charger.yaml b/Documentation/devicetree/bindings/power/supply/tps65217-charger.yaml > new file mode 100644 > index 000000000000..a33408c3a407 > --- /dev/null > +++ b/Documentation/devicetree/bindings/power/supply/tps65217-charger.yaml > @@ -0,0 +1,43 @@ > +# SPDX-License-Identifier: GPL-2.0 > +%YAML 1.2 > +--- > +$id: "http://devicetree.org/schemas/power/supply/tps65217-charger.yaml#" > +$schema: "http://devicetree.org/meta-schemas/core.yaml#" > + > +title: TPS65217 Charger > + > +maintainers: > + - Sebastian Reichel > + > +allOf: > + - $ref: power-supply.yaml# > + > +properties: > + compatible: > + const: ti,tps65217-charger > + > + interrupts: > + minItems: 2 > + maxItems: 2 We've lost info that was in the original binding. You could do something like this: items: - description: USB charger const: 0 - description: AC charger const: 1 (Usually the interrupt values would be out of scope of the binding, but I guess here it makes some sense.) > + > + interrupt-names: > + items: > + - const: USB > + - const: AC > + > +required: > + - compatible > + - interrupts > + - interrupt-names > + > +additionalProperties: false > + > +examples: > + - | > + pmic { > + charger { > + compatible = "ti,tps65217-charger"; > + interrupts = <0>, <1>; > + interrupt-names = "USB", "AC"; > + }; > + }; > diff --git a/Documentation/devicetree/bindings/power/supply/tps65217_charger.txt b/Documentation/devicetree/bindings/power/supply/tps65217_charger.txt > deleted file mode 100644 > index a11072c5a866..000000000000 > --- a/Documentation/devicetree/bindings/power/supply/tps65217_charger.txt > +++ /dev/null > @@ -1,17 +0,0 @@ > -TPS65217 Charger > - > -Required Properties: > --compatible: "ti,tps65217-charger" > --interrupts: TPS65217 interrupt numbers for the AC and USB charger input change. > - Should be <0> for the USB charger and <1> for the AC adapter. > --interrupt-names: Should be "USB" and "AC" > - > -This node is a subnode of the tps65217 PMIC. > - > -Example: > - > - tps65217-charger { > - compatible = "ti,tps65217-charger"; > - interrupts = <0>, <1>; > - interrupt-names = "USB", "AC"; > - }; > -- > 2.30.1 >