[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAL_JsqLn9Mo_hTuCEPapNz3cFHbC8NKHH0npYrnV+dC85pBAsQ@mail.gmail.com>
Date: Mon, 15 Mar 2021 12:33:23 -0600
From: Rob Herring <robh+dt@...nel.org>
To: Sebastian Reichel <sebastian.reichel@...labora.com>
Cc: Sebastian Reichel <sre@...nel.org>,
"open list:THERMAL" <linux-pm@...r.kernel.org>,
devicetree@...r.kernel.org,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
Collabora Kernel ML <kernel@...labora.com>
Subject: Re: [PATCH 16/38] dt-bindings: power: supply: tps65217: Convert to DT
schema format
On Fri, Mar 12, 2021 at 8:44 AM Sebastian Reichel
<sebastian.reichel@...labora.com> wrote:
>
> Convert the binding to DT schema format.
>
> Signed-off-by: Sebastian Reichel <sebastian.reichel@...labora.com>
> ---
> .../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 <sre@...nel.org>
> +
> +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
>
Powered by blists - more mailing lists