Re: [PATCH] ASoC: dt-bindings: fsl, sai: Convert format to json-schema

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxxx> 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@xxxxxxx>
> > > ---
> > >  .../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@xxxxxxx>
> > > +
> > > +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



[Index of Archives]     [ALSA User]     [Linux Audio Users]     [Pulse Audio]     [Kernel Archive]     [Asterisk PBX]     [Photo Sharing]     [Linux Sound]     [Video 4 Linux]     [Gimp]     [Yosemite News]

  Powered by Linux