* [PATCH] ASoC: dt-bindings: Simplify port schema
@ 2023-11-01 14:09 Rob Herring
2023-11-13 14:05 ` Mark Brown
0 siblings, 1 reply; 2+ messages in thread
From: Rob Herring @ 2023-11-01 14:09 UTC (permalink / raw)
To: Liam Girdwood, Mark Brown, Krzysztof Kozlowski, Conor Dooley,
Geert Uytterhoeven, Magnus Damm, Kuninori Morimoto
Cc: alsa-devel, devicetree, linux-kernel, linux-renesas-soc
The use of 'definitions' is not necessary and also problematic because the
dtschema tools don't process 'definitions' resulting in this spurious
warning:
Documentation/devicetree/bindings/sound/renesas,rsnd.example.dtb: sound@ec500000: port:endpoint: Unevaluated properties are not allowed ('phandle' was unexpected)
from schema $id: http://devicetree.org/schemas/sound/renesas,rsnd.yaml#
Fix this by moving the port schema to #/properties/port and referencing
that directly from the 'ports' schema.
Really, a binding should just always use 'ports' if multiple ports are
possible. There's no benefit to supporting both forms. However, it appears
there are already lots of users of this one with a single 'port' node.
Signed-off-by: Rob Herring <robh@kernel.org>
---
Please apply for 6.7 to fix the warning.
.../bindings/sound/renesas,rsnd.yaml | 28 ++++++++-----------
1 file changed, 12 insertions(+), 16 deletions(-)
diff --git a/Documentation/devicetree/bindings/sound/renesas,rsnd.yaml b/Documentation/devicetree/bindings/sound/renesas,rsnd.yaml
index 13a5a0a10fe6..1174205286d4 100644
--- a/Documentation/devicetree/bindings/sound/renesas,rsnd.yaml
+++ b/Documentation/devicetree/bindings/sound/renesas,rsnd.yaml
@@ -9,20 +9,6 @@ title: Renesas R-Car Sound Driver
maintainers:
- Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
-definitions:
- port-def:
- $ref: audio-graph-port.yaml#/definitions/port-base
- unevaluatedProperties: false
- patternProperties:
- "^endpoint(@[0-9a-f]+)?":
- $ref: audio-graph-port.yaml#/definitions/endpoint-base
- properties:
- playback:
- $ref: /schemas/types.yaml#/definitions/phandle-array
- capture:
- $ref: /schemas/types.yaml#/definitions/phandle-array
- unevaluatedProperties: false
-
properties:
compatible:
@@ -125,7 +111,17 @@ properties:
# ports is below
port:
- $ref: "#/definitions/port-def"
+ $ref: audio-graph-port.yaml#/definitions/port-base
+ unevaluatedProperties: false
+ patternProperties:
+ "^endpoint(@[0-9a-f]+)?":
+ $ref: audio-graph-port.yaml#/definitions/endpoint-base
+ properties:
+ playback:
+ $ref: /schemas/types.yaml#/definitions/phandle-array
+ capture:
+ $ref: /schemas/types.yaml#/definitions/phandle-array
+ unevaluatedProperties: false
rcar_sound,dvc:
description: DVC subnode.
@@ -269,7 +265,7 @@ patternProperties:
unevaluatedProperties: false
patternProperties:
'^port(@[0-9a-f]+)?$':
- $ref: "#/definitions/port-def"
+ $ref: "#/properties/port"
required:
- compatible
--
2.42.0
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] ASoC: dt-bindings: Simplify port schema
2023-11-01 14:09 [PATCH] ASoC: dt-bindings: Simplify port schema Rob Herring
@ 2023-11-13 14:05 ` Mark Brown
0 siblings, 0 replies; 2+ messages in thread
From: Mark Brown @ 2023-11-13 14:05 UTC (permalink / raw)
To: Liam Girdwood, Krzysztof Kozlowski, Conor Dooley,
Geert Uytterhoeven, Magnus Damm, Kuninori Morimoto, Rob Herring
Cc: alsa-devel, devicetree, linux-kernel, linux-renesas-soc
On Wed, 01 Nov 2023 09:09:22 -0500, Rob Herring wrote:
> The use of 'definitions' is not necessary and also problematic because the
> dtschema tools don't process 'definitions' resulting in this spurious
> warning:
>
> Documentation/devicetree/bindings/sound/renesas,rsnd.example.dtb: sound@ec500000: port:endpoint: Unevaluated properties are not allowed ('phandle' was unexpected)
> from schema $id: http://devicetree.org/schemas/sound/renesas,rsnd.yaml#
>
> [...]
Applied to
https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound.git for-next
Thanks!
[1/1] ASoC: dt-bindings: Simplify port schema
commit: 6d02f355c3d2fe86f503793e4df09898e9f9e703
All being well this means that it will be integrated into the linux-next
tree (usually sometime in the next 24 hours) and sent to Linus during
the next merge window (or sooner if it is a bug fix), however if
problems are discovered then the patch may be dropped or reverted.
You may get further e-mails resulting from automated or manual testing
and review of the tree, please engage with people reporting problems and
send followup patches addressing any issues that are reported if needed.
If any updates are required or you are submitting further changes they
should be sent as incremental updates against current git, existing
patches will not be replaced.
Please add any relevant lists and maintainers to the CCs when replying
to this mail.
Thanks,
Mark
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2023-11-13 14:07 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-11-01 14:09 [PATCH] ASoC: dt-bindings: Simplify port schema Rob Herring
2023-11-13 14:05 ` Mark Brown
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox