Received: by 2002:a05:6a10:af89:0:0:0:0 with SMTP id iu9csp399698pxb; Fri, 28 Jan 2022 01:26:42 -0800 (PST) X-Google-Smtp-Source: ABdhPJw02p4YDtfPqYaSEaUddYWDNPGk3Ni6R1P09gDJevd7F3RtHVpuVG4GNiMO199iqUhcPvzC X-Received: by 2002:a17:906:9b8f:: with SMTP id dd15mr6485632ejc.660.1643362002315; Fri, 28 Jan 2022 01:26:42 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1643362002; cv=none; d=google.com; s=arc-20160816; b=LdgSIi7QNLjgke6mEEjV8NerUw4FsN8Vrye8lVYiNXdpnYVz08BEunuduZIxx2Z57z yVK3qpdjqkXmX0xVADToK2cdDgZI5vqOrgem8ViCqqrrx67pfZ8dwOKOPzCsEJ+THWOt SkZyUIUVM2unhuoU0z37jXUjqJU0sydgc6zJtbqgJnVe+73oEEVj0nyMG38pfE5bgRN/ MjvgKJqWxDms/cpCrXMn3QG8HqVq7pwhWmFdB0RqiIeIaYSNNWEJYnh4tzNvrK78UaWQ rsjmVkZbyOyMvlZb4894sNCjq2YMfjE9rTpbcNVDGIEW21ZiHbK9KcSWNQTb1u6nm5t2 npew== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:message-id:in-reply-to:date:subject :cc:to:from:user-agent:references:dkim-signature; bh=dszbD2iJpZiPeHo8KU4CPZgugNBsta//XmHDun3F64c=; b=t2vhVahUnB22VJGYCkyeyRko1vK9rHgi044I+chmXnbqYvEkPzrsx4n7HAizRHOO5J 1PxEoHyIYYCmHOWPvJQqk2NWw1G6eYDGZsj0EsHQcy3y0AGOydnIqivrlNd3uN3xHCzn /4LOend1JkNSfG0NjErLOKsTSA/0gEMJL6QhG00bdpUrI/5xGp8dS0KM5sW3jjLn9PtU qGFAbM88ePMKzmYarXcYQFFMcaDBbMgu9unldqO2tTOkfUdbLz2/KmL1fxJakqK2j2AG WEAjogIfPTVSUlSbGHHokOBACGWF/Dh4WJyKHmCc1sDspJWTdP/79VBQyArHd51wJLBt x3DA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@baylibre-com.20210112.gappssmtp.com header.s=20210112 header.b=fZcrsbxT; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id j30si2681876ejo.933.2022.01.28.01.26.16; Fri, 28 Jan 2022 01:26:42 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@baylibre-com.20210112.gappssmtp.com header.s=20210112 header.b=fZcrsbxT; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S243643AbiA0QXZ (ORCPT + 99 others); Thu, 27 Jan 2022 11:23:25 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:48136 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S243642AbiA0QXX (ORCPT ); Thu, 27 Jan 2022 11:23:23 -0500 Received: from mail-wm1-x331.google.com (mail-wm1-x331.google.com [IPv6:2a00:1450:4864:20::331]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 4E1A1C061748 for ; Thu, 27 Jan 2022 08:23:23 -0800 (PST) Received: by mail-wm1-x331.google.com with SMTP id r186so410836wma.0 for ; Thu, 27 Jan 2022 08:23:23 -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=dszbD2iJpZiPeHo8KU4CPZgugNBsta//XmHDun3F64c=; b=fZcrsbxTVL6oEX16YFICUECpoqbUxOVzhN91OZM/+KQu155OI7WSTG0MiQZJgjExmx jp0sIHft9IaJptYG6xxadWut2UoUpBdZjQx5gv7u1MkTlRl1hZUMLS10XNBqLS12Kqc0 fUGz36q/7SAVtW2er4/vNtRl/IAv5P9dXGTRghcXk838xHFTh0rpWC3QJ1hL6MFMFpmZ IOudqk9T82+pKnR3a4nT1d5H50M3AZIqsuTo+VhmilYtZbr/+DsaUTUQrPVXWALYkJoQ ua9KX5MavqeNx/aTRA4/yfAgHvPRa2gKr2mV89ocCP23NjXS4WJhAaF53CwKPll5S9QB nuww== 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=dszbD2iJpZiPeHo8KU4CPZgugNBsta//XmHDun3F64c=; b=5NRliXQFx0ohY1fEE8zI5im2ocEk1hiKaGITQQ8JiCFArk2koUJJIZXSMYJFJqFHGE 4bMhFxL+Bipu2uhDvn2+nK4H2T6X56TrlEJnvckgFQJV3M5inUpuxJiLmqJpu23m8h9S e9MUZCTYxHJkjMEMvFhuldn/lnrSg6PAl3vVxN8ZNsVoyqkfU3toOGFMS9JvbQMD33Hs MOMrIRKrsDxJLfE+rKyV+NThmObsH2FzdiNULDlXK9h1eiSb4gqFbPLkGtmMC6MrzKyE RI7JRr+ab4sf5Yl4cA+ZPIRWSNNLL+bQ8EmikNO67lYRHgfFtF62gLqeMngNCl37UilG Yr6A== X-Gm-Message-State: AOAM533bhAkg9a6nljy9xzi5i9xKIoYcpJ9CDi5zCdv1ZxAo9X1586nA y8NwY/QweXwEjTSLRAdHIDn9zw== X-Received: by 2002:a1c:e914:: with SMTP id q20mr12306751wmc.89.1643300601853; Thu, 27 Jan 2022 08:23:21 -0800 (PST) Received: from localhost (82-65-169-74.subs.proxad.net. [82.65.169.74]) by smtp.gmail.com with ESMTPSA id v124sm6289832wme.30.2022.01.27.08.23.21 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 27 Jan 2022 08:23:21 -0800 (PST) References: <20220126231427.1638089-1-robh@kernel.org> <1jtudp1rc1.fsf@starbuckisacylon.baylibre.com> User-agent: mu4e 1.6.10; emacs 27.1 From: Jerome Brunet To: Rob Herring Cc: 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 , Krzysztof Kozlowski , Linux-ALSA , devicetree@vger.kernel.org, "linux-kernel@vger.kernel.org" , linux-arm-kernel , linux-arm-msm Subject: Re: [PATCH] ASoC: dt-bindings: Centralize the 'sound-dai' definition Date: Thu, 27 Jan 2022 17:20:49 +0100 In-reply-to: Message-ID: <1jlez1172f.fsf@starbuckisacylon.baylibre.com> MIME-Version: 1.0 Content-Type: text/plain Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu 27 Jan 2022 at 08:35, Rob Herring wrote: > On Thu, Jan 27, 2022 at 3:05 AM Jerome Brunet wrote: >> >> >> 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 > > What do you mean? Every 'sound-dai' there only has 1 phande+args. Each > codec is a child node. Yes it is a child - sorry I misunderstood. I thought the MaxItems: 1 would limit the number of codecs For the amlogic part: Acked-by: Jerome Brunet > > Rob