On Mon, Jul 10, 2023 at 10:21:42AM +0900, Kuninori Morimoto wrote:
renesas,rsnd uses both "ports" has "port", and these are very similar. To avoid duplicated definitions, this patch adds common port-def.
Signed-off-by: Kuninori Morimoto kuninori.morimoto.gx@renesas.com
.../bindings/sound/renesas,rsnd.yaml | 38 ++++++++----------- 1 file changed, 16 insertions(+), 22 deletions(-)
diff --git a/Documentation/devicetree/bindings/sound/renesas,rsnd.yaml b/Documentation/devicetree/bindings/sound/renesas,rsnd.yaml index 8a821dec9526..d9808b130e8d 100644 --- a/Documentation/devicetree/bindings/sound/renesas,rsnd.yaml +++ b/Documentation/devicetree/bindings/sound/renesas,rsnd.yaml @@ -9,6 +9,20 @@ title: Renesas R-Car Sound Driver maintainers:
- Kuninori Morimoto kuninori.morimoto.gx@renesas.com
+definitions:
$defs
- 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: @@ -108,30 +122,10 @@ properties: unevaluatedProperties: false patternProperties: '^port(@[0-9a-f]+)?$':
$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
$ref: "#/definitions/port-def"
port:
- $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
- $ref: "#/definitions/port-def"
It would be better if users just always used "ports { port {}; };" even in the single port case.
rcar_sound,dvc: description: DVC subnode. -- 2.25.1