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 30037C5478C for ; Mon, 4 Mar 2024 14:56:59 +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:In-Reply-To:MIME-Version:References: Message-ID:Subject:Cc:To:From:Date:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=pXxJLdRzNqbaxgzFNeDTr4qZ7KxE9k/e3s4i3Rk7KqA=; b=vTFQ/1P8C/tIL8 9Xh1wKkNgrQnRQd/mjwT+ZYDlSto1ilBvTWIzkxAeV+JxAcSy47cFdyqteoaDzwjoKhs36qDGoWYz EGa7hW+T65S+HzNFU2nXERs1ybkjRkmeLjtFgCPbBoUTQCso+a29xgd0qQIAXC85d2AwD89KhAHmC kMqGCaO98l9L39ipX2OsYCkpjrV5YHJ1GFHvTK9WB+O6C4UAax8oo+MybyHd0doI4OoRuhz77nDSD vaxHJJj6pBKNx0I4u5vT7mgDNyw0dWoo2KN6nYpZA+JLPZPw4iUiGwrEXFjt0XbjPdNwqtTyCzkFa HfBVjoYowZESC1ZIyRmA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1rh9kF-00000009RwT-0bQr; Mon, 04 Mar 2024 14:56:47 +0000 Received: from sin.source.kernel.org ([145.40.73.55]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1rh9kC-00000009Rvz-1Q3D for linux-arm-kernel@lists.infradead.org; Mon, 04 Mar 2024 14:56:46 +0000 Received: from smtp.kernel.org (transwarp.subspace.kernel.org [100.75.92.58]) by sin.source.kernel.org (Postfix) with ESMTP id CDC36CE12B3; Mon, 4 Mar 2024 14:56:41 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id D7440C433F1; Mon, 4 Mar 2024 14:56:40 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1709564201; bh=N/D0uIgUoOHQbPkMuf10uhOf+id1XoY9SIa7oMOVSmY=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=WDnGKJt3xItxvEa0PiLVh12+82cJgVgXwveOA+wnpP/PEZKamKXXshOplx+gs3WlF DXTCsYzfyYWjb2Rgope+1O1VMf8p0uYrekDXoxXQhJyhKG7yYtNTgUySEJYbLfTkW3 IOiMLdJuo/L02ua0vafERU8mNq8Q/gc4gxWld7cPQclmiqSKGQyxQdfo/ysJGgAI9N qICBP06ZaYxf+YPshrIBxy9dOeFW/y8bWgoXlQhMtkRygtEJai6R4/N9MvUL0HJfdk qfGrJm3LiazTIiov9vb/UiJaZ8AIXGFhuYXE2marQamhb7tcN87bxSoYETAk1hsbAM jjlWOv3U5cEdQ== Date: Mon, 4 Mar 2024 08:56:38 -0600 From: Rob Herring To: Frank Li Cc: Krzysztof Kozlowski , 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 v3 2/4] ASoC: dt-bindings: fsl,imx-asrc: update max interrupt numbers Message-ID: <20240304145638.GA198680-robh@kernel.org> References: <20240228-asrc_8qxp-v3-0-d4d5935fd3aa@nxp.com> <20240228-asrc_8qxp-v3-2-d4d5935fd3aa@nxp.com> <3460ecc8-d7d7-4d1c-ad0c-b32efc3b9049@linaro.org> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240304_065644_833673_ABA183C8 X-CRM114-Status: GOOD ( 18.30 ) 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 Fri, Mar 01, 2024 at 10:39:43AM -0500, Frank Li wrote: > On Fri, Mar 01, 2024 at 07:30:45AM +0100, Krzysztof Kozlowski wrote: > > On 01/03/2024 05:03, Frank Li wrote: > > > On Thu, Feb 29, 2024 at 10:44:42AM +0100, Krzysztof Kozlowski wrote: > > >> On 28/02/2024 20:14, Frank Li wrote: > > >>> fsl,imx8qxp-spdif and fsl,imx8qm-spdif have 2 interrupts. Other platforms > > >>> have 1 interrupt. > > >>> > > >>> Increase max interrupt number to 2 and add restriction for platforms except > > >>> i.MX8QXP and i.MX8QM. > > >>> > > >>> Signed-off-by: Frank Li > > >>> --- > > >>> .../devicetree/bindings/sound/fsl,spdif.yaml | 20 +++++++++++++++++++- > > >>> 1 file changed, 19 insertions(+), 1 deletion(-) > > >>> > > >>> diff --git a/Documentation/devicetree/bindings/sound/fsl,spdif.yaml b/Documentation/devicetree/bindings/sound/fsl,spdif.yaml > > >>> index 82430f1d5e5a2..785f7997eea82 100644 > > >>> --- a/Documentation/devicetree/bindings/sound/fsl,spdif.yaml > > >>> +++ b/Documentation/devicetree/bindings/sound/fsl,spdif.yaml > > >>> @@ -31,7 +31,8 @@ properties: > > >>> maxItems: 1 > > >>> > > >>> interrupts: > > >>> - maxItems: 1 > > >>> + minItems: 1 > > >>> + maxItems: 2 > > >>> > > >>> dmas: > > >>> items: > > >>> @@ -100,6 +101,23 @@ required: > > >>> > > >>> additionalProperties: false > > >>> > > >>> +allOf: > > >>> + - if: > > >>> + properties: > > >>> + compatible: > > >>> + enum: > > >>> + - fsl,imx35-spdif > > >>> + - fsl,vf610-spdif > > >>> + - fsl,imx6sx-spdif > > >>> + - fsl,imx8mq-spdif > > >>> + - fsl,imx8mm-spdif > > >>> + - fsl,imx8mn-spdif > > >>> + - fsl,imx8ulp-spdif > > >>> + then: > > >>> + properties: > > >>> + interrupts: > > >>> + maxItems: 1 > > >> > > >> else: > > >> minItems: 2 > > > > > > I think needn't 'else' here. Top have set to maxItems is 2. > > > > So explain why one item is correct here. > > Top interrupt: maxItems: 2. That's means all compatible string (include > imx8qxp, and imx8qm) required interrrupt number less than 2. You said: "fsl,imx8qxp-spdif and fsl,imx8qm-spdif have 2 interrupts" That means they have *exactly* 2 interrupts, not <= 2 interrupts. The top level says you have 1 or 2. Somewhere you have to say it's always 2 interrupts which is what Krzysztof provided. Or you need to explain why the 2nd interrupt is optional for fsl,imx8qxp-spdif and fsl,imx8qm-spdif. Actually, I'd reverse the if/then to have shorter list: if: properties: compatible: enum: - fsl,imx8qm-spdif - fsl,imx8qxp-spdif then: properties: interrupts: minItems: 2 else: properties: interrupts: maxItems: 1 Rob _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel