From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 4CBF6C433F5 for ; Thu, 27 Jan 2022 09:05:39 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S238176AbiA0JFi (ORCPT ); Thu, 27 Jan 2022 04:05:38 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:57150 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231985AbiA0JFh (ORCPT ); Thu, 27 Jan 2022 04:05:37 -0500 Received: from mail-wr1-x42f.google.com (mail-wr1-x42f.google.com [IPv6:2a00:1450:4864:20::42f]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 47EC2C061747 for ; Thu, 27 Jan 2022 01:05:37 -0800 (PST) Received: by mail-wr1-x42f.google.com with SMTP id v13so3397876wrv.10 for ; Thu, 27 Jan 2022 01:05:37 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=baylibre-com.20210112.gappssmtp.com; s=20210112; h=references:user-agent:from:to:cc:subject:date:in-reply-to :message-id:mime-version; bh=rjtR56dfdnTjyM6bjm66t58wWtukpooj/ecEV7qKFFU=; b=RINGYWmdOJjRmzG/N3Nc3K8o+ujsn7QBQ5I5V9tMGZRL5nET7TcPqyT9oOIOrZGDgA yjEdEZtN0UlnVj9CLMpEXhXrKEI2nbsOW6QV/zKK0aLY8mCp3fYA72DSBBdLxKzSrw6M qsw0avSCZ5aQY66yJBw3HZZ6E3iTNkLLFNwlroAXGsNcKwrO8uYutF9EscY1Dw8WB8lj 7rHCojLlMQ05VcA5jovZImiweY2YVDzKumB2r8gZB/PSSkNIp7zbiPnIywND0RKO4YvU YlRcyxCQEvjKxIQheHHNM4q5JRrRXDmqF+y04W756RgsaelM0vNFX2Yqny+wvSTdRC7g qJog== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:references:user-agent:from:to:cc:subject:date :in-reply-to:message-id:mime-version; bh=rjtR56dfdnTjyM6bjm66t58wWtukpooj/ecEV7qKFFU=; b=X1Lle9bA4/tlO0uJv/3HUhDeUzswzx5Cf3VZ7H9JJ7UAdmXMTOlkvMuXH2U/FpyfGW lk4YjJG1gVIllEX/iFoZ17Ki40h1Bx3P5/8n19jVhZVjc0oMSeIcVfFt04pO4PiDP347 cgGz2EuKMHJuirvXdo6JSYGTmEfPapfQFNBbEdDwoY9jUSHncEWjp1aGzMwMSi6OEAoi VBMGPZJXDuGdzQe4c3IJqF2TN2LPBzxt9z9JDXIZQmCeFCqt3yeDRaQctDAeuMNUg2iP KDKSeZO0UoL+WTHaSsiGOscxCKCLy2e+ZFPLE8bMJbs8JAS7coYj0fedembuzZfsWSVw d1ig== X-Gm-Message-State: AOAM5329/L5snHbO9ZWgK/jLjCwsAdw07Ofd6M92RIqZLvhbEuFIsFGT s7VwXmXsZSLZZfHqjeho5H59SA== X-Google-Smtp-Source: ABdhPJwPXj2TGvVrDtoZmyvAc/oT6t1ERUujcirvOS6XEJszUThggTk+2eO5mXwRJ/mazVI3JS/s+A== X-Received: by 2002:a5d:660b:: with SMTP id n11mr2162313wru.78.1643274335733; Thu, 27 Jan 2022 01:05:35 -0800 (PST) Received: from localhost (82-65-169-74.subs.proxad.net. [82.65.169.74]) by smtp.gmail.com with ESMTPSA id g5sm2022495wri.108.2022.01.27.01.05.34 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 27 Jan 2022 01:05:35 -0800 (PST) References: <20220126231427.1638089-1-robh@kernel.org> User-agent: mu4e 1.6.10; emacs 27.1 From: Jerome Brunet To: Rob Herring , Liam Girdwood , Mark Brown , Shawn Guo , Sascha Hauer , Pengutronix Kernel Team , Fabio Estevam , NXP Linux Team , Andy Gross , Bjorn Andersson , Krzysztof Kozlowski , Sylwester Nawrocki , Rohit kumar , Cheng-Yi Chiang , Shengjiu Wang , Srinivas Kandagatla , Jonathan Bakker Cc: Krzysztof Kozlowski , alsa-devel@alsa-project.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-arm-msm@vger.kernel.org Subject: Re: [PATCH] ASoC: dt-bindings: Centralize the 'sound-dai' definition Date: Thu, 27 Jan 2022 10:00:53 +0100 In-reply-to: <20220126231427.1638089-1-robh@kernel.org> Message-ID: <1jtudp1rc1.fsf@starbuckisacylon.baylibre.com> MIME-Version: 1.0 Content-Type: text/plain Precedence: bulk List-ID: X-Mailing-List: linux-arm-msm@vger.kernel.org On Wed 26 Jan 2022 at 17:14, Rob Herring wrote: > 'sound-dai' is a common property, but has duplicate type definitions. > Create a new common definition to define the type and then update all > the other occurrences to just define how many entries there are just > like other phandle+arg properties. > > The constraints on the number of entries is based on the examples and > could be wrong. > > Cc: Krzysztof Kozlowski > Signed-off-by: Rob Herring > --- > Please ack, this depends on commit abf0fee97313 ("dt-bindings: Improve > phandle-array schemas") in my tree. > --- > .../bindings/sound/amlogic,gx-sound-card.yaml | 4 ++-- > .../bindings/sound/google,sc7180-trogdor.yaml | 6 ++++-- > .../bindings/sound/imx-audio-card.yaml | 7 +++++-- > .../bindings/sound/qcom,sm8250.yaml | 10 +++++++--- > .../bindings/sound/samsung,aries-wm8994.yaml | 5 +---- > .../bindings/sound/samsung,midas-audio.yaml | 2 -- > .../bindings/sound/samsung,odroid.yaml | 9 +++------ > .../devicetree/bindings/sound/sound-dai.yaml | 20 +++++++++++++++++++ > 8 files changed, 42 insertions(+), 21 deletions(-) > create mode 100644 Documentation/devicetree/bindings/sound/sound-dai.yaml > > diff --git a/Documentation/devicetree/bindings/sound/amlogic,gx-sound-card.yaml b/Documentation/devicetree/bindings/sound/amlogic,gx-sound-card.yaml > index 2e35aeaa8781..8b5be4b92f35 100644 > --- a/Documentation/devicetree/bindings/sound/amlogic,gx-sound-card.yaml > +++ b/Documentation/devicetree/bindings/sound/amlogic,gx-sound-card.yaml > @@ -57,7 +57,7 @@ patternProperties: > rate > > sound-dai: > - $ref: /schemas/types.yaml#/definitions/phandle-array > + maxItems: 1 > description: phandle of the CPU DAI > > patternProperties: > @@ -71,7 +71,7 @@ patternProperties: > > properties: > sound-dai: > - $ref: /schemas/types.yaml#/definitions/phandle-array > + maxItems: 1 No min or max here. Links may have more than one codec. Ex: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/arch/arm64/boot/dts/amlogic/meson-gxl-s905x-libretech-cc.dts#n158 > description: phandle of the codec DAI > > required: > diff --git a/Documentation/devicetree/bindings/sound/google,sc7180-trogdor.yaml b/Documentation/devicetree/bindings/sound/google,sc7180-trogdor.yaml > index 837e3faa63a9..233caa0ade87 100644 > --- a/Documentation/devicetree/bindings/sound/google,sc7180-trogdor.yaml > +++ b/Documentation/devicetree/bindings/sound/google,sc7180-trogdor.yaml > @@ -62,13 +62,15 @@ patternProperties: > description: Holds subnode which indicates cpu dai. > type: object > properties: > - sound-dai: true > + sound-dai: > + maxItems: 1 > > codec: > description: Holds subnode which indicates codec dai. > type: object > properties: > - sound-dai: true > + sound-dai: > + maxItems: 1 > > required: > - link-name > diff --git a/Documentation/devicetree/bindings/sound/imx-audio-card.yaml b/Documentation/devicetree/bindings/sound/imx-audio-card.yaml > index d1816dd061cf..bb3a435722c7 100644 > --- a/Documentation/devicetree/bindings/sound/imx-audio-card.yaml > +++ b/Documentation/devicetree/bindings/sound/imx-audio-card.yaml > @@ -59,13 +59,16 @@ patternProperties: > description: Holds subnode which indicates cpu dai. > type: object > properties: > - sound-dai: true > + sound-dai: > + maxItems: 1 > > codec: > description: Holds subnode which indicates codec dai. > type: object > properties: > - sound-dai: true > + sound-dai: > + minItems: 1 > + maxItems: 2 > > fsl,mclk-equal-bclk: > description: Indicates mclk can be equal to bclk, especially for sai interface > diff --git a/Documentation/devicetree/bindings/sound/qcom,sm8250.yaml b/Documentation/devicetree/bindings/sound/qcom,sm8250.yaml > index 4bfda04b4608..4ecd4080bb96 100644 > --- a/Documentation/devicetree/bindings/sound/qcom,sm8250.yaml > +++ b/Documentation/devicetree/bindings/sound/qcom,sm8250.yaml > @@ -69,19 +69,23 @@ patternProperties: > description: Holds subnode which indicates cpu dai. > type: object > properties: > - sound-dai: true > + sound-dai: > + maxItems: 1 > > platform: > description: Holds subnode which indicates platform dai. > type: object > properties: > - sound-dai: true > + sound-dai: > + maxItems: 1 > > codec: > description: Holds subnode which indicates codec dai. > type: object > properties: > - sound-dai: true > + sound-dai: > + minItems: 1 > + maxItems: 4 > > required: > - link-name > diff --git a/Documentation/devicetree/bindings/sound/samsung,aries-wm8994.yaml b/Documentation/devicetree/bindings/sound/samsung,aries-wm8994.yaml > index eb487ed3ca3b..4ffa275b3c49 100644 > --- a/Documentation/devicetree/bindings/sound/samsung,aries-wm8994.yaml > +++ b/Documentation/devicetree/bindings/sound/samsung,aries-wm8994.yaml > @@ -27,9 +27,6 @@ properties: > sound-dai: > minItems: 2 > maxItems: 2 > - items: > - maxItems: 1 > - $ref: /schemas/types.yaml#/definitions/phandle-array > description: | > phandles to the I2S controller and bluetooth codec, > in that order > @@ -38,7 +35,7 @@ properties: > type: object > properties: > sound-dai: > - $ref: /schemas/types.yaml#/definitions/phandle-array > + maxItems: 1 > description: phandle to the WM8994 CODEC > > samsung,audio-routing: > diff --git a/Documentation/devicetree/bindings/sound/samsung,midas-audio.yaml b/Documentation/devicetree/bindings/sound/samsung,midas-audio.yaml > index 095775c598fa..ec50bcb4af5f 100644 > --- a/Documentation/devicetree/bindings/sound/samsung,midas-audio.yaml > +++ b/Documentation/devicetree/bindings/sound/samsung,midas-audio.yaml > @@ -21,7 +21,6 @@ properties: > type: object > properties: > sound-dai: > - $ref: /schemas/types.yaml#/definitions/phandle-array > maxItems: 1 > description: phandle to the I2S controller > required: > @@ -31,7 +30,6 @@ properties: > type: object > properties: > sound-dai: > - $ref: /schemas/types.yaml#/definitions/phandle-array > maxItems: 1 > description: phandle to the WM1811 CODEC > required: > diff --git a/Documentation/devicetree/bindings/sound/samsung,odroid.yaml b/Documentation/devicetree/bindings/sound/samsung,odroid.yaml > index e8122bc87362..db2513f3e168 100644 > --- a/Documentation/devicetree/bindings/sound/samsung,odroid.yaml > +++ b/Documentation/devicetree/bindings/sound/samsung,odroid.yaml > @@ -37,18 +37,15 @@ properties: > type: object > properties: > sound-dai: > - $ref: /schemas/types.yaml#/definitions/phandle-array > description: phandles to the I2S controllers > > codec: > type: object > properties: > sound-dai: > - $ref: /schemas/types.yaml#/definitions/phandle-array > - description: | > - List of phandles to the CODEC nodes, > - first entry must be corresponding to the MAX98090 CODEC and > - the second entry must be the phandle of the HDMI IP block node. > + items: > + - description: phandle of the MAX98090 CODEC > + - description: phandle of the HDMI IP block node > > samsung,audio-routing: > $ref: /schemas/types.yaml#/definitions/non-unique-string-array > diff --git a/Documentation/devicetree/bindings/sound/sound-dai.yaml b/Documentation/devicetree/bindings/sound/sound-dai.yaml > new file mode 100644 > index 000000000000..61c6f7abc4e7 > --- /dev/null > +++ b/Documentation/devicetree/bindings/sound/sound-dai.yaml > @@ -0,0 +1,20 @@ > +# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause > +%YAML 1.2 > +--- > +$id: http://devicetree.org/schemas/sound/sound-dai.yaml# > +$schema: http://devicetree.org/meta-schemas/core.yaml# > + > +title: Digital Audio Interface consumer Device Tree Bindings > + > +maintainers: > + - Rob Herring > + > +select: true > + > +properties: > + sound-dai: > + $ref: /schemas/types.yaml#/definitions/phandle-array > + description: A phandle plus args to digital audio interface provider(s) > + > +additionalProperties: true > +... From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from alsa0.perex.cz (alsa0.perex.cz [77.48.224.243]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id AFD3AC433EF for ; Thu, 27 Jan 2022 09:06:42 +0000 (UTC) Received: from alsa1.perex.cz (alsa1.perex.cz [207.180.221.201]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by alsa0.perex.cz (Postfix) with ESMTPS id EA3D31B45; Thu, 27 Jan 2022 10:05:49 +0100 (CET) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz EA3D31B45 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1643274400; bh=TTOdCV6Vj6HPhhzyPvBhUfXA8WuaTC9HKs3FqRXOYFc=; h=References:From:To:Subject:Date:In-reply-to:Cc:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From; b=HZ9DD7EOcQ1hvYAbWfQZr/FQOYJyynbyISMIPCPqPbWTiLcdJI3wym0sUFTSExKBs iqYnjMb3jDfiBNWEU1haRwyUcAaiR/kSXoOar0t9VZMIDai/JQTnZuHkL6BacW4aCP piITXpkKZQNSSngPGJXOF0ll2oVfhd8DNrBtJ55Q= Received: from alsa1.perex.cz (localhost.localdomain [127.0.0.1]) by alsa1.perex.cz (Postfix) with ESMTP id 79961F80249; Thu, 27 Jan 2022 10:05:49 +0100 (CET) Received: by alsa1.perex.cz (Postfix, from userid 50401) id C1E6EF800C9; Thu, 27 Jan 2022 10:05:45 +0100 (CET) Received: from mail-wr1-x42e.google.com (mail-wr1-x42e.google.com [IPv6:2a00:1450:4864:20::42e]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by alsa1.perex.cz (Postfix) with ESMTPS id BF083F800C9 for ; Thu, 27 Jan 2022 10:05:37 +0100 (CET) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz BF083F800C9 Authentication-Results: alsa1.perex.cz; dkim=pass (2048-bit key) header.d=baylibre-com.20210112.gappssmtp.com header.i=@baylibre-com.20210112.gappssmtp.com header.b="RINGYWmd" Received: by mail-wr1-x42e.google.com with SMTP id c23so3444031wrb.5 for ; Thu, 27 Jan 2022 01:05:37 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=baylibre-com.20210112.gappssmtp.com; s=20210112; h=references:user-agent:from:to:cc:subject:date:in-reply-to :message-id:mime-version; bh=rjtR56dfdnTjyM6bjm66t58wWtukpooj/ecEV7qKFFU=; b=RINGYWmdOJjRmzG/N3Nc3K8o+ujsn7QBQ5I5V9tMGZRL5nET7TcPqyT9oOIOrZGDgA yjEdEZtN0UlnVj9CLMpEXhXrKEI2nbsOW6QV/zKK0aLY8mCp3fYA72DSBBdLxKzSrw6M qsw0avSCZ5aQY66yJBw3HZZ6E3iTNkLLFNwlroAXGsNcKwrO8uYutF9EscY1Dw8WB8lj 7rHCojLlMQ05VcA5jovZImiweY2YVDzKumB2r8gZB/PSSkNIp7zbiPnIywND0RKO4YvU YlRcyxCQEvjKxIQheHHNM4q5JRrRXDmqF+y04W756RgsaelM0vNFX2Yqny+wvSTdRC7g qJog== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:references:user-agent:from:to:cc:subject:date :in-reply-to:message-id:mime-version; bh=rjtR56dfdnTjyM6bjm66t58wWtukpooj/ecEV7qKFFU=; b=gup8ntKbFpB5jn7dR5dxkV3SXjMdk9AW9GuNxqalxPrpxK6pAunbXbq908/oW7D/LI 38YZg5goTuT16DT1quWSo7nJau2g1sBjTs6F9EExYargV7AtK6bjf3B16qXfHfbCAzeW AxIzMX/zapMEDRVOx7rlkFf571MXVoqSqytKKMlEMXPwd1CWd0QApRYkSY+ZdslU7JvN sH4LnVIYSctwA3JXiYOEv5Z28hQryfnBd+Fwic4VmQPxGMVWJjrR5brLsYmdIhOW+DiY axb5xbkX7cvYFN3yB32XBw/3lZYC8Y3Lc2oanFDF8c4L64xt4yZwUH/Vsrvm9QbcAEA5 EhXQ== X-Gm-Message-State: AOAM533LQbTguZXOTEpDa0FDMXVJvQfXM6SVm1rCFmG4yRkB5S3f5w4U tngxLhHhMAqfokgVjRmvpzqDaQ== X-Google-Smtp-Source: ABdhPJwPXj2TGvVrDtoZmyvAc/oT6t1ERUujcirvOS6XEJszUThggTk+2eO5mXwRJ/mazVI3JS/s+A== X-Received: by 2002:a5d:660b:: with SMTP id n11mr2162313wru.78.1643274335733; Thu, 27 Jan 2022 01:05:35 -0800 (PST) Received: from localhost (82-65-169-74.subs.proxad.net. [82.65.169.74]) by smtp.gmail.com with ESMTPSA id g5sm2022495wri.108.2022.01.27.01.05.34 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 27 Jan 2022 01:05:35 -0800 (PST) References: <20220126231427.1638089-1-robh@kernel.org> User-agent: mu4e 1.6.10; emacs 27.1 From: Jerome Brunet To: Rob Herring , Liam Girdwood , Mark Brown , Shawn Guo , Sascha Hauer , Pengutronix Kernel Team , Fabio Estevam , NXP Linux Team , Andy Gross , Bjorn Andersson , Krzysztof Kozlowski , Sylwester Nawrocki , Rohit kumar , Cheng-Yi Chiang , Shengjiu Wang , Srinivas Kandagatla , Jonathan Bakker Subject: Re: [PATCH] ASoC: dt-bindings: Centralize the 'sound-dai' definition Date: Thu, 27 Jan 2022 10:00:53 +0100 In-reply-to: <20220126231427.1638089-1-robh@kernel.org> Message-ID: <1jtudp1rc1.fsf@starbuckisacylon.baylibre.com> MIME-Version: 1.0 Content-Type: text/plain Cc: devicetree@vger.kernel.org, alsa-devel@alsa-project.org, linux-arm-msm@vger.kernel.org, linux-kernel@vger.kernel.org, Krzysztof Kozlowski , linux-arm-kernel@lists.infradead.org X-BeenThere: alsa-devel@alsa-project.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: "Alsa-devel mailing list for ALSA developers - http://www.alsa-project.org" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: alsa-devel-bounces@alsa-project.org Sender: "Alsa-devel" On Wed 26 Jan 2022 at 17:14, Rob Herring wrote: > 'sound-dai' is a common property, but has duplicate type definitions. > Create a new common definition to define the type and then update all > the other occurrences to just define how many entries there are just > like other phandle+arg properties. > > The constraints on the number of entries is based on the examples and > could be wrong. > > Cc: Krzysztof Kozlowski > Signed-off-by: Rob Herring > --- > Please ack, this depends on commit abf0fee97313 ("dt-bindings: Improve > phandle-array schemas") in my tree. > --- > .../bindings/sound/amlogic,gx-sound-card.yaml | 4 ++-- > .../bindings/sound/google,sc7180-trogdor.yaml | 6 ++++-- > .../bindings/sound/imx-audio-card.yaml | 7 +++++-- > .../bindings/sound/qcom,sm8250.yaml | 10 +++++++--- > .../bindings/sound/samsung,aries-wm8994.yaml | 5 +---- > .../bindings/sound/samsung,midas-audio.yaml | 2 -- > .../bindings/sound/samsung,odroid.yaml | 9 +++------ > .../devicetree/bindings/sound/sound-dai.yaml | 20 +++++++++++++++++++ > 8 files changed, 42 insertions(+), 21 deletions(-) > create mode 100644 Documentation/devicetree/bindings/sound/sound-dai.yaml > > diff --git a/Documentation/devicetree/bindings/sound/amlogic,gx-sound-card.yaml b/Documentation/devicetree/bindings/sound/amlogic,gx-sound-card.yaml > index 2e35aeaa8781..8b5be4b92f35 100644 > --- a/Documentation/devicetree/bindings/sound/amlogic,gx-sound-card.yaml > +++ b/Documentation/devicetree/bindings/sound/amlogic,gx-sound-card.yaml > @@ -57,7 +57,7 @@ patternProperties: > rate > > sound-dai: > - $ref: /schemas/types.yaml#/definitions/phandle-array > + maxItems: 1 > description: phandle of the CPU DAI > > patternProperties: > @@ -71,7 +71,7 @@ patternProperties: > > properties: > sound-dai: > - $ref: /schemas/types.yaml#/definitions/phandle-array > + maxItems: 1 No min or max here. Links may have more than one codec. Ex: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/arch/arm64/boot/dts/amlogic/meson-gxl-s905x-libretech-cc.dts#n158 > description: phandle of the codec DAI > > required: > diff --git a/Documentation/devicetree/bindings/sound/google,sc7180-trogdor.yaml b/Documentation/devicetree/bindings/sound/google,sc7180-trogdor.yaml > index 837e3faa63a9..233caa0ade87 100644 > --- a/Documentation/devicetree/bindings/sound/google,sc7180-trogdor.yaml > +++ b/Documentation/devicetree/bindings/sound/google,sc7180-trogdor.yaml > @@ -62,13 +62,15 @@ patternProperties: > description: Holds subnode which indicates cpu dai. > type: object > properties: > - sound-dai: true > + sound-dai: > + maxItems: 1 > > codec: > description: Holds subnode which indicates codec dai. > type: object > properties: > - sound-dai: true > + sound-dai: > + maxItems: 1 > > required: > - link-name > diff --git a/Documentation/devicetree/bindings/sound/imx-audio-card.yaml b/Documentation/devicetree/bindings/sound/imx-audio-card.yaml > index d1816dd061cf..bb3a435722c7 100644 > --- a/Documentation/devicetree/bindings/sound/imx-audio-card.yaml > +++ b/Documentation/devicetree/bindings/sound/imx-audio-card.yaml > @@ -59,13 +59,16 @@ patternProperties: > description: Holds subnode which indicates cpu dai. > type: object > properties: > - sound-dai: true > + sound-dai: > + maxItems: 1 > > codec: > description: Holds subnode which indicates codec dai. > type: object > properties: > - sound-dai: true > + sound-dai: > + minItems: 1 > + maxItems: 2 > > fsl,mclk-equal-bclk: > description: Indicates mclk can be equal to bclk, especially for sai interface > diff --git a/Documentation/devicetree/bindings/sound/qcom,sm8250.yaml b/Documentation/devicetree/bindings/sound/qcom,sm8250.yaml > index 4bfda04b4608..4ecd4080bb96 100644 > --- a/Documentation/devicetree/bindings/sound/qcom,sm8250.yaml > +++ b/Documentation/devicetree/bindings/sound/qcom,sm8250.yaml > @@ -69,19 +69,23 @@ patternProperties: > description: Holds subnode which indicates cpu dai. > type: object > properties: > - sound-dai: true > + sound-dai: > + maxItems: 1 > > platform: > description: Holds subnode which indicates platform dai. > type: object > properties: > - sound-dai: true > + sound-dai: > + maxItems: 1 > > codec: > description: Holds subnode which indicates codec dai. > type: object > properties: > - sound-dai: true > + sound-dai: > + minItems: 1 > + maxItems: 4 > > required: > - link-name > diff --git a/Documentation/devicetree/bindings/sound/samsung,aries-wm8994.yaml b/Documentation/devicetree/bindings/sound/samsung,aries-wm8994.yaml > index eb487ed3ca3b..4ffa275b3c49 100644 > --- a/Documentation/devicetree/bindings/sound/samsung,aries-wm8994.yaml > +++ b/Documentation/devicetree/bindings/sound/samsung,aries-wm8994.yaml > @@ -27,9 +27,6 @@ properties: > sound-dai: > minItems: 2 > maxItems: 2 > - items: > - maxItems: 1 > - $ref: /schemas/types.yaml#/definitions/phandle-array > description: | > phandles to the I2S controller and bluetooth codec, > in that order > @@ -38,7 +35,7 @@ properties: > type: object > properties: > sound-dai: > - $ref: /schemas/types.yaml#/definitions/phandle-array > + maxItems: 1 > description: phandle to the WM8994 CODEC > > samsung,audio-routing: > diff --git a/Documentation/devicetree/bindings/sound/samsung,midas-audio.yaml b/Documentation/devicetree/bindings/sound/samsung,midas-audio.yaml > index 095775c598fa..ec50bcb4af5f 100644 > --- a/Documentation/devicetree/bindings/sound/samsung,midas-audio.yaml > +++ b/Documentation/devicetree/bindings/sound/samsung,midas-audio.yaml > @@ -21,7 +21,6 @@ properties: > type: object > properties: > sound-dai: > - $ref: /schemas/types.yaml#/definitions/phandle-array > maxItems: 1 > description: phandle to the I2S controller > required: > @@ -31,7 +30,6 @@ properties: > type: object > properties: > sound-dai: > - $ref: /schemas/types.yaml#/definitions/phandle-array > maxItems: 1 > description: phandle to the WM1811 CODEC > required: > diff --git a/Documentation/devicetree/bindings/sound/samsung,odroid.yaml b/Documentation/devicetree/bindings/sound/samsung,odroid.yaml > index e8122bc87362..db2513f3e168 100644 > --- a/Documentation/devicetree/bindings/sound/samsung,odroid.yaml > +++ b/Documentation/devicetree/bindings/sound/samsung,odroid.yaml > @@ -37,18 +37,15 @@ properties: > type: object > properties: > sound-dai: > - $ref: /schemas/types.yaml#/definitions/phandle-array > description: phandles to the I2S controllers > > codec: > type: object > properties: > sound-dai: > - $ref: /schemas/types.yaml#/definitions/phandle-array > - description: | > - List of phandles to the CODEC nodes, > - first entry must be corresponding to the MAX98090 CODEC and > - the second entry must be the phandle of the HDMI IP block node. > + items: > + - description: phandle of the MAX98090 CODEC > + - description: phandle of the HDMI IP block node > > samsung,audio-routing: > $ref: /schemas/types.yaml#/definitions/non-unique-string-array > diff --git a/Documentation/devicetree/bindings/sound/sound-dai.yaml b/Documentation/devicetree/bindings/sound/sound-dai.yaml > new file mode 100644 > index 000000000000..61c6f7abc4e7 > --- /dev/null > +++ b/Documentation/devicetree/bindings/sound/sound-dai.yaml > @@ -0,0 +1,20 @@ > +# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause > +%YAML 1.2 > +--- > +$id: http://devicetree.org/schemas/sound/sound-dai.yaml# > +$schema: http://devicetree.org/meta-schemas/core.yaml# > + > +title: Digital Audio Interface consumer Device Tree Bindings > + > +maintainers: > + - Rob Herring > + > +select: true > + > +properties: > + sound-dai: > + $ref: /schemas/types.yaml#/definitions/phandle-array > + description: A phandle plus args to digital audio interface provider(s) > + > +additionalProperties: true > +... From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 0A42EC433F5 for ; Thu, 27 Jan 2022 09:07:00 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:Message-ID:In-reply-to: Date:Subject:Cc:To:From:References:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=TinVXdp6xwmzLm9rHPo0118CbKZ1B7TL6EVGU2XRyt8=; b=bkTFmDGYcGlQeQ y/6QPcqdu6Esd8XdqnvdhPHzNfStHyRIADV8nkgwRWJIwZ3eV/KsOIpIwXAsrPSQyXVtxwCI4JiMl q+OSCWrxZvDbI0f2L0abAVmb0EnNnLp0S7i7JMgNVq9PxXGonlrQ1JlMZZcSCI/UOwDJBfWezjPy8 v5LcnVgjXcQdLlXq4DeY6WUCpVUAQK+F4x5lKL5mBCaRHtutGkBb2clXMRlfThc77T+RzEutSqFxb bqqu7B6rYNNxkzY5HDdrKep9pSMQGbQcfCQExKQlNif8d1IpUmtix8+3PAt+dV3u8+M7ixJqufwR6 Xm6CE+bKNejzFgPkHv8w==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1nD0is-00EnwQ-1M; Thu, 27 Jan 2022 09:05:42 +0000 Received: from mail-wr1-x434.google.com ([2a00:1450:4864:20::434]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1nD0in-00Enuy-MN for linux-arm-kernel@lists.infradead.org; Thu, 27 Jan 2022 09:05:40 +0000 Received: by mail-wr1-x434.google.com with SMTP id e2so3477029wra.2 for ; Thu, 27 Jan 2022 01:05:36 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=baylibre-com.20210112.gappssmtp.com; s=20210112; h=references:user-agent:from:to:cc:subject:date:in-reply-to :message-id:mime-version; bh=rjtR56dfdnTjyM6bjm66t58wWtukpooj/ecEV7qKFFU=; b=RINGYWmdOJjRmzG/N3Nc3K8o+ujsn7QBQ5I5V9tMGZRL5nET7TcPqyT9oOIOrZGDgA yjEdEZtN0UlnVj9CLMpEXhXrKEI2nbsOW6QV/zKK0aLY8mCp3fYA72DSBBdLxKzSrw6M qsw0avSCZ5aQY66yJBw3HZZ6E3iTNkLLFNwlroAXGsNcKwrO8uYutF9EscY1Dw8WB8lj 7rHCojLlMQ05VcA5jovZImiweY2YVDzKumB2r8gZB/PSSkNIp7zbiPnIywND0RKO4YvU YlRcyxCQEvjKxIQheHHNM4q5JRrRXDmqF+y04W756RgsaelM0vNFX2Yqny+wvSTdRC7g qJog== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:references:user-agent:from:to:cc:subject:date :in-reply-to:message-id:mime-version; bh=rjtR56dfdnTjyM6bjm66t58wWtukpooj/ecEV7qKFFU=; b=At6+gbZ/VErDhR0JGVt9apKACzZIPe30GeVzUYuN1N0KW0diYnxswj165NDUjQ6Tkc F8JGVNIebtbXV8AIG/StYSn9iNZIN2/UL5xvw48om+DcBmc0eoljomQ7aK1YRoGHVu1i V3OYpIG4dxPE17QnVX5sxjcCHyWqilp0YqTYM9LBbk4M7TdHw3LIobUv6H10pC6496S3 +S2UQhY96Jr/Evq+VZbobCgPrmqrjId241ZCREVMRZ7OZ1SwYmOTozFwhACLMCy2daF/ Y6sgNQG0gSTo7cwUWwz8Gohk0MW/Aj9opBzl7eQBZ985LiTWyBN6vI1cw6tsIRnghxHe 2Bzg== X-Gm-Message-State: AOAM532kH36Q+TFQrTs9Wd6qpSbSUP2ViUZnPk3WpCWamNJn1ZiKR6HX JbGP5LIR+5RoOTPpTdwaEIY4bQ== X-Google-Smtp-Source: ABdhPJwPXj2TGvVrDtoZmyvAc/oT6t1ERUujcirvOS6XEJszUThggTk+2eO5mXwRJ/mazVI3JS/s+A== X-Received: by 2002:a5d:660b:: with SMTP id n11mr2162313wru.78.1643274335733; Thu, 27 Jan 2022 01:05:35 -0800 (PST) Received: from localhost (82-65-169-74.subs.proxad.net. [82.65.169.74]) by smtp.gmail.com with ESMTPSA id g5sm2022495wri.108.2022.01.27.01.05.34 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 27 Jan 2022 01:05:35 -0800 (PST) References: <20220126231427.1638089-1-robh@kernel.org> User-agent: mu4e 1.6.10; emacs 27.1 From: Jerome Brunet To: Rob Herring , Liam Girdwood , Mark Brown , Shawn Guo , Sascha Hauer , Pengutronix Kernel Team , Fabio Estevam , NXP Linux Team , Andy Gross , Bjorn Andersson , Krzysztof Kozlowski , Sylwester Nawrocki , Rohit kumar , Cheng-Yi Chiang , Shengjiu Wang , Srinivas Kandagatla , Jonathan Bakker Cc: Krzysztof Kozlowski , alsa-devel@alsa-project.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-arm-msm@vger.kernel.org Subject: Re: [PATCH] ASoC: dt-bindings: Centralize the 'sound-dai' definition Date: Thu, 27 Jan 2022 10:00:53 +0100 In-reply-to: <20220126231427.1638089-1-robh@kernel.org> Message-ID: <1jtudp1rc1.fsf@starbuckisacylon.baylibre.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220127_010537_832662_7A78F47E X-CRM114-Status: GOOD ( 24.13 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org On Wed 26 Jan 2022 at 17:14, Rob Herring wrote: > 'sound-dai' is a common property, but has duplicate type definitions. > Create a new common definition to define the type and then update all > the other occurrences to just define how many entries there are just > like other phandle+arg properties. > > The constraints on the number of entries is based on the examples and > could be wrong. > > Cc: Krzysztof Kozlowski > Signed-off-by: Rob Herring > --- > Please ack, this depends on commit abf0fee97313 ("dt-bindings: Improve > phandle-array schemas") in my tree. > --- > .../bindings/sound/amlogic,gx-sound-card.yaml | 4 ++-- > .../bindings/sound/google,sc7180-trogdor.yaml | 6 ++++-- > .../bindings/sound/imx-audio-card.yaml | 7 +++++-- > .../bindings/sound/qcom,sm8250.yaml | 10 +++++++--- > .../bindings/sound/samsung,aries-wm8994.yaml | 5 +---- > .../bindings/sound/samsung,midas-audio.yaml | 2 -- > .../bindings/sound/samsung,odroid.yaml | 9 +++------ > .../devicetree/bindings/sound/sound-dai.yaml | 20 +++++++++++++++++++ > 8 files changed, 42 insertions(+), 21 deletions(-) > create mode 100644 Documentation/devicetree/bindings/sound/sound-dai.yaml > > diff --git a/Documentation/devicetree/bindings/sound/amlogic,gx-sound-card.yaml b/Documentation/devicetree/bindings/sound/amlogic,gx-sound-card.yaml > index 2e35aeaa8781..8b5be4b92f35 100644 > --- a/Documentation/devicetree/bindings/sound/amlogic,gx-sound-card.yaml > +++ b/Documentation/devicetree/bindings/sound/amlogic,gx-sound-card.yaml > @@ -57,7 +57,7 @@ patternProperties: > rate > > sound-dai: > - $ref: /schemas/types.yaml#/definitions/phandle-array > + maxItems: 1 > description: phandle of the CPU DAI > > patternProperties: > @@ -71,7 +71,7 @@ patternProperties: > > properties: > sound-dai: > - $ref: /schemas/types.yaml#/definitions/phandle-array > + maxItems: 1 No min or max here. Links may have more than one codec. Ex: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/arch/arm64/boot/dts/amlogic/meson-gxl-s905x-libretech-cc.dts#n158 > description: phandle of the codec DAI > > required: > diff --git a/Documentation/devicetree/bindings/sound/google,sc7180-trogdor.yaml b/Documentation/devicetree/bindings/sound/google,sc7180-trogdor.yaml > index 837e3faa63a9..233caa0ade87 100644 > --- a/Documentation/devicetree/bindings/sound/google,sc7180-trogdor.yaml > +++ b/Documentation/devicetree/bindings/sound/google,sc7180-trogdor.yaml > @@ -62,13 +62,15 @@ patternProperties: > description: Holds subnode which indicates cpu dai. > type: object > properties: > - sound-dai: true > + sound-dai: > + maxItems: 1 > > codec: > description: Holds subnode which indicates codec dai. > type: object > properties: > - sound-dai: true > + sound-dai: > + maxItems: 1 > > required: > - link-name > diff --git a/Documentation/devicetree/bindings/sound/imx-audio-card.yaml b/Documentation/devicetree/bindings/sound/imx-audio-card.yaml > index d1816dd061cf..bb3a435722c7 100644 > --- a/Documentation/devicetree/bindings/sound/imx-audio-card.yaml > +++ b/Documentation/devicetree/bindings/sound/imx-audio-card.yaml > @@ -59,13 +59,16 @@ patternProperties: > description: Holds subnode which indicates cpu dai. > type: object > properties: > - sound-dai: true > + sound-dai: > + maxItems: 1 > > codec: > description: Holds subnode which indicates codec dai. > type: object > properties: > - sound-dai: true > + sound-dai: > + minItems: 1 > + maxItems: 2 > > fsl,mclk-equal-bclk: > description: Indicates mclk can be equal to bclk, especially for sai interface > diff --git a/Documentation/devicetree/bindings/sound/qcom,sm8250.yaml b/Documentation/devicetree/bindings/sound/qcom,sm8250.yaml > index 4bfda04b4608..4ecd4080bb96 100644 > --- a/Documentation/devicetree/bindings/sound/qcom,sm8250.yaml > +++ b/Documentation/devicetree/bindings/sound/qcom,sm8250.yaml > @@ -69,19 +69,23 @@ patternProperties: > description: Holds subnode which indicates cpu dai. > type: object > properties: > - sound-dai: true > + sound-dai: > + maxItems: 1 > > platform: > description: Holds subnode which indicates platform dai. > type: object > properties: > - sound-dai: true > + sound-dai: > + maxItems: 1 > > codec: > description: Holds subnode which indicates codec dai. > type: object > properties: > - sound-dai: true > + sound-dai: > + minItems: 1 > + maxItems: 4 > > required: > - link-name > diff --git a/Documentation/devicetree/bindings/sound/samsung,aries-wm8994.yaml b/Documentation/devicetree/bindings/sound/samsung,aries-wm8994.yaml > index eb487ed3ca3b..4ffa275b3c49 100644 > --- a/Documentation/devicetree/bindings/sound/samsung,aries-wm8994.yaml > +++ b/Documentation/devicetree/bindings/sound/samsung,aries-wm8994.yaml > @@ -27,9 +27,6 @@ properties: > sound-dai: > minItems: 2 > maxItems: 2 > - items: > - maxItems: 1 > - $ref: /schemas/types.yaml#/definitions/phandle-array > description: | > phandles to the I2S controller and bluetooth codec, > in that order > @@ -38,7 +35,7 @@ properties: > type: object > properties: > sound-dai: > - $ref: /schemas/types.yaml#/definitions/phandle-array > + maxItems: 1 > description: phandle to the WM8994 CODEC > > samsung,audio-routing: > diff --git a/Documentation/devicetree/bindings/sound/samsung,midas-audio.yaml b/Documentation/devicetree/bindings/sound/samsung,midas-audio.yaml > index 095775c598fa..ec50bcb4af5f 100644 > --- a/Documentation/devicetree/bindings/sound/samsung,midas-audio.yaml > +++ b/Documentation/devicetree/bindings/sound/samsung,midas-audio.yaml > @@ -21,7 +21,6 @@ properties: > type: object > properties: > sound-dai: > - $ref: /schemas/types.yaml#/definitions/phandle-array > maxItems: 1 > description: phandle to the I2S controller > required: > @@ -31,7 +30,6 @@ properties: > type: object > properties: > sound-dai: > - $ref: /schemas/types.yaml#/definitions/phandle-array > maxItems: 1 > description: phandle to the WM1811 CODEC > required: > diff --git a/Documentation/devicetree/bindings/sound/samsung,odroid.yaml b/Documentation/devicetree/bindings/sound/samsung,odroid.yaml > index e8122bc87362..db2513f3e168 100644 > --- a/Documentation/devicetree/bindings/sound/samsung,odroid.yaml > +++ b/Documentation/devicetree/bindings/sound/samsung,odroid.yaml > @@ -37,18 +37,15 @@ properties: > type: object > properties: > sound-dai: > - $ref: /schemas/types.yaml#/definitions/phandle-array > description: phandles to the I2S controllers > > codec: > type: object > properties: > sound-dai: > - $ref: /schemas/types.yaml#/definitions/phandle-array > - description: | > - List of phandles to the CODEC nodes, > - first entry must be corresponding to the MAX98090 CODEC and > - the second entry must be the phandle of the HDMI IP block node. > + items: > + - description: phandle of the MAX98090 CODEC > + - description: phandle of the HDMI IP block node > > samsung,audio-routing: > $ref: /schemas/types.yaml#/definitions/non-unique-string-array > diff --git a/Documentation/devicetree/bindings/sound/sound-dai.yaml b/Documentation/devicetree/bindings/sound/sound-dai.yaml > new file mode 100644 > index 000000000000..61c6f7abc4e7 > --- /dev/null > +++ b/Documentation/devicetree/bindings/sound/sound-dai.yaml > @@ -0,0 +1,20 @@ > +# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause > +%YAML 1.2 > +--- > +$id: http://devicetree.org/schemas/sound/sound-dai.yaml# > +$schema: http://devicetree.org/meta-schemas/core.yaml# > + > +title: Digital Audio Interface consumer Device Tree Bindings > + > +maintainers: > + - Rob Herring > + > +select: true > + > +properties: > + sound-dai: > + $ref: /schemas/types.yaml#/definitions/phandle-array > + description: A phandle plus args to digital audio interface provider(s) > + > +additionalProperties: true > +... _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel