diff mbox series

[v2] ASoC: dt-bindings: audio-graph-port: enable both flag/phandle for bitclock/frame-master

Message ID 20211208064852.507977-1-kuninori.morimoto.gx@renesas.com
State Changes Requested, archived
Headers show
Series [v2] ASoC: dt-bindings: audio-graph-port: enable both flag/phandle for bitclock/frame-master | expand

Checks

Context Check Description
robh/checkpatch success
robh/dtbs-check success
robh/dt-meta-schema success

Commit Message

Kuninori Morimoto Dec. 8, 2021, 6:48 a.m. UTC
From: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>

snd_soc_daifmt_parse_clock_provider_raw() is handling both
bitclock/frame-master, and is supporting both flag/phandle.
Current DT is assuming it is flag style.
This patch allows both case.

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
---
 .../devicetree/bindings/sound/audio-graph-port.yaml      | 9 +++++++--
 1 file changed, 7 insertions(+), 2 deletions(-)

Comments

Rob Herring Dec. 15, 2021, 3:58 p.m. UTC | #1
On Wed, Dec 08, 2021 at 03:48:52PM +0900, Kuninori Morimoto wrote:
> From: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
> 
> snd_soc_daifmt_parse_clock_provider_raw() is handling both
> bitclock/frame-master, and is supporting both flag/phandle.
> Current DT is assuming it is flag style.
> This patch allows both case.
> 
> Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
> ---
>  .../devicetree/bindings/sound/audio-graph-port.yaml      | 9 +++++++--
>  1 file changed, 7 insertions(+), 2 deletions(-)
> 
> diff --git a/Documentation/devicetree/bindings/sound/audio-graph-port.yaml b/Documentation/devicetree/bindings/sound/audio-graph-port.yaml
> index 43e7f86e3b23..7d0248be08c5 100644
> --- a/Documentation/devicetree/bindings/sound/audio-graph-port.yaml
> +++ b/Documentation/devicetree/bindings/sound/audio-graph-port.yaml
> @@ -42,10 +42,15 @@ patternProperties:
>          $ref: /schemas/types.yaml#/definitions/flag
>        frame-master:
>          description: Indicates dai-link frame master.
> -        $ref: /schemas/types.yaml#/definitions/phandle
> +        anyOf:

Does oneOf work? It can't be both at the same time, but the schemas 
could possibly need some further constraints.

> +          - $ref: /schemas/types.yaml#/definitions/flag
> +          - $ref: /schemas/types.yaml#/definitions/phandle
>        bitclock-master:
>          description: Indicates dai-link bit clock master
> -        $ref: /schemas/types.yaml#/definitions/phandle
> +        anyOf:
> +          - $ref: /schemas/types.yaml#/definitions/flag
> +          - $ref: /schemas/types.yaml#/definitions/phandle
> +
>        dai-format:
>          description: audio format.
>          items:
> -- 
> 2.25.1
> 
>
Kuninori Morimoto Dec. 15, 2021, 11:41 p.m. UTC | #2
Hi Rob

Thank you for your review

>>        frame-master:
>>          description: Indicates dai-link frame master.
>> -        $ref: /schemas/types.yaml#/definitions/phandle
>> +        anyOf:
>
> Does oneOf work? It can't be both at the same time, but the schemas 
> could possibly need some further constraints.

Yes, indeed.
Will post v2 soon

Best regards
---
Kuninori Morimoto
diff mbox series

Patch

diff --git a/Documentation/devicetree/bindings/sound/audio-graph-port.yaml b/Documentation/devicetree/bindings/sound/audio-graph-port.yaml
index 43e7f86e3b23..7d0248be08c5 100644
--- a/Documentation/devicetree/bindings/sound/audio-graph-port.yaml
+++ b/Documentation/devicetree/bindings/sound/audio-graph-port.yaml
@@ -42,10 +42,15 @@  patternProperties:
         $ref: /schemas/types.yaml#/definitions/flag
       frame-master:
         description: Indicates dai-link frame master.
-        $ref: /schemas/types.yaml#/definitions/phandle
+        anyOf:
+          - $ref: /schemas/types.yaml#/definitions/flag
+          - $ref: /schemas/types.yaml#/definitions/phandle
       bitclock-master:
         description: Indicates dai-link bit clock master
-        $ref: /schemas/types.yaml#/definitions/phandle
+        anyOf:
+          - $ref: /schemas/types.yaml#/definitions/flag
+          - $ref: /schemas/types.yaml#/definitions/phandle
+
       dai-format:
         description: audio format.
         items: