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

Conor Dooley conor at kernel.org
Thu Feb 29 10:57:29 PST 2024


On Thu, Feb 29, 2024 at 06:55:58PM +0000, Conor Dooley wrote:
> On Tue, Feb 27, 2024 at 03:54:11PM -0500, Frank Li wrote:
> > Some sai only connect one direction. So allow only "rx" or "tx" for
> > dma-names.
> 
> Which sai? Can you restrict this per compatible please, so that someone
> cannot add 2 dmas for ones where only the tx is supported.
> 
> |  dmas:
> |    minItems: 1
> |    items:
> |      - description: DMA controller phandle and request line for RX
> |      - description: DMA controller phandle and request line for TX
> 
> The binding already allows only one, but it documents that the first dma
> is always the RX dma, and that doesn't change with this patch..

I said "doesn't change" - but I don't think you can change this
trivially, as something could rely on the first dma being the rx one.
You'd have to check that there is nothing using these using indices
rather than names before making any changes here.

> 
> Cheers,
> Conor.
> 
> > 
> > Signed-off-by: Frank Li <Frank.Li at 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
> > -      - const: tx
> > +    oneOf:
> > +      - items:
> > +          - const: rx
> > +          - const: tx
> > +      - items:
> > +          - enum:
> > +              - rx
> > +              - tx
> >  
> >    interrupts:
> >      items:
> > 
> > -- 
> > 2.34.1
> > 


-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 228 bytes
Desc: not available
URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20240229/a418a76f/attachment.sig>


More information about the linux-arm-kernel mailing list