Received: by 2002:ab2:3319:0:b0:1ef:7a0f:c32d with SMTP id i25csp83158lqc; Thu, 7 Mar 2024 10:56:43 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCWx/olY8VejFWUHhBPBnlHELEez+a3VksSW1GGUN2ndx5FHBxIIr6SyYg1kIn/9cIWtqsBqO/UYy+OzxyKg/qnd4x/sDkYFkqAfkt+8Yw== X-Google-Smtp-Source: AGHT+IHItxAu/nyN5JisodH2VuEKUzyF8CbcIpihd4prU2C5kE5ZCC/3D+LLcdbaSkqASci+Csok X-Received: by 2002:a05:6a20:748b:b0:1a1:6f54:ab90 with SMTP id p11-20020a056a20748b00b001a16f54ab90mr3121948pzd.5.1709837803540; Thu, 07 Mar 2024 10:56:43 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1709837803; cv=pass; d=google.com; s=arc-20160816; b=Tlftxc7M1kUWSSsqbV+0+6vlfq16U71Xa+kfCGS2RNCQNqv56w2IpY/vephpMwYnX0 Vj8L0wGZIqhe0qEL50zqfcId8HeUFXaq0dizuPP03fiwbR0blO8c33ixHO3wy6L98o8D E620xnBXwpCCXkni4+kuoWDY9WLfjfQOXG6tF4uM97p4BNSp7frgZuH3BvhfdkhMn5rK q5TnGTDW8zQ1QXBOY0jGytsydXVIY2Re3GRTgFcZYnvhjmtmg6SY1LcfJHeXXx5fWxzE npSEjl+U+5nrhoUeObYXrAhE14Djgr91tnoijDfaDJpWEUTpUW7A8cURW7oR+7qnRLC8 d/vQ== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=in-reply-to:content-disposition:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:message-id:subject:cc :to:from:date:dkim-signature; bh=EnuSLnhErYzxNDIpyvpJWS96/M0ukT7Q5Y3UjDjLqxM=; fh=dTEQgzh+sm2gOiR7IwSWZ1Aw0tup+kKpgZG0FS+uLC4=; b=KwzH/Y6KLR6QKfHqkMQWPpmOnB/T2t3ssalq8iNlf30Wdzg/C+fP1/CDuzK35HB5Ki DlKJO34OWYyeo+6rl1a87GZj/0HPhmj/RJBaI2+VozSRIStiWRB66zT11dS+uKN4IS4O 2dcUfgyi6NIqznCgCUvFHPura4hRRv5eCvGgqK6JTmZgK99Tmyydhb7/V9SHlrDZyRBL yAPneUnVQro8ZdT22xLJ50+IBYdfUhLYJTa2KiW9XehoYocAn0VU8HCIoMxtdjI5jfzQ M7W/MHf943LA1ymRrV0Xxm1R278XFRqK3B+V+8njGd2lliNcabAixQL++PPpVxLkKDvt 74HQ==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=hbbV86UP; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-96043-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-96043-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [2604:1380:45e3:2400::1]) by mx.google.com with ESMTPS id y19-20020a056a00181300b006e64cdf09edsi4007315pfa.378.2024.03.07.10.56.43 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 07 Mar 2024 10:56:43 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-96043-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) client-ip=2604:1380:45e3:2400::1; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=hbbV86UP; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-96043-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-96043-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sv.mirrors.kernel.org (Postfix) with ESMTPS id 2C6AB2826D9 for ; Thu, 7 Mar 2024 18:56:43 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 71F48135A68; Thu, 7 Mar 2024 18:56:35 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="hbbV86UP" Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 4F6091EF13; Thu, 7 Mar 2024 18:56:33 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1709837794; cv=none; b=qEcXcta0hokXijMAl1n0OdY7cKCge/6RGDtSF3KoEn+loW2PGeOhaqG2Jva3JDMuiSETm/c+nXelqIJuaxhkBJuOYWVgkhxPNOeSkWw12IbWrKqH3YQwKW5RlJ/qoEO0CrVnHZGU9jpHG/LII1nFQG/L/wRT5AJFnnVqHpb3GPc= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1709837794; c=relaxed/simple; bh=UV0sY6h4DN51/nvSU5fsXkmxOfhwJjNehBRV4+DLeao=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=oj5xgdqVOpuVyWySFGt5QC3q87/4Bpw3G+3lIkzPva54343d9vzVyHqpg0pnK/7GXvCM/LN5ToKgX78D6+o8RGCT1QszzsRGClw/1ZXzrJwsRZqeEscSfBo8Qy1BblsVmcyfXiLg3iBwwLyYChiviW9y9xD1ueFLqFfbPy3fvps= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=hbbV86UP; arc=none smtp.client-ip=10.30.226.201 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> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="PgOaAGG3OrEgcB2K" Content-Disposition: inline In-Reply-To: --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--