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 4408DC48BC4 for ; Tue, 20 Feb 2024 19:33:15 +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:Cc: List-Subscribe:List-Help:List-Post:List-Archive:List-Unsubscribe:List-Id: In-Reply-To:MIME-Version:References:Message-ID:Subject: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=CvQKALfAuuxHeCL4x1Tokw53nTJf5i+dXo2WjbZtKNk=; b=UKGFwXyQLlh3jG6i3+lqnhEVkn F8MCiW5hoXTCk1Q9rM7g+Z+gudHFxUfL4O6vVMYfwy7X9d+GLFUWaLkY7iXmqaQwGv41D7EULrjDV zlof0iNSi5AbX6Z0C7b1uVW2tqZR7GXz/soO0oxdSuIuNh90V74pNpSxDKIaxL+eoPmCJdjoawyuU hFwo7LGkdgycuruU32HE8EEynkgpGdM3+vmcGT13O1zmaCnjiSBwr/i84b+kWebCgh8/JVb5lv1Mg Xo7eAlRJZykURAoi116wGXW2TusFJDV3TStWCqwgx4b7vUJMMLFCRyd7G1G/q3fiq28FYakpiR7yr 8oVuA8FA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1rcVrV-0000000FyKP-05gh; Tue, 20 Feb 2024 19:33:05 +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 1rcVrQ-0000000FyIw-3b2C for linux-arm-kernel@lists.infradead.org; Tue, 20 Feb 2024 19:33:03 +0000 Received: from smtp.kernel.org (transwarp.subspace.kernel.org [100.75.92.58]) by sin.source.kernel.org (Postfix) with ESMTP id 3ACE7CE1B18; Tue, 20 Feb 2024 19:32:59 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 315CAC433F1; Tue, 20 Feb 2024 19:32:56 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1708457578; bh=oh3mnkgCiDFEq+VN0OlXRtz7LZpJZL9+ukyJd0pym7c=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=tD5Wzn2WfXP4QmxHXbXUwRvuJE+2tpeXaIi1RCGdvYReWLwCjVoWRfQxgjutp6ZE/ B1sQlivkpTLjoCBjxsgIHdsxq4TNLxmmXxGN6kHIG1XT1ocOZXquCrMXEVUE0cOX86 AFXvm0Vdc2gGAWxRCdh7ztBNtULtFzumG6/Q6fk6sws5b9Op+FzqON4OTUn2HtMcDL ur7sI/QLuI1N9QM0ADdl+QDKBtAS0BoR9lYhUMYS6ZzRHUqjNijMu9hp9btvEbiPGD jtsKDQkw6D2YI5k25Pj2rlyF6VIlv/XTDBsL13vpnaREOnQCvTpUkgy1GlgFPGFbDW olP/ZJFPMT5uw== Date: Tue, 20 Feb 2024 19:32:53 +0000 From: Conor Dooley To: Dharma.B@microchip.com Subject: Re: [PATCH v2] dt-bindings: interrupt-controller: Convert Atmel AIC to json-schema Message-ID: <20240220-carmaker-subprime-112c44f4f2e6@spud> References: <20240209100122.61335-1-dharma.b@microchip.com> <20240212140824.GA107736-robh@kernel.org> <003d61c9-b914-4e1c-b3f8-1140ea640039@microchip.com> <20240213-estranged-charger-bf0372f367e0@spud> MIME-Version: 1.0 In-Reply-To: X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240220_113301_275267_A712E1DE X-CRM114-Status: GOOD ( 20.58 ) 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: , Cc: robh@kernel.org, alexandre.belloni@bootlin.com, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, conor+dt@kernel.org, krzysztof.kozlowski+dt@linaro.org, claudiu.beznea@tuxon.dev, tglx@linutronix.de, linux-arm-kernel@lists.infradead.org Content-Type: multipart/mixed; boundary="===============1620071869624437662==" Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org --===============1620071869624437662== Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="oixT++1NaGaSoyb2" Content-Disposition: inline --oixT++1NaGaSoyb2 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Mon, Feb 19, 2024 at 03:30:52PM +0000, Dharma.B@microchip.com wrote: > Hi Rob and Conor, >=20 > On 14/02/24 12:43 am, Conor Dooley wrote: > > On Tue, Feb 13, 2024 at 04:23:36AM +0000,Dharma.B@microchip.com wrote: > >> On 12/02/24 7:38 pm, Rob Herring wrote: > >>> On Fri, Feb 09, 2024 at 03:31:22PM +0530, Dharma Balasubiramani wrote: > >>>> + atmel,external-irqs: > >>>> + $ref: /schemas/types.yaml#/definitions/uint32-array > >>>> + description: u32 array of external irqs. > >>> Constraints on the array size and/or entry values? > >> The hardware's support for external IRQs may differ, which is why a u32 > >> array is utilized. This choice is based on the fact that IRQ numbers a= re > >> commonly expressed as integers, and a 32-bit unsigned integer provides= a > >> standardized size capable of representing a broad range of numbers. Th= is > >> size is more than adequate for accommodating IRQ numbering. > > I don't think Rob was questioning your use of u32s, but rather the fact > > that you do not limit the values at all nor the number of values. >=20 > The peripheral identification defined at the product level corresponds=20 > to the interrupt source number. >=20 > SoC External Interrupts Peripheral ID > AT91RM9200 - IRQ0=E2=80=93IRQ6 25 - 31 > SAMA5D2 - IRQ0=E2=80=93IRQn 49 > SAMA5D3 - IRQ0=E2=80=93IRQn 47 > SAMA5D4 - IRQ0=E2=80=93IRQn 56 > SAM9x60 - IRQ0=E2=80=93IRQn 31 >=20 > To reflect these constraints in bindings, I intend to make the following= =20 > changes. >=20 > atmel,external-irqs: > $ref: /schemas/types.yaml#/definitions/uint32-array > description: u32 array of external irqs. > if: > properties: > compatible: > contains: > const: atmel,at91rm9200-aic > then: > minItems: 1 > maxItems: 7 > else: > minItems: 1 > maxItems: 1 Just to point out, that if this is not psuedocode, the syntax here is not quite right. It should be: allOf: - if: properties: compatible: contains: const: atmel,at91rm9200-aic then: properties: atmel,external-irqs: minItems: 1 maxItems: 7 else: properties: atmel,external-irqs: minItems: 1 maxItems: 1 But you can simply this further by applying minItems: 1 & maxitems: 7 to the property directly and just setting maxItems: 1 when the compatible is not atmel,at91rm9200-aic. There should be plenty of examples in-tree for you to copy this sort of thing from - clock-names is a property you often see this used for. Cheers, Conor. --oixT++1NaGaSoyb2 Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iHUEABYIAB0WIQRh246EGq/8RLhDjO14tDGHoIJi0gUCZdT+ZQAKCRB4tDGHoIJi 0tWrAQDA0M79FYs8kBO/dXhIdEIyv//B1MOZxFKmHMtCxqGsBgEAzc28f4+CT8Lc fmXrS1VSSFmNnFNCBsISOsq7MNz8WwY= =EMPj -----END PGP SIGNATURE----- --oixT++1NaGaSoyb2-- --===============1620071869624437662== 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 --===============1620071869624437662==--