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>] [day] [month] [year] [list]
Date:   Wed, 10 Aug 2022 11:58:35 -0600
From:   Rob Herring <robh@...nel.org>
To:     Shengjiu Wang <shengjiu.wang@...il.com>
Cc:     Krzysztof Kozlowski <krzysztof.kozlowski@...aro.org>,
        "open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS" 
        <devicetree@...r.kernel.org>, alsa-devel@...a-project.org,
        Shengjiu Wang <shengjiu.wang@....com>,
        Liam Girdwood <lgirdwood@...il.com>,
        linux-kernel <linux-kernel@...r.kernel.org>,
        Mark Brown <broonie@...nel.org>,
        krzysztof.kozlowski+dt@...aro.org
Subject: Re: [PATCH] ASoC: dt-bindings: fsl, sai: Convert format to
 json-schema

On Thu, Jul 28, 2022 at 11:01:16PM +0800, Shengjiu Wang wrote:
> On Tue, Jul 26, 2022 at 4:05 AM Krzysztof Kozlowski <
> krzysztof.kozlowski@...aro.org> wrote:
> 
> > On 25/07/2022 11:31, Shengjiu Wang wrote:
> > > Convert the NXP SAI binding to DT schema format using json-schema.
> > >
> > > The Synchronous Audio Interface (SAI) provides an interface that
> > > supports full-duplex serial interfaces with frame synchronization
> > > formats such as I2S, AC97, TDM, and codec/DSP interfaces.
> > >
> > > Signed-off-by: Shengjiu Wang <shengjiu.wang@....com>
> > > ---
> > >  .../devicetree/bindings/sound/fsl,sai.yaml    | 175 ++++++++++++++++++
> > >  .../devicetree/bindings/sound/fsl-sai.txt     |  95 ----------
> > >  2 files changed, 175 insertions(+), 95 deletions(-)
> > >  create mode 100644 Documentation/devicetree/bindings/sound/fsl,sai.yaml
> > >  delete mode 100644 Documentation/devicetree/bindings/sound/fsl-sai.txt
> > >
> > > diff --git a/Documentation/devicetree/bindings/sound/fsl,sai.yaml
> > b/Documentation/devicetree/bindings/sound/fsl,sai.yaml
> > > new file mode 100644
> > > index 000000000000..adcd77531eba
> > > --- /dev/null
> > > +++ b/Documentation/devicetree/bindings/sound/fsl,sai.yaml
> > > @@ -0,0 +1,175 @@
> > > +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
> > > +%YAML 1.2
> > > +---
> > > +$id: http://devicetree.org/schemas/sound/fsl,sai.yaml#
> > > +$schema: http://devicetree.org/meta-schemas/core.yaml#
> > > +
> > > +title: Freescale Synchronous Audio Interface (SAI).
> > > +
> > > +maintainers:
> > > +  - Shengjiu Wang <shengjiu.wang@....com>
> > > +
> > > +description: |
> > > +  The SAI is based on I2S module that used communicating with audio
> > codecs,
> > > +  which provides a synchronous audio interface that supports fullduplex
> > > +  serial interfaces with frame synchronization such as I2S, AC97, TDM,
> > and
> > > +  codec/DSP interfaces.
> > > +
> > > +properties:
> > > +  compatible:
> > > +    minItems: 1
> > > +    maxItems: 2
> >
> > You allow anything here, so it's not acceptable. This has to be strictly
> > defined.
> >
> 
> ok, I will update it.
> 
> >
> > > +    items:
> > > +      enum:
> > > +        - fsl,vf610-sai
> > > +        - fsl,imx6sx-sai
> > > +        - fsl,imx6ul-sai
> > > +        - fsl,imx7ulp-sai
> > > +        - fsl,imx8mq-sai
> > > +        - fsl,imx8qm-sai
> > > +        - fsl,imx8mm-sai
> > > +        - fsl,imx8mn-sai
> > > +        - fsl,imx8mp-sai
> > > +        - fsl,imx8ulp-sai
> > > +
> > > +  reg:
> > > +    maxItems: 1
> > > +
> > > +  interrupts:
> > > +    items:
> > > +      - description: receive and transmit interrupt
> > > +
> > > +  dmas:
> > > +    minItems: 2
> >
> > No need for minItems.
> >
> 
> ok
> 
> 
> >
> > > +    maxItems: 2
> > > +    description:
> > > +      Must contain a list of pairs of references to DMA specifiers, one
> > for
> > > +      transmission, and one for reception.
> >
> > Skip description and instead describe items like you did for interrupts.
> >
> 
> ok, will update it
> 
> >
> > > +
> > > +  dma-names:
> > > +    minItems: 2
> > > +    maxItems: 2
> > > +    items:
> > > +      enum:
> > > +        - tx
> > > +        - rx
> >
> > No, this has to be strictly defined, so items with tx and rx (or
> > reversed order).
> >
> 
> two kind of order is needed, seems I need to use
> if - then -else

No, pick the more common one for the schema and fix the dts files for 
the less common case.

Rob

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ