From: Maxime Ripard <maxime.ripard@bootlin.com>
To: Rob Herring <robh+dt@kernel.org>
Cc: Mark Rutland <mark.rutland@arm.com>,
devicetree@vger.kernel.org,
Linux-ALSA <alsa-devel@alsa-project.org>,
Liam Girdwood <lgirdwood@gmail.com>, Chen-Yu Tsai <wens@csie.org>,
Mark Brown <broonie@kernel.org>,
Frank Rowand <frowand.list@gmail.com>,
"moderated list:ARM/FREESCALE IMX / MXC ARM ARCHITECTURE"
<linux-arm-kernel@lists.infradead.org>
Subject: Re: [PATCH 1/2] dt-bindings: sound: Convert Allwinner SPDIF binding to YAML
Date: Wed, 17 Apr 2019 08:43:38 +0200 [thread overview]
Message-ID: <20190417064338.wuzjkixbg7noolwx@flea> (raw)
In-Reply-To: <CAL_JsqLuMObaNzrRMGDi-m=0B8AA7CYqJkrvD_K3cTmH7rdE4Q@mail.gmail.com>
[-- Attachment #1.1: Type: text/plain, Size: 1863 bytes --]
Hi Rob,
On Tue, Apr 16, 2019 at 04:36:18PM -0500, Rob Herring wrote:
> On Mon, Apr 15, 2019 at 7:07 AM Maxime Ripard <maxime.ripard@bootlin.com> wrote:
> >
> > The Allwinner SoCs feature an SPDIF controller across multiple SoC
> > generations.
> >
> > However, earlier generations were a bit simpler than the subsequent ones,
> > and for example would always have RX and TX capabilities, and no reset
> > lines.
> >
> > In order to express this, let's create two YAML schemas instead of the free
> > form text we had before.
>
> The only difference is 'reset' is required in one? Perhaps better to
> just not make 'reset' required til we figure out how to handle a
> conditional like this. Seems like we discussed this and I probably
> said to split things?
We indeed discussed this, and this was one of the solutions to support
this. I wanted to get the discussion started as of how exactly we want
to support this kind of construct.
I looked it up a bit, and it looks like json schema 7 introduces
conditionals that would allow us to deal with this nicely.
https://json-schema.org/understanding-json-schema/reference/conditionals.html
Is that something we can switch to while we have not a lot of schemas,
or would that require some significant work?
> I guess it's a judgement call depending on how different things are.
>
> Possibly, we could handle this case like this:
>
> allOf:
> - $ref: allwinner,sun4i-a10-spdif.yaml
>
> properties:
> resets:
> maxItems: 1
>
> required:
> - resets
>
>
> Plus we'd need the 'allwinner,sun6i-a31-spdif' and other compatibles
> in both files. Note that you can't use 'additionalProperties: false'
> in either file in this case.
>
> I don't really love this solution though.
Yeah, I'm not a big fan of it either.
Maxime
--
Maxime Ripard, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com
[-- Attachment #1.2: signature.asc --]
[-- Type: application/pgp-signature, Size: 228 bytes --]
[-- Attachment #2: Type: text/plain, Size: 176 bytes --]
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
next prev parent reply other threads:[~2019-04-17 6:43 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-04-15 12:07 [PATCH 1/2] dt-bindings: sound: Convert Allwinner SPDIF binding to YAML Maxime Ripard
2019-04-15 12:07 ` [PATCH 2/2] dt-bindings: sound: sun6i-spdif: Document that the RX channel can be missing Maxime Ripard
2019-04-16 1:36 ` Rob Herring
2019-04-16 7:19 ` Maxime Ripard
2019-04-16 21:50 ` Rob Herring
2019-04-17 18:24 ` Maxime Ripard
2019-04-16 21:36 ` [PATCH 1/2] dt-bindings: sound: Convert Allwinner SPDIF binding to YAML Rob Herring
2019-04-17 6:43 ` Maxime Ripard [this message]
2019-04-17 16:04 ` Rob Herring
2019-04-17 18:22 ` Maxime Ripard
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=20190417064338.wuzjkixbg7noolwx@flea \
--to=maxime.ripard@bootlin.com \
--cc=alsa-devel@alsa-project.org \
--cc=broonie@kernel.org \
--cc=devicetree@vger.kernel.org \
--cc=frowand.list@gmail.com \
--cc=lgirdwood@gmail.com \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=mark.rutland@arm.com \
--cc=robh+dt@kernel.org \
--cc=wens@csie.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