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 CDA39C54E4A for ; Thu, 7 Mar 2024 18:56:48 +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-Type: List-Subscribe:List-Help:List-Post:List-Archive:List-Unsubscribe:List-Id: In-Reply-To:MIME-Version:References:Message-ID:Subject:Cc:To:From:Date: Reply-To:Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date :Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=rplKftXBg2Y1xBD9rEwwa+Azstc2bNI/FY7ncsVU6iQ=; b=wExdSXBEnTaGzuIK31iAfoqlca wj70UeG9Z0b3rYFf/bObUtQsZewFQdpbNyXyUQB0Ib/MaDimaraUds02Q5VgmfuJkaxVJGUOeTIkY prdnQ13GRUMzlCl/+gjD2b6TtaK0OErWX1hS/pxJf0E1M/V+oeWx8zXZpq+Mc5UX4OTfkwp7ow1RF 6b3kEtRdMOOGCYnXOHJb1Kworw7/bQrVrU73OhriTjO/rkVBgBMHkeVt4FtgUg4EprybBFe+IFojq oqOj9/stGzSwa37jAFEnzCbzYgOSttRLkkvlR30JCdmF5I38k7CyAqIpWrFEquGwE5vD+AIgZwfUG 3EST/JdA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1riIv1-00000005wkn-1SmJ; Thu, 07 Mar 2024 18:56:39 +0000 Received: from sin.source.kernel.org ([2604:1380:40e1:4800::1]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1riIuy-00000005wkK-1tDi for linux-arm-kernel@lists.infradead.org; Thu, 07 Mar 2024 18:56:37 +0000 Received: from smtp.kernel.org (transwarp.subspace.kernel.org [100.75.92.58]) by sin.source.kernel.org (Postfix) with ESMTP id 71458CE1A95; Thu, 7 Mar 2024 18:56:34 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 96EDAC433C7; Thu, 7 Mar 2024 18:56:30 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1709837793; bh=UV0sY6h4DN51/nvSU5fsXkmxOfhwJjNehBRV4+DLeao=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=hbbV86UP6pH8ipawLp8zXWN0pywWlB75UXWU9TDaDlEa+1dOwSKN/TpdNaBdEiTMg 9Aey8CwYWmk+QGK5RXwfVM8ujORjBVhr0nMTerKnAOVedKY/CCikIplfVF6hhQJ4ob xPUSeFFcwAZFfVQCQwT/nLDn5cnwK3TCDQF+I7J6ZJm1428odTpnDCibn6xw+jtEVN pPZFHAZ1JFfOylLbNONip02c7KTCFEdaZnqPhp3FBCwsfnYFKcAg723X/7x7FcHfCU j/gLbBa3e5ZADLyWKkky1i1BsrhclxrJQjAZCAwDhZ7P0aAqIZQV5GQReJQodgdayi iY9V1jzbgn/0g== Date: Thu, 7 Mar 2024 18:56:28 +0000 From: Conor Dooley To: Frank Li Cc: Rob Herring , Liam Girdwood , Mark Brown , Krzysztof Kozlowski , Conor Dooley , Shawn Guo , Sascha Hauer , Pengutronix Kernel Team , Fabio Estevam , Shengjiu Wang , linux-sound@vger.kernel.org, devicetree@vger.kernel.org, imx@lists.linux.dev, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH v4 3/4] ASoC: dt-bindings: fsl-sai: allow only one dma-names Message-ID: <20240307-agnostic-dyslexia-6f1da244ec58@spud> References: <20240305-asrc_8qxp-v4-0-c61b98046591@nxp.com> <20240305-asrc_8qxp-v4-3-c61b98046591@nxp.com> <20240306-pebble-grope-88fdaa95a87c@spud> <20240306205524.GB587561-robh@kernel.org> MIME-Version: 1.0 In-Reply-To: X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240307_105636_863992_DAE1D17D X-CRM114-Status: GOOD ( 37.08 ) 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: multipart/mixed; boundary="===============8838545823368982852==" Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org --===============8838545823368982852== Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="PgOaAGG3OrEgcB2K" Content-Disposition: inline --PgOaAGG3OrEgcB2K Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Wed, Mar 06, 2024 at 09:02:38PM -0500, Frank Li wrote: > On Wed, Mar 06, 2024 at 04:58:22PM -0600, Rob Herring wrote: > > On Wed, Mar 6, 2024 at 3:19=E2=80=AFPM Frank Li wrot= e: > > > > > > On Wed, Mar 06, 2024 at 02:55:24PM -0600, Rob Herring wrote: > > > > On Wed, Mar 06, 2024 at 02:25:53PM -0500, Frank Li wrote: > > > > > On Wed, Mar 06, 2024 at 06:45:13PM +0000, Conor Dooley wrote: > > > > > > On Tue, Mar 05, 2024 at 12:33:04PM -0500, Frank Li wrote: > > > > > > > Some sai only connect one direction dma (rx/tx) in SOC. For e= xample: > > > > > > > imx8qxp sai5 only connect tx dma channel. So allow only one "= rx" or "tx" > > > > > > > for dma-names. > > > > > > > > > > > > > > Remove description under dmas because no user use index to ge= t dma channel. > > > > > > > All user use 'dma-names' to get correct dma channel. dma-name= s already in > > > > > > > 'required' list. > > > > > > > > > > > > Acked-by: Conor Dooley > > > > > > > > > > > > > Signed-off-by: Frank Li > > > > > > > --- > > > > > > > Documentation/devicetree/bindings/sound/fsl,sai.yaml | 13 ++= ++++------- > > > > > > > 1 file changed, 6 insertions(+), 7 deletions(-) > > > > > > > > > > > > > > diff --git a/Documentation/devicetree/bindings/sound/fsl,sai.= yaml b/Documentation/devicetree/bindings/sound/fsl,sai.yaml > > > > > > > index 2456d958adeef..6f551c68d33db 100644 > > > > > > > --- a/Documentation/devicetree/bindings/sound/fsl,sai.yaml > > > > > > > +++ b/Documentation/devicetree/bindings/sound/fsl,sai.yaml > > > > > > > @@ -81,15 +81,14 @@ properties: > > > > > > > > > > > > > > dmas: > > > > > > > minItems: 1 > > > > > > > - items: > > > > > > > - - description: DMA controller phandle and request line= for RX > > > > > > > - - description: DMA controller phandle and request line= for TX > > > > > > > + maxItems: 2 > > > > > > > > > > > > > > dma-names: > > > > > > > - minItems: 1 > > > > > > > - items: > > > > > > > - - const: rx > > > > > > > - - const: tx > > > > > > > + oneOf: > > > > > > > + - items: > > > > > > > + - const: rx > > > > > > > + - const: tx > > > > > > > + - enum: [ rx, tx ] > > > > > > > > > > > > I'm not entirely sure if this was Rob's suggestion, I got the i= mpression > > > > > > he was suggesting that in the two items case we'd not care abou= t the > > > > > > order. But while I think this is different to that suggestion i= t's also > > > > > > not wrong. > > > > > Rob's suggest was not work. dt-binding check complain too long > > > > > if there are two dma-names =3D "rx", "tx". > > > > > > > > So I'm wrong or you didn't have it correct? No way to tell with your > > > > explanation. Let me give you the exact schema: > > > > > > > > dma-names: > > > > minItems: 1 > > > > items: > > > > - enum: [ rx, tx ] > > > > - const: tx > > > > > > > > This says we can have 1 or 2 entries. The first entry can be either= rx > > > > or tx. The 2nd entry must be tx. That's what you want. However, '"t= x", > > > > "tx"' is allowed with the above, but we enforce items to be unique > > > > elsewhere. Or I thought we did, but we relaxed '.*-names$' at some > > > > point. I'm going to fix that now. > > > > > > Conor find out my problem. The below code works. I missed maxItems. > > > > > > dma-names: > > > minItems: 1 > > > maxItems: 2 > > > items > >=20 > > Missing ':' > >=20 > > > enum: [ rx, tx ] > >=20 > > That is not my suggestion. This would be my 3rd choice after what I > > proposed or what you had already. Please plug in exactly what I told > > you and report back what doesn't work. >=20 > It also works. look likes conor's method is a little bit easy to be > understood. What I suggested is different, it is more permissive than what you have or what Rob suggested. Your original one allows "rx", "tx" OR "rx" OR "tx" Rob's allows the same but with a nicer syntax. What that stm binding I mentioned allows is "rx", "tx" OR "tx", "rx" OR "rx" OR "tx" --PgOaAGG3OrEgcB2K Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iHUEABYIAB0WIQRh246EGq/8RLhDjO14tDGHoIJi0gUCZeoN3AAKCRB4tDGHoIJi 0nd3AQCWltdW9osVlgRPEJE0ihSrSm9KZdQvqgiz22Um6H8xQQEAiKTPyYqzkfIt B4P5sXRr4dR2MsnwyKa6AX2uGt0DZQs= =CRIZ -----END PGP SIGNATURE----- --PgOaAGG3OrEgcB2K-- --===============8838545823368982852== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel --===============8838545823368982852==--