[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20210209192041.GA4168680@robh.at.kernel.org>
Date: Tue, 9 Feb 2021 13:20:41 -0600
From: Rob Herring <robh@...nel.org>
To: Geert Uytterhoeven <geert+renesas@...der.be>
Cc: Magnus Damm <magnus.damm@...il.com>, devicetree@...r.kernel.org,
linux-renesas-soc@...r.kernel.org, linux-pm@...r.kernel.org,
linux-kernel@...r.kernel.org
Subject: Re: [PATCH] [RFC] dt-bindings: power: sysc-remobile: Convert to
json-schema
On Wed, Jan 27, 2021 at 02:28:40PM +0100, Geert Uytterhoeven wrote:
> Convert the Renesas R-Mobile System Controller (SYSC) Device Tree
> binding documentation to json-schema.
>
> Document missing properties.
> Drop consumer example, as it does not belong here.
>
> Signed-off-by: Geert Uytterhoeven <geert+renesas@...der.be>
> ---
> Marked RFC, as it does not check deeper levels than the first level of
> the "pm-domains" subnode.
>
> I think the reference in
>
> additionalProperties:
> $ref: "#/patternProperties"
>
> should become "#/patternProperties/0/additionalProperties", but that
> gives:
>
> Unresolvable JSON pointer: 'patternProperties/0/additionalProperties'
AFAIK, numbers only work on lists (such as 'allOf' values). So I think
you'd want '#/patternProperties/^pm-domains$/additionalProperties'.
However, regex's can have illegal characters. I think URI escaping them
would work, but that gets too readable and unmaintainable for my tastes.
The other way to do this is put the schema under a '$defs'. But in your
case, you have just a fixed string, so there's no need for it to be a
pattern. Just move it to 'properties'.
Otherwise, looks good to me.
Rob
Powered by blists - more mailing lists