All of lore.kernel.org
 help / color / mirror / Atom feed
From: Herve Codina via Alsa-devel <alsa-devel@alsa-project.org>
To: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Cc: Rob Herring <robh+dt@kernel.org>,
	Krzysztof Kozlowski <krzysztof.kozlowski+dt@linaro.org>,
	Liam Girdwood <lgirdwood@gmail.com>,
	Mark Brown <broonie@kernel.org>,
	Derek Kiernan <derek.kiernan@xilinx.com>,
	Dragan Cvetic <dragan.cvetic@xilinx.com>,
	Arnd Bergmann <arnd@arndb.de>,
	Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	Takashi Iwai <tiwai@suse.com>,
	linux-kernel@vger.kernel.org, devicetree@vger.kernel.org,
	alsa-devel@alsa-project.org,
	Christophe Leroy <christophe.leroy@csgroup.eu>,
	Thomas Petazzoni <thomas.petazzoni@bootlin.com>
Subject: Re: [PATCH v2 5/7] dt-bindings: sound: Add support for the Lantiq PEF2256 codec
Date: Mon, 20 Mar 2023 19:17:00 +0100	[thread overview]
Message-ID: <167933623411.26.9841076287693661943@mailman-core.alsa-project.org> (raw)
In-Reply-To: <2d4dae57-e46d-7e81-9b56-2148074c8406@linaro.org>


[-- Attachment #0: Type: message/rfc822, Size: 8647 bytes --]

From: Herve Codina <herve.codina@bootlin.com>
To: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Cc: Rob Herring <robh+dt@kernel.org>, Krzysztof Kozlowski <krzysztof.kozlowski+dt@linaro.org>, Liam Girdwood <lgirdwood@gmail.com>, Mark Brown <broonie@kernel.org>, Derek Kiernan <derek.kiernan@xilinx.com>, Dragan Cvetic <dragan.cvetic@xilinx.com>, Arnd Bergmann <arnd@arndb.de>, Greg Kroah-Hartman <gregkh@linuxfoundation.org>, Takashi Iwai <tiwai@suse.com>, linux-kernel@vger.kernel.org, devicetree@vger.kernel.org, alsa-devel@alsa-project.org, Christophe Leroy <christophe.leroy@csgroup.eu>, Thomas Petazzoni <thomas.petazzoni@bootlin.com>
Subject: Re: [PATCH v2 5/7] dt-bindings: sound: Add support for the Lantiq PEF2256 codec
Date: Mon, 20 Mar 2023 19:17:00 +0100
Message-ID: <20230320191700.3d48e264@bootlin.com>

Hi Krzysztof

On Fri, 17 Mar 2023 09:57:11 +0100
Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> wrote:

> On 16/03/2023 13:27, Herve Codina wrote:
> > The Lantiq PEF2256, also known as Infineon PEF2256 or FALC256, is a
> > framer and line interface component designed to fulfill all required
> > interfacing between an analog E1/T1/J1 line and the digital PCM system
> > highway/H.100 bus.
> > 
> > The codec support allows to use some of the PCM system highway
> > time-slots as audio channels to transport audio data over the E1/T1/J1
> > lines.
> >   
> 
> Your other file should also have specific compatible, unless this codec
> is actually part of the framer. Did not look like this in the binding -
> not $ref.

No sure to understand what you mean.

Anyway, I plan to use a MFD device for pef2256 and reference this yaml
from the lantiq,pef2256.yaml in the node related to the codec.

One question related to bindings and related checks:
Is there a way to check the compatible property of the parent node.
I mean, here is the binding of a child node of a MFD node.
From this binding, I would like to be sure that the parent is really a
pef2256 MFD node.

May be something like:
  parent-properties:
    allOf:
      compatible:
        contains:
          const: lantiq,pef2256

The idea is to have dtbs_check raise an error if the parent's compatible
property is not 'lantiq,pef2256'.

From parent, the link is checked using:
  properties:
    codec:
      $ref: /schemas/sound/lantiq,pef2256-codec.yaml

but nothing prevent to use this 'lantiq,pef2256-codec' binding from a node
that has nothing to do with pef2256.

> 
> > Signed-off-by: Herve Codina <herve.codina@bootlin.com>
> > ---
> >  .../bindings/sound/lantiq,pef2256-codec.yaml  | 57 +++++++++++++++++++
> >  1 file changed, 57 insertions(+)
> >  create mode 100644 Documentation/devicetree/bindings/sound/lantiq,pef2256-codec.yaml
> > 
> > diff --git a/Documentation/devicetree/bindings/sound/lantiq,pef2256-codec.yaml b/Documentation/devicetree/bindings/sound/lantiq,pef2256-codec.yaml
> > new file mode 100644
> > index 000000000000..acba3a0ccd1b
> > --- /dev/null
> > +++ b/Documentation/devicetree/bindings/sound/lantiq,pef2256-codec.yaml
> > @@ -0,0 +1,57 @@
> > +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
> > +%YAML 1.2
> > +---
> > +$id: http://devicetree.org/schemas/sound/lantiq,pef2256-codec.yaml#
> > +$schema: http://devicetree.org/meta-schemas/core.yaml#
> > +
> > +title: Lantiq PEF2256 codec device  
> 
> Drop "device". Everything is "device".

Will be dropped in v3 series.

> 
> > +
> > +maintainers:
> > +  - Herve Codina <herve.codina@bootlin.com>
> > +
> > +description: |
> > +  Codec support for PEF2256.
> > +
> > +  The Lantiq PEF2256, also known as Infineon PEF2256 or FALC256, is a framer and
> > +  line interface component designed to fulfill all required interfacing between
> > +  an analog E1/T1/J1 line and the digital PCM system highway/H.100 bus.
> > +
> > +  The codec support allows to use some of the PCM system highway time-slots as
> > +  audio channels to transport audio data over the E1/T1/J1 lines.
> > +
> > +  The time-slots used by the codec must be set and so, the properties
> > +  'dai-tdm-slot-num', 'dai-tdm-slot-width', 'dai-tdm-slot-tx-mask' and
> > +  'dai-tdm-slot-rx-mask' must be present in the ALSA sound card node for
> > +  sub-nodes that involve the codec. The codec uses 8bit time-slots.
> > +  'dai-tdm-tdm-slot-with' must be set to 8.
> > +
> > +allOf:
> > +  - $ref: /schemas/spi/spi-peripheral-props.yaml#

Oups,
This device is not on a SPI bus -> will be dropped in v3 series.

> > +  - $ref: dai-common.yaml#
> > +
> > +properties:
> > +  compatible:
> > +    const: lantiq,pef2256-codec
> > +
> > +  lantiq,pef2256:
> > +    $ref: /schemas/types.yaml#/definitions/phandle
> > +    description:
> > +      phandle to the PEF2256  
> 
> Why not its child? Why this is in parallel ?

Indeed,
I will move to MFD, remove this phandle and use the lantiq,pef2256-codec
node as a child node of lantiq,pef2256.

> 
> > +
> > +  '#sound-dai-cells':
> > +    const: 0
> > +  
> 
> 
> Best regards,
> Krzysztof
> 

Thanks for the review,

Best regards,
Hervé

-- 
Hervé Codina, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com

  reply	other threads:[~2023-03-20 18:18 UTC|newest]

Thread overview: 42+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-03-16 12:27 [PATCH v2 0/7] Add the Lantiq PEF2256 audio support Herve Codina
2023-03-16 12:27 ` [PATCH v2 1/7] dt-bindings: misc: Add the Lantiq PEF2466 E1/T1/J1 framer Herve Codina via Alsa-devel
2023-03-16 12:27 ` Herve Codina
2023-03-17  8:54   ` Krzysztof Kozlowski
2023-03-20  9:46     ` Herve Codina
2023-03-20 10:20       ` Krzysztof Kozlowski
2023-03-20 10:20         ` Krzysztof Kozlowski
2023-03-20  9:46     ` Herve Codina via Alsa-devel
2023-03-20 18:51       ` Rob Herring
2023-03-22 10:20         ` Herve Codina
2023-03-22 12:56           ` Rob Herring
2023-03-22 13:09             ` Rob Herring
2023-03-22 10:20         ` Herve Codina via Alsa-devel
2023-03-17  8:55   ` Krzysztof Kozlowski
2023-03-16 12:27 ` [PATCH v2 2/7] drivers: misc: Add support for the Lantiq PEF2256 framer Herve Codina
2023-03-16 12:49   ` Greg Kroah-Hartman
2023-03-16 12:49     ` Greg Kroah-Hartman
2023-03-16 16:29     ` Herve Codina via Alsa-devel
2023-03-16 16:29     ` Herve Codina
2023-03-16 14:00   ` Christophe Leroy via Alsa-devel
2023-03-16 14:00   ` Christophe Leroy
2023-03-17 16:24     ` Herve Codina via Alsa-devel
2023-03-17 16:24     ` Herve Codina
2023-03-16 12:27 ` Herve Codina via Alsa-devel
2023-03-16 12:27 ` [PATCH v2 3/7] Documentation: sysfs: Document the Lantiq PEF2256 sysfs entry Herve Codina via Alsa-devel
2023-03-16 12:27 ` Herve Codina
2023-03-16 12:27 ` [PATCH v2 4/7] MAINTAINERS: Add the Lantiq PEF2256 driver entry Herve Codina
2023-03-16 12:27 ` Herve Codina via Alsa-devel
2023-03-16 12:27 ` [PATCH v2 5/7] dt-bindings: sound: Add support for the Lantiq PEF2256 codec Herve Codina
2023-03-17  8:57   ` Krzysztof Kozlowski
2023-03-20 18:17     ` Herve Codina via Alsa-devel [this message]
2023-03-20 18:17     ` Herve Codina
2023-03-20 18:21       ` Krzysztof Kozlowski
2023-03-20 18:21         ` Krzysztof Kozlowski
2023-03-16 12:27 ` Herve Codina via Alsa-devel
2023-03-16 12:27 ` [PATCH v2 6/7] ASoC: codecs: " Herve Codina via Alsa-devel
2023-03-16 12:27 ` Herve Codina
2023-03-17 18:27   ` Christophe Leroy
2023-03-17 18:27   ` Christophe Leroy via Alsa-devel
2023-03-16 12:27 ` [PATCH v2 7/7] MAINTAINERS: Add the Lantiq PEF2256 ASoC codec entry Herve Codina via Alsa-devel
2023-03-16 12:27 ` Herve Codina
2023-03-17  8:58   ` Krzysztof Kozlowski

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=167933623411.26.9841076287693661943@mailman-core.alsa-project.org \
    --to=alsa-devel@alsa-project.org \
    --cc=arnd@arndb.de \
    --cc=broonie@kernel.org \
    --cc=christophe.leroy@csgroup.eu \
    --cc=derek.kiernan@xilinx.com \
    --cc=devicetree@vger.kernel.org \
    --cc=dragan.cvetic@xilinx.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=herve.codina@bootlin.com \
    --cc=krzysztof.kozlowski+dt@linaro.org \
    --cc=krzysztof.kozlowski@linaro.org \
    --cc=lgirdwood@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=robh+dt@kernel.org \
    --cc=thomas.petazzoni@bootlin.com \
    --cc=tiwai@suse.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.