From: Rob Herring <robh@kernel.org>
To: Geert Uytterhoeven <geert+renesas@glider.be>
Cc: Lee Jones <lee@kernel.org>,
Krzysztof Kozlowski <krzysztof.kozlowski+dt@linaro.org>,
Conor Dooley <conor+dt@kernel.org>,
Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>,
Liam Girdwood <lgirdwood@gmail.com>,
Mark Brown <broonie@kernel.org>,
devicetree@vger.kernel.org, linux-renesas-soc@vger.kernel.org,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH RFC] dt-bindings: mfd: ams,as3711: Convert to json-schema
Date: Tue, 24 Oct 2023 15:58:21 -0500 [thread overview]
Message-ID: <20231024205821.GA529288-robh@kernel.org> (raw)
In-Reply-To: <9af48b816f2b6397f5ada58a9b5ced85213e5194.1698085945.git.geert+renesas@glider.be>
On Mon, Oct 23, 2023 at 08:38:07PM +0200, Geert Uytterhoeven wrote:
> Convert the Austria MicroSystems AS3711 Quad Buck High Current PMIC with
> Charger Device Tree binding documentation to json-schema.
>
> Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
> ---
> RFC, as I couldn't get the multiple dependencies right (see FIXMEs):
> 1. How to incorporate "su2-dev: [ su2-max-uA ]" and
> "su2-feedback-curr-auto: [ su2-dev ]"?
> 2. su2-dev requiring one of su2-fbprot-* does not seem to work?
>
> Anyone with better *Of foo? Thanks!
> ---
> .../devicetree/bindings/mfd/ams,as3711.yaml | 223 ++++++++++++++++++
> .../devicetree/bindings/mfd/as3711.txt | 73 ------
> 2 files changed, 223 insertions(+), 73 deletions(-)
> create mode 100644 Documentation/devicetree/bindings/mfd/ams,as3711.yaml
> delete mode 100644 Documentation/devicetree/bindings/mfd/as3711.txt
> + dependencies:
> + # To use the SU1 converter as a backlight source the following two
> + # properties must be provided:
> + su1-dev: [ su1-max-uA ]
> + su1-max-uA: [ su1-dev ]
> +
> + # To use the SU2 converter as a backlight source the following two
> + # properties must be provided:
> + # FIXME How to incorporate "su2-dev: [ su2-max-uA ]"?
You've stumbled into the evolution of jsonschema. Newer versions split
'dependencies' into 'dependentSchemas' and 'dependentRequired' (more
generally, they split keywords that could be either a list or schema).
That will let you have both forms. The new keywords are already
supported and you can use them (internally, dtschema is converting
every 'dependencies' to the new forms because json-schema likes flag
days, sigh).
> + # FIXME su2-dev requiring one of su2-fbprot-* does not seem to work?
> + su2-dev:
> + allOf:
> + - oneOf:
> + - required:
> + - su2-feedback-voltage
> + - required:
> + - su2-feedback-curr1
> + - required:
> + - su2-feedback-curr2
> + - required:
> + - su2-feedback-curr3
> + - required:
> + - su2-feedback-curr-auto
> + - oneof:
Your second problem is here.
s/oneof/oneOf/
Got to love json-schema's default silence on unknown keywords. I'll
figure out why we don't descend here and find this.
> + - required:
> + - su2-fbprot-lx-sd4
> + - required:
> + - su2-fbprot-gpio2
> + - required:
> + - su2-fbprot-gpio3
> + - required:
> + - su2-fbprot-gpio4
next prev parent reply other threads:[~2023-10-24 20:58 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-10-23 18:38 [PATCH RFC] dt-bindings: mfd: ams,as3711: Convert to json-schema Geert Uytterhoeven
2023-10-24 20:58 ` Rob Herring [this message]
2023-10-24 21:00 ` Rob Herring
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20231024205821.GA529288-robh@kernel.org \
--to=robh@kernel.org \
--cc=broonie@kernel.org \
--cc=conor+dt@kernel.org \
--cc=devicetree@vger.kernel.org \
--cc=geert+renesas@glider.be \
--cc=guennadi.liakhovetski@linux.intel.com \
--cc=krzysztof.kozlowski+dt@linaro.org \
--cc=lee@kernel.org \
--cc=lgirdwood@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-renesas-soc@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).