diff mbox series

[v3,3/4] ASoC: dt-bindings: fsl-sai: allow only one dma-names

Message ID 20240228-asrc_8qxp-v3-3-d4d5935fd3aa@nxp.com (mailing list archive)
State Superseded
Headers show
Series arm64: dts: imx8qxp add asrc and sai | expand

Commit Message

Frank Li Feb. 28, 2024, 7:14 p.m. UTC
Some sai only connect one direction. So allow only "rx" or "tx" for
dma-names.

Signed-off-by: Frank Li <Frank.Li@nxp.com>
---
 Documentation/devicetree/bindings/sound/fsl,sai.yaml | 12 ++++++++----
 1 file changed, 8 insertions(+), 4 deletions(-)

Comments

Krzysztof Kozlowski Feb. 29, 2024, 9:46 a.m. UTC | #1
On 28/02/2024 20:14, Frank Li wrote:
> Some sai only connect one direction. So allow only "rx" or "tx" for
> dma-names.

"one direction" was already allowed. Explain really what is the
different, e.g. you expect only TX?

This applies to all your recent patches - they all have insufficient
explanation. Often they explain what you are doing, but not why.

> 
> Signed-off-by: Frank Li <Frank.Li@nxp.com>




Best regards,
Krzysztof
Frank Li March 1, 2024, 4:06 a.m. UTC | #2
On Thu, Feb 29, 2024 at 10:46:38AM +0100, Krzysztof Kozlowski wrote:
> On 28/02/2024 20:14, Frank Li wrote:
> > Some sai only connect one direction. So allow only "rx" or "tx" for
> > dma-names.
> 
> "one direction" was already allowed. Explain really what is the
> different, e.g. you expect only TX?

Yes, there are one sai only connect tx dma channel.

So TX \ RX \ both TX and RX, 3 kind combination.

> 
> This applies to all your recent patches - they all have insufficient
> explanation. Often they explain what you are doing, but not why.
> 
> > 
> > Signed-off-by: Frank Li <Frank.Li@nxp.com>
> 
> 
> 
> 
> Best regards,
> Krzysztof
>
Rob Herring (Arm) March 4, 2024, 2:58 p.m. UTC | #3
On Wed, Feb 28, 2024 at 02:14:15PM -0500, Frank Li wrote:
> Some sai only connect one direction. So allow only "rx" or "tx" for
> dma-names.
> 
> Signed-off-by: Frank Li <Frank.Li@nxp.com>
> ---
>  Documentation/devicetree/bindings/sound/fsl,sai.yaml | 12 ++++++++----
>  1 file changed, 8 insertions(+), 4 deletions(-)
> 
> diff --git a/Documentation/devicetree/bindings/sound/fsl,sai.yaml b/Documentation/devicetree/bindings/sound/fsl,sai.yaml
> index 2456d958adeef..0302752d58a2b 100644
> --- a/Documentation/devicetree/bindings/sound/fsl,sai.yaml
> +++ b/Documentation/devicetree/bindings/sound/fsl,sai.yaml
> @@ -86,10 +86,14 @@ properties:
>        - description: DMA controller phandle and request line for TX
>  
>    dma-names:
> -    minItems: 1
> -    items:
> -      - const: rx

Just this change is enough:

         - enum: [ rx, tx ]

(We enforce unique items elsewhere already)

> -      - const: tx
> +    oneOf:
> +      - items:
> +          - const: rx
> +          - const: tx
> +      - items:
> +          - enum:
> +              - rx
> +              - tx
diff mbox series

Patch

diff --git a/Documentation/devicetree/bindings/sound/fsl,sai.yaml b/Documentation/devicetree/bindings/sound/fsl,sai.yaml
index 2456d958adeef..0302752d58a2b 100644
--- a/Documentation/devicetree/bindings/sound/fsl,sai.yaml
+++ b/Documentation/devicetree/bindings/sound/fsl,sai.yaml
@@ -86,10 +86,14 @@  properties:
       - description: DMA controller phandle and request line for TX
 
   dma-names:
-    minItems: 1
-    items:
-      - const: rx
-      - const: tx
+    oneOf:
+      - items:
+          - const: rx
+          - const: tx
+      - items:
+          - enum:
+              - rx
+              - tx
 
   interrupts:
     items: