[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20250324130305.GD5113@pendragon.ideasonboard.com>
Date: Mon, 24 Mar 2025 15:03:05 +0200
From: Laurent Pinchart <laurent.pinchart@...asonboard.com>
To: Krzysztof Kozlowski <krzysztof.kozlowski@...aro.org>
Cc: Linus Walleij <linus.walleij@...aro.org>,
Bartosz Golaszewski <brgl@...ev.pl>, Rob Herring <robh@...nel.org>,
Krzysztof Kozlowski <krzk+dt@...nel.org>,
Conor Dooley <conor+dt@...nel.org>,
Nicolas Ferre <nicolas.ferre@...rochip.com>,
Alexandre Belloni <alexandre.belloni@...tlin.com>,
Claudiu Beznea <claudiu.beznea@...on.dev>,
Shawn Guo <shawnguo@...nel.org>,
Sascha Hauer <s.hauer@...gutronix.de>,
Pengutronix Kernel Team <kernel@...gutronix.de>,
Fabio Estevam <festevam@...il.com>,
Paul Walmsley <paul.walmsley@...ive.com>,
Samuel Holland <samuel.holland@...ive.com>,
Nobuhiro Iwamatsu <nobuhiro1.iwamatsu@...hiba.co.jp>,
Shubhrajyoti Datta <shubhrajyoti.datta@....com>,
Srinivas Neeli <srinivas.neeli@....com>,
Michal Simek <michal.simek@....com>,
Geert Uytterhoeven <geert+renesas@...der.be>,
Magnus Damm <magnus.damm@...il.com>,
Manikandan Muralidharan <manikandan.m@...rochip.com>,
Maxime Ripard <mripard@...nel.org>,
Sander Vanheule <sander@...nheule.net>,
Bert Vermeulen <bert@...t.com>, linux-gpio@...r.kernel.org,
devicetree@...r.kernel.org, linux-arm-kernel@...ts.infradead.org,
linux-kernel@...r.kernel.org, imx@...ts.linux.dev,
linux-riscv@...ts.infradead.org, linux-renesas-soc@...r.kernel.org
Subject: Re: [PATCH] dt-bindings: gpio: Correct indentation and style in DTS
example
Hi Krzysztof,
Thank you for the patch.
On Mon, Mar 24, 2025 at 01:53:26PM +0100, Krzysztof Kozlowski wrote:
> DTS example in the bindings should be indented with 2- or 4-spaces and
> aligned with opening '- |', so correct any differences like 3-spaces or
> mixtures 2- and 4-spaces in one binding. While re-indenting, drop
> unused labels.
>
> No functional changes here, but saves some comments during reviews of
> new patches built on existing code.
>
> Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@...aro.org>
Reviewed-by: Laurent Pinchart <laurent.pinchart+renesas@...asonboard.com>
> ---
> .../bindings/gpio/atmel,at91rm9200-gpio.yaml | 16 ++---
> .../bindings/gpio/fairchild,74hc595.yaml | 20 +++---
> .../devicetree/bindings/gpio/gpio-mxs.yaml | 70 +++++++++----------
> .../devicetree/bindings/gpio/nxp,pcf8575.yaml | 24 +++----
> .../bindings/gpio/realtek,otto-gpio.yaml | 8 +--
> .../bindings/gpio/renesas,em-gio.yaml | 20 +++---
> .../bindings/gpio/renesas,rcar-gpio.yaml | 24 +++----
> .../devicetree/bindings/gpio/sifive,gpio.yaml | 6 +-
> .../bindings/gpio/toshiba,gpio-visconti.yaml | 24 +++----
> .../bindings/gpio/xlnx,gpio-xilinx.yaml | 48 ++++++-------
> 10 files changed, 130 insertions(+), 130 deletions(-)
>
> diff --git a/Documentation/devicetree/bindings/gpio/atmel,at91rm9200-gpio.yaml b/Documentation/devicetree/bindings/gpio/atmel,at91rm9200-gpio.yaml
> index 3dd70933ed8e..d810043b56b6 100644
> --- a/Documentation/devicetree/bindings/gpio/atmel,at91rm9200-gpio.yaml
> +++ b/Documentation/devicetree/bindings/gpio/atmel,at91rm9200-gpio.yaml
> @@ -69,13 +69,13 @@ examples:
> #include <dt-bindings/interrupt-controller/irq.h>
>
> gpio@...ff400 {
> - compatible = "atmel,at91rm9200-gpio";
> - reg = <0xfffff400 0x200>;
> - interrupts = <2 IRQ_TYPE_LEVEL_HIGH 1>;
> - #gpio-cells = <2>;
> - gpio-controller;
> - interrupt-controller;
> - #interrupt-cells = <2>;
> - clocks = <&pmc PMC_TYPE_PERIPHERAL 2>;
> + compatible = "atmel,at91rm9200-gpio";
> + reg = <0xfffff400 0x200>;
> + interrupts = <2 IRQ_TYPE_LEVEL_HIGH 1>;
> + #gpio-cells = <2>;
> + gpio-controller;
> + interrupt-controller;
> + #interrupt-cells = <2>;
> + clocks = <&pmc PMC_TYPE_PERIPHERAL 2>;
> };
> ...
> diff --git a/Documentation/devicetree/bindings/gpio/fairchild,74hc595.yaml b/Documentation/devicetree/bindings/gpio/fairchild,74hc595.yaml
> index 0e5c22929bde..ab35bcf98101 100644
> --- a/Documentation/devicetree/bindings/gpio/fairchild,74hc595.yaml
> +++ b/Documentation/devicetree/bindings/gpio/fairchild,74hc595.yaml
> @@ -71,15 +71,15 @@ unevaluatedProperties: false
> examples:
> - |
> spi {
> - #address-cells = <1>;
> - #size-cells = <0>;
> + #address-cells = <1>;
> + #size-cells = <0>;
>
> - gpio5: gpio5@0 {
> - compatible = "fairchild,74hc595";
> - reg = <0>;
> - gpio-controller;
> - #gpio-cells = <2>;
> - registers-number = <4>;
> - spi-max-frequency = <100000>;
> - };
> + gpio5@0 {
> + compatible = "fairchild,74hc595";
> + reg = <0>;
> + gpio-controller;
> + #gpio-cells = <2>;
> + registers-number = <4>;
> + spi-max-frequency = <100000>;
> + };
> };
> diff --git a/Documentation/devicetree/bindings/gpio/gpio-mxs.yaml b/Documentation/devicetree/bindings/gpio/gpio-mxs.yaml
> index 8ff54369d16c..b58e08c8ecd8 100644
> --- a/Documentation/devicetree/bindings/gpio/gpio-mxs.yaml
> +++ b/Documentation/devicetree/bindings/gpio/gpio-mxs.yaml
> @@ -84,52 +84,52 @@ examples:
> reg = <0x80018000 0x2000>;
>
> gpio@0 {
> - compatible = "fsl,imx28-gpio";
> - reg = <0>;
> - interrupts = <127>;
> - gpio-controller;
> - #gpio-cells = <2>;
> - interrupt-controller;
> - #interrupt-cells = <2>;
> + compatible = "fsl,imx28-gpio";
> + reg = <0>;
> + interrupts = <127>;
> + gpio-controller;
> + #gpio-cells = <2>;
> + interrupt-controller;
> + #interrupt-cells = <2>;
> };
>
> gpio@1 {
> - compatible = "fsl,imx28-gpio";
> - reg = <1>;
> - interrupts = <126>;
> - gpio-controller;
> - #gpio-cells = <2>;
> - interrupt-controller;
> - #interrupt-cells = <2>;
> + compatible = "fsl,imx28-gpio";
> + reg = <1>;
> + interrupts = <126>;
> + gpio-controller;
> + #gpio-cells = <2>;
> + interrupt-controller;
> + #interrupt-cells = <2>;
> };
>
> gpio@2 {
> - compatible = "fsl,imx28-gpio";
> - reg = <2>;
> - interrupts = <125>;
> - gpio-controller;
> - #gpio-cells = <2>;
> - interrupt-controller;
> - #interrupt-cells = <2>;
> + compatible = "fsl,imx28-gpio";
> + reg = <2>;
> + interrupts = <125>;
> + gpio-controller;
> + #gpio-cells = <2>;
> + interrupt-controller;
> + #interrupt-cells = <2>;
> };
>
> gpio@3 {
> - compatible = "fsl,imx28-gpio";
> - reg = <3>;
> - interrupts = <124>;
> - gpio-controller;
> - #gpio-cells = <2>;
> - interrupt-controller;
> - #interrupt-cells = <2>;
> + compatible = "fsl,imx28-gpio";
> + reg = <3>;
> + interrupts = <124>;
> + gpio-controller;
> + #gpio-cells = <2>;
> + interrupt-controller;
> + #interrupt-cells = <2>;
> };
>
> gpio@4 {
> - compatible = "fsl,imx28-gpio";
> - reg = <4>;
> - interrupts = <123>;
> - gpio-controller;
> - #gpio-cells = <2>;
> - interrupt-controller;
> - #interrupt-cells = <2>;
> + compatible = "fsl,imx28-gpio";
> + reg = <4>;
> + interrupts = <123>;
> + gpio-controller;
> + #gpio-cells = <2>;
> + interrupt-controller;
> + #interrupt-cells = <2>;
> };
> };
> diff --git a/Documentation/devicetree/bindings/gpio/nxp,pcf8575.yaml b/Documentation/devicetree/bindings/gpio/nxp,pcf8575.yaml
> index 8bca574bb66d..5a6ecaa7b44b 100644
> --- a/Documentation/devicetree/bindings/gpio/nxp,pcf8575.yaml
> +++ b/Documentation/devicetree/bindings/gpio/nxp,pcf8575.yaml
> @@ -128,17 +128,17 @@ additionalProperties: false
> examples:
> - |
> i2c {
> - #address-cells = <1>;
> - #size-cells = <0>;
> + #address-cells = <1>;
> + #size-cells = <0>;
>
> - pcf8575: gpio@20 {
> - compatible = "nxp,pcf8575";
> - reg = <0x20>;
> - interrupt-parent = <&irqpin2>;
> - interrupts = <3 0>;
> - gpio-controller;
> - #gpio-cells = <2>;
> - interrupt-controller;
> - #interrupt-cells = <2>;
> - };
> + gpio@20 {
> + compatible = "nxp,pcf8575";
> + reg = <0x20>;
> + interrupt-parent = <&irqpin2>;
> + interrupts = <3 0>;
> + gpio-controller;
> + #gpio-cells = <2>;
> + interrupt-controller;
> + #interrupt-cells = <2>;
> + };
> };
> diff --git a/Documentation/devicetree/bindings/gpio/realtek,otto-gpio.yaml b/Documentation/devicetree/bindings/gpio/realtek,otto-gpio.yaml
> index 39fd959c45d2..728099c65824 100644
> --- a/Documentation/devicetree/bindings/gpio/realtek,otto-gpio.yaml
> +++ b/Documentation/devicetree/bindings/gpio/realtek,otto-gpio.yaml
> @@ -81,7 +81,7 @@ dependencies:
>
> examples:
> - |
> - gpio@...0 {
> + gpio@...0 {
> compatible = "realtek,rtl8380-gpio", "realtek,otto-gpio";
> reg = <0x3500 0x1c>;
> gpio-controller;
> @@ -91,9 +91,9 @@ examples:
> #interrupt-cells = <2>;
> interrupt-parent = <&rtlintc>;
> interrupts = <23>;
> - };
> + };
> - |
> - gpio@...0 {
> + gpio@...0 {
> compatible = "realtek,rtl9300-gpio", "realtek,otto-gpio";
> reg = <0x3300 0x1c>, <0x3338 0x8>;
> gpio-controller;
> @@ -103,6 +103,6 @@ examples:
> #interrupt-cells = <2>;
> interrupt-parent = <&rtlintc>;
> interrupts = <13>;
> - };
> + };
>
> ...
> diff --git a/Documentation/devicetree/bindings/gpio/renesas,em-gio.yaml b/Documentation/devicetree/bindings/gpio/renesas,em-gio.yaml
> index 8bdef812c87c..49fb8f613ead 100644
> --- a/Documentation/devicetree/bindings/gpio/renesas,em-gio.yaml
> +++ b/Documentation/devicetree/bindings/gpio/renesas,em-gio.yaml
> @@ -57,14 +57,14 @@ examples:
> - |
> #include <dt-bindings/interrupt-controller/arm-gic.h>
> gpio0: gpio@...50000 {
> - compatible = "renesas,em-gio";
> - reg = <0xe0050000 0x2c>, <0xe0050040 0x20>;
> - interrupts = <GIC_SPI 67 IRQ_TYPE_LEVEL_HIGH>,
> - <GIC_SPI 68 IRQ_TYPE_LEVEL_HIGH>;
> - gpio-controller;
> - #gpio-cells = <2>;
> - gpio-ranges = <&pfc 0 0 32>;
> - ngpios = <32>;
> - interrupt-controller;
> - #interrupt-cells = <2>;
> + compatible = "renesas,em-gio";
> + reg = <0xe0050000 0x2c>, <0xe0050040 0x20>;
> + interrupts = <GIC_SPI 67 IRQ_TYPE_LEVEL_HIGH>,
> + <GIC_SPI 68 IRQ_TYPE_LEVEL_HIGH>;
> + gpio-controller;
> + #gpio-cells = <2>;
> + gpio-ranges = <&pfc 0 0 32>;
> + ngpios = <32>;
> + interrupt-controller;
> + #interrupt-cells = <2>;
> };
> diff --git a/Documentation/devicetree/bindings/gpio/renesas,rcar-gpio.yaml b/Documentation/devicetree/bindings/gpio/renesas,rcar-gpio.yaml
> index cc7a950a6030..d32e103a64aa 100644
> --- a/Documentation/devicetree/bindings/gpio/renesas,rcar-gpio.yaml
> +++ b/Documentation/devicetree/bindings/gpio/renesas,rcar-gpio.yaml
> @@ -138,16 +138,16 @@ examples:
> #include <dt-bindings/interrupt-controller/arm-gic.h>
> #include <dt-bindings/power/r8a77470-sysc.h>
> gpio3: gpio@...53000 {
> - compatible = "renesas,gpio-r8a77470", "renesas,rcar-gen2-gpio";
> - reg = <0xe6053000 0x50>;
> - interrupts = <GIC_SPI 7 IRQ_TYPE_LEVEL_HIGH>;
> - clocks = <&cpg CPG_MOD 909>;
> - power-domains = <&sysc R8A77470_PD_ALWAYS_ON>;
> - resets = <&cpg 909>;
> - gpio-controller;
> - #gpio-cells = <2>;
> - gpio-ranges = <&pfc 0 96 30>;
> - gpio-reserved-ranges = <17 10>;
> - interrupt-controller;
> - #interrupt-cells = <2>;
> + compatible = "renesas,gpio-r8a77470", "renesas,rcar-gen2-gpio";
> + reg = <0xe6053000 0x50>;
> + interrupts = <GIC_SPI 7 IRQ_TYPE_LEVEL_HIGH>;
> + clocks = <&cpg CPG_MOD 909>;
> + power-domains = <&sysc R8A77470_PD_ALWAYS_ON>;
> + resets = <&cpg 909>;
> + gpio-controller;
> + #gpio-cells = <2>;
> + gpio-ranges = <&pfc 0 96 30>;
> + gpio-reserved-ranges = <17 10>;
> + interrupt-controller;
> + #interrupt-cells = <2>;
> };
> diff --git a/Documentation/devicetree/bindings/gpio/sifive,gpio.yaml b/Documentation/devicetree/bindings/gpio/sifive,gpio.yaml
> index fc095646adea..4bdc201b719e 100644
> --- a/Documentation/devicetree/bindings/gpio/sifive,gpio.yaml
> +++ b/Documentation/devicetree/bindings/gpio/sifive,gpio.yaml
> @@ -76,8 +76,8 @@ additionalProperties: false
>
> examples:
> - |
> - #include <dt-bindings/clock/sifive-fu540-prci.h>
> - gpio@...60000 {
> + #include <dt-bindings/clock/sifive-fu540-prci.h>
> + gpio@...60000 {
> compatible = "sifive,fu540-c000-gpio", "sifive,gpio0";
> interrupt-parent = <&plic>;
> interrupts = <7>, <8>, <9>, <10>, <11>, <12>, <13>, <14>, <15>, <16>,
> @@ -88,6 +88,6 @@ examples:
> #gpio-cells = <2>;
> interrupt-controller;
> #interrupt-cells = <2>;
> - };
> + };
>
> ...
> diff --git a/Documentation/devicetree/bindings/gpio/toshiba,gpio-visconti.yaml b/Documentation/devicetree/bindings/gpio/toshiba,gpio-visconti.yaml
> index b085450b527f..712063417bc8 100644
> --- a/Documentation/devicetree/bindings/gpio/toshiba,gpio-visconti.yaml
> +++ b/Documentation/devicetree/bindings/gpio/toshiba,gpio-visconti.yaml
> @@ -48,22 +48,22 @@ additionalProperties: false
>
> examples:
> - |
> - #include <dt-bindings/interrupt-controller/irq.h>
> - #include <dt-bindings/interrupt-controller/arm-gic.h>
> + #include <dt-bindings/interrupt-controller/irq.h>
> + #include <dt-bindings/interrupt-controller/arm-gic.h>
>
> - soc {
> + soc {
> #address-cells = <2>;
> #size-cells = <2>;
>
> gpio: gpio@...20000 {
> - compatible = "toshiba,gpio-tmpv7708";
> - reg = <0 0x28020000 0 0x1000>;
> - #gpio-cells = <0x2>;
> - gpio-ranges = <&pmux 0 0 32>;
> - gpio-controller;
> - interrupt-controller;
> - #interrupt-cells = <2>;
> - interrupt-parent = <&gic>;
> + compatible = "toshiba,gpio-tmpv7708";
> + reg = <0 0x28020000 0 0x1000>;
> + #gpio-cells = <0x2>;
> + gpio-ranges = <&pmux 0 0 32>;
> + gpio-controller;
> + interrupt-controller;
> + #interrupt-cells = <2>;
> + interrupt-parent = <&gic>;
> };
> - };
> + };
> ...
> diff --git a/Documentation/devicetree/bindings/gpio/xlnx,gpio-xilinx.yaml b/Documentation/devicetree/bindings/gpio/xlnx,gpio-xilinx.yaml
> index d3d8a2e143ed..8fbf12ca067e 100644
> --- a/Documentation/devicetree/bindings/gpio/xlnx,gpio-xilinx.yaml
> +++ b/Documentation/devicetree/bindings/gpio/xlnx,gpio-xilinx.yaml
> @@ -126,29 +126,29 @@ examples:
> - |
> #include <dt-bindings/interrupt-controller/arm-gic.h>
>
> - gpio@...20000 {
> - compatible = "xlnx,xps-gpio-1.00.a";
> - reg = <0xa0020000 0x10000>;
> - #gpio-cells = <2>;
> - #interrupt-cells = <0x2>;
> - clocks = <&zynqmp_clk 71>;
> - gpio-controller;
> - interrupt-controller;
> - interrupt-names = "ip2intc_irpt";
> - interrupt-parent = <&gic>;
> - interrupts = <0 89 4>;
> - xlnx,all-inputs = <0x0>;
> - xlnx,all-inputs-2 = <0x0>;
> - xlnx,all-outputs = <0x0>;
> - xlnx,all-outputs-2 = <0x0>;
> - xlnx,dout-default = <0x0>;
> - xlnx,dout-default-2 = <0x0>;
> - xlnx,gpio-width = <0x20>;
> - xlnx,gpio2-width = <0x20>;
> - xlnx,interrupt-present = <0x1>;
> - xlnx,is-dual = <0x1>;
> - xlnx,tri-default = <0xFFFFFFFF>;
> - xlnx,tri-default-2 = <0xFFFFFFFF>;
> - };
> + gpio@...20000 {
> + compatible = "xlnx,xps-gpio-1.00.a";
> + reg = <0xa0020000 0x10000>;
> + #gpio-cells = <2>;
> + #interrupt-cells = <0x2>;
> + clocks = <&zynqmp_clk 71>;
> + gpio-controller;
> + interrupt-controller;
> + interrupt-names = "ip2intc_irpt";
> + interrupt-parent = <&gic>;
> + interrupts = <0 89 4>;
> + xlnx,all-inputs = <0x0>;
> + xlnx,all-inputs-2 = <0x0>;
> + xlnx,all-outputs = <0x0>;
> + xlnx,all-outputs-2 = <0x0>;
> + xlnx,dout-default = <0x0>;
> + xlnx,dout-default-2 = <0x0>;
> + xlnx,gpio-width = <0x20>;
> + xlnx,gpio2-width = <0x20>;
> + xlnx,interrupt-present = <0x1>;
> + xlnx,is-dual = <0x1>;
> + xlnx,tri-default = <0xFFFFFFFF>;
> + xlnx,tri-default-2 = <0xFFFFFFFF>;
> + };
>
> ...
--
Regards,
Laurent Pinchart
Powered by blists - more mailing lists