mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Svyatoslav Ryhel <clamor95@gmail.com>
To: Liam Girdwood <lgirdwood@gmail.com>,
	Mark Brown <broonie@kernel.org>, Rob Herring <robh@kernel.org>,
	Krzysztof Kozlowski <krzk+dt@kernel.org>,
	Conor Dooley <conor+dt@kernel.org>,
	Svyatoslav Ryhel <clamor95@gmail.com>
Cc: linux-sound@vger.kernel.org, devicetree@vger.kernel.org,
	linux-kernel@vger.kernel.org
Subject: [PATCH v1 RFC] ASoC: dt-bindings: Define '#sound-dai-cells' only in the dai-common schema
Date: Sat, 24 Oct 2026 11:43:07 +0300	[thread overview]
Message-ID: <20261024084307.116715-1-clamor95@gmail.com> (raw)

Define the '#sound-dai-cells' property only in the dai-common schema with
an enum of commonly used values and a description on how to use them. Drop
all trivial uses of '#sound-dai-cells' across devices with DAI support,
replacing them with a reference to the dai-common schema.

This should resolve any issues with codecs having multiple DAI cells, no
DAI cells at all, or incorrectly configured sound-dai-cells properties.
Simply include the common schema and switch additionalProperties to
unevaluatedProperties.

Non-trivial '#sound-dai-cells' usages can still be overridden in dedicated
device schemas.

Signed-off-by: Svyatoslav Ryhel <clamor95@gmail.com>
---
NOTE: This is currently just a concept. The actual patch will be very large,
as it touches nearly every codec binding. Therefore, I am sending this RFC
to ask if this change would be acceptable in principle, and if so, how it
should best be structured and split. Thanks.
---
 Documentation/devicetree/bindings/sound/dai-common.yaml   | 6 +++++-
 Documentation/devicetree/bindings/sound/linux,bt-sco.yaml | 7 -------
 Documentation/devicetree/bindings/sound/linux,spdif.yaml  | 5 +----
 3 files changed, 6 insertions(+), 12 deletions(-)

diff --git a/Documentation/devicetree/bindings/sound/dai-common.yaml b/Documentation/devicetree/bindings/sound/dai-common.yaml
index 1aed2f0f17756..152f319d8f382 100644
--- a/Documentation/devicetree/bindings/sound/dai-common.yaml
+++ b/Documentation/devicetree/bindings/sound/dai-common.yaml
@@ -13,6 +13,10 @@ allOf:
   - $ref: component-common.yaml#
 
 properties:
-  '#sound-dai-cells': true
+  '#sound-dai-cells':
+    description:
+      Use 0 if only a single DAI cell is available, or 1 if there are multiple
+      DAI cells. For special cases, check the device schema.
+    enum: [0, 1]
 
 additionalProperties: true
diff --git a/Documentation/devicetree/bindings/sound/linux,bt-sco.yaml b/Documentation/devicetree/bindings/sound/linux,bt-sco.yaml
index a67b79cbe006b..f30aea4b545c9 100644
--- a/Documentation/devicetree/bindings/sound/linux,bt-sco.yaml
+++ b/Documentation/devicetree/bindings/sound/linux,bt-sco.yaml
@@ -13,13 +13,6 @@ allOf:
   - $ref: dai-common.yaml#
 
 properties:
-  '#sound-dai-cells':
-    enum:
-      - 0
-
-      # For Wideband PCM
-      - 1
-
   compatible:
     enum:
       - delta,dfbmcs320
diff --git a/Documentation/devicetree/bindings/sound/linux,spdif.yaml b/Documentation/devicetree/bindings/sound/linux,spdif.yaml
index aea6230db54c8..62c035b739d38 100644
--- a/Documentation/devicetree/bindings/sound/linux,spdif.yaml
+++ b/Documentation/devicetree/bindings/sound/linux,spdif.yaml
@@ -18,9 +18,6 @@ properties:
       - linux,spdif-dit
       - linux,spdif-dir
 
-  "#sound-dai-cells":
-    const: 0
-
   sound-name-prefix: true
 
   port:
@@ -30,7 +27,7 @@ required:
   - "#sound-dai-cells"
   - compatible
 
-additionalProperties: false
+unevaluatedProperties: false
 
 examples:
   - |
-- 
2.53.0


                 reply	other threads:[~2026-10-24  8:43 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=20261024084307.116715-1-clamor95@gmail.com \
    --to=clamor95@gmail.com \
    --cc=broonie@kernel.org \
    --cc=conor+dt@kernel.org \
    --cc=devicetree@vger.kernel.org \
    --cc=krzk+dt@kernel.org \
    --cc=lgirdwood@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-sound@vger.kernel.org \
    --cc=robh@kernel.org \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®