lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <ZeDbiLR8vLtVfgGX@lizhi-Precision-Tower-5810>
Date: Thu, 29 Feb 2024 14:31:20 -0500
From: Frank Li <Frank.li@....com>
To: Conor Dooley <conor@...nel.org>
Cc: Liam Girdwood <lgirdwood@...il.com>, Mark Brown <broonie@...nel.org>,
	Rob Herring <robh@...nel.org>,
	Krzysztof Kozlowski <krzysztof.kozlowski+dt@...aro.org>,
	Conor Dooley <conor+dt@...nel.org>, Shawn Guo <shawnguo@...nel.org>,
	Sascha Hauer <s.hauer@...gutronix.de>,
	Pengutronix Kernel Team <kernel@...gutronix.de>,
	Fabio Estevam <festevam@...il.com>,
	Shengjiu Wang <shengjiu.wang@....com>, linux-sound@...r.kernel.org,
	devicetree@...r.kernel.org, imx@...ts.linux.dev,
	linux-arm-kernel@...ts.infradead.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH v2 3/4] ASoC: dt-bindings: fsl-sai: allow only one
 dma-names

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.

SAI is exact the same. Only external connect one dma channel.

> 
> |  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..

Does below logic work? 

anyOf
  - enum
      - description: ---rx
      - description: ---tx

> 
> Cheers,
> Conor.
> 
> > 
> > Signed-off-by: Frank Li <Frank.Li@....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
> > 



Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ