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 EF705C3DA61 for ; Wed, 24 Jul 2024 18:15:56 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:List-Subscribe:List-Help :List-Post:List-Archive:List-Unsubscribe:List-Id:In-Reply-To:Content-Type: 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=Q9VOs6QQW8yDlMY9OuBLY6LSykRHyNFobWDCsob5S8w=; b=WpdtvQ07GcqAPBpJKVmLn4SIR4 3V4OFyVJHZtwsgmJlyZwXQeWjLyBFLAYsy933bQr6dYzDmdV+uGX5oYJjFZ+bZaLJHVOybvjOSkfM OAyAYm3br7DXiJlgLfHlK7fcwGP5rV5EA9UakGQcSL16mjhzLkRDMoqsX3KlYSz5QJuI5NqfdaaSr LZi+KUOXnAr1ZQFs+w07/fxgwfVAMmOF9dzkMuoPglYz5KdTmzJtRHwVIqZx7bjnUOKIGmNnwS4t9 P9kVzjFbHlQ3v+iZOItR/sVIx4jnAZetj59UWikBnP2ZlwsPwbHSkftYoUPg/50M71eWcmR8KR2gR kI0DTZ7w==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1sWgWa-0000000GB67-0trZ; Wed, 24 Jul 2024 18:15:40 +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 1sWfMD-0000000G1pa-36QU for linux-arm-kernel@lists.infradead.org; Wed, 24 Jul 2024 17:01:23 +0000 Received: from smtp.kernel.org (transwarp.subspace.kernel.org [100.75.92.58]) by sin.source.kernel.org (Postfix) with ESMTP id DFF15CE1064; Wed, 24 Jul 2024 17:00:51 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id AB0C7C32781; Wed, 24 Jul 2024 17:00:48 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1721840451; bh=2Fp4P0nwOnEMoAXIjI4Y3vOGjyY6NokmL9megcF9vq8=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=fuiAGIzF1Mk04XEIXWoBquP9gxq0hR7o3p8cRHVnkCkp1n/AWQN22x6+EKPARr+Gc w4AwDNIP86ve2KTlPJgZAh51KxTdfV/UuvhZeliWcCLcaNDlQP/No7AhGGZZAyRxIC mfE6P8ZzZzBPHPKl8HEmPhHOUJnc19nci2FNf8YkE7rXar+x8X3WDvGE9gV4teKQZK 84TzmXO3nFBloc51YZuZa4bQYjlyCwZQfPaoH6+XNXQ6XvD4GGzfzQTX/5a8i6VzFz hV3RnG8cwoPi+aay6e/T2XK4OvOsB+my075lNLNQJTuaAFsb3t5aY4zOAPDauxDzqb ySsKAtRKEvG+w== Date: Wed, 24 Jul 2024 18:00:46 +0100 From: Conor Dooley To: Animesh Agarwal Cc: Daniel Baluta , Linus Walleij , Bartosz Golaszewski , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Vladimir Zapolskiy , linux-gpio@vger.kernel.org, devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH] dt-bindings: gpio: nxp,lpc32xx-gpio: Convert to dtschema Message-ID: <20240724-sappiness-apprehend-b66630b94bcf@spud> References: <20240724161235.130333-1-animeshagarwal28@gmail.com> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="RctCo8G3j4W6epQq" Content-Disposition: inline In-Reply-To: <20240724161235.130333-1-animeshagarwal28@gmail.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240724_100054_155248_E4DF2213 X-CRM114-Status: GOOD ( 23.32 ) 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: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org --RctCo8G3j4W6epQq Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Yo, On Wed, Jul 24, 2024 at 09:42:28PM +0530, Animesh Agarwal wrote: > Convert the NXP LPC32xx SoC GPIO controller bindings to DT schema format. >=20 > Cc: Daniel Baluta > Signed-off-by: Animesh Agarwal > --- > .../devicetree/bindings/gpio/gpio_lpc32xx.txt | 43 --------------- > .../bindings/gpio/nxp,lpc32xx-gpio.yaml | 52 +++++++++++++++++++ > 2 files changed, 52 insertions(+), 43 deletions(-) > delete mode 100644 Documentation/devicetree/bindings/gpio/gpio_lpc32xx.t= xt > create mode 100644 Documentation/devicetree/bindings/gpio/nxp,lpc32xx-gp= io.yaml >=20 > diff --git a/Documentation/devicetree/bindings/gpio/gpio_lpc32xx.txt b/Do= cumentation/devicetree/bindings/gpio/gpio_lpc32xx.txt > deleted file mode 100644 > index 49819367a011..000000000000 > --- a/Documentation/devicetree/bindings/gpio/gpio_lpc32xx.txt > +++ /dev/null > @@ -1,43 +0,0 @@ > -NXP LPC32xx SoC GPIO controller > - > -Required properties: > -- compatible: must be "nxp,lpc3220-gpio" > -- reg: Physical base address and length of the controller's registers. > -- gpio-controller: Marks the device node as a GPIO controller. > -- #gpio-cells: Should be 3: > - 1) bank: > - 0: GPIO P0 > - 1: GPIO P1 > - 2: GPIO P2 > - 3: GPIO P3 > - 4: GPI P3 > - 5: GPO P3 > - 2) pin number > - 3) optional parameters: > - - bit 0 specifies polarity (0 for normal, 1 for inverted) > -- reg: Index of the GPIO group > diff --git a/Documentation/devicetree/bindings/gpio/nxp,lpc32xx-gpio.yaml= b/Documentation/devicetree/bindings/gpio/nxp,lpc32xx-gpio.yaml > new file mode 100644 > index 000000000000..5974b2775d23 > --- /dev/null > +++ b/Documentation/devicetree/bindings/gpio/nxp,lpc32xx-gpio.yaml Can you make this filename the same as the compatible string please? > @@ -0,0 +1,52 @@ > +# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause Hmm, the original author does not appear to be from one of the companies where there's a carte blanche for binding relicensing. > +%YAML 1.2 > +--- > +$id: http://devicetree.org/schemas/gpio/nxp,lpc32xx-gpio.yaml# > +$schema: http://devicetree.org/meta-schemas/core.yaml# > + > +title: NXP LPC32xx SoC GPIO controller > + > +maintainers: > + - Animesh Agarwal > + > +properties: > + compatible: > + const: nxp,lpc3220-gpio > + > + reg: > + maxItems: 1 > + > + gpio-controller: true > + > + '#gpio-cells': > + const: 3 > + description: | > + 1) bank: > + 0: GPIO P0 > + 1: GPIO P1 > + 2: GPIO P2 > + 3: GPIO P3 > + 4: GPI P3 > + 5: GPO P3 > + 2) pin number > + 3) optional parameters: This isn't optional, since you've made the number of cells const: 3. The original binding also says "should be 3", so I think that's reasonable. Just drop the optional wording. Otherwise, looks pretty okay to me. Cheers, Conor. > + - bit 0 specifies polarity (0 for normal, 1 for inverted) > + > +required: > + - compatible > + - reg > + - gpio-controller > + - '#gpio-cells' > + > +additionalProperties: false > + > +examples: > + - | > + #include > + > + gpio@40028000 { > + compatible =3D "nxp,lpc3220-gpio"; > + reg =3D <0x40028000 0x1000>; > + gpio-controller; > + #gpio-cells =3D <3>; /* bank, pin, flags */ > + }; > --=20 > 2.45.2 >=20 --RctCo8G3j4W6epQq Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iHQEABYIAB0WIQRh246EGq/8RLhDjO14tDGHoIJi0gUCZqEzPgAKCRB4tDGHoIJi 0uqwAPiDBQOdQdHa0Bxn92ixhY01Vmy5r/40U7pAC9hnuB5WAQDdnCaQ7+BNsMKm ufyZQGHMpLcUz3rSPoafZ5J6NzyXBA== =m3mS -----END PGP SIGNATURE----- --RctCo8G3j4W6epQq--