linux-gpio.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Rob Herring <robh@kernel.org>
To: Linus Walleij <linus.walleij@linaro.org>
Cc: Linus Walleij <linusw@kernel.org>, Imre Kaloz <kaloz@openwrt.org>,
	Krzysztof Halasa <khalasa@piap.pl>,
	Bartosz Golaszewski <brgl@bgdev.pl>,
	Andy Shevchenko <andy@kernel.org>,
	Krzysztof Kozlowski <krzysztof.kozlowski+dt@linaro.org>,
	Conor Dooley <conor+dt@kernel.org>,
	linux-arm-kernel@lists.infradead.org, linux-gpio@vger.kernel.org,
	devicetree@vger.kernel.org
Subject: Re: [PATCH 1/2] gpio: Rewrite IXP4xx GPIO bindings in schema
Date: Thu, 21 Sep 2023 13:44:11 -0500	[thread overview]
Message-ID: <20230921184411.GA784095-robh@kernel.org> (raw)
In-Reply-To: <20230921-ixp4xx-gpio-clocks-v1-1-574942bf944a@linaro.org>

On Thu, Sep 21, 2023 at 12:23:45AM +0200, Linus Walleij wrote:
> This rewrites the IXP4xx GPIO bindings to use YAML schema,
> and adds two new properties to enable fixed clock output on
> pins 14 and 15.
> 
> Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
> ---
>  .../devicetree/bindings/gpio/intel,ixp4xx-gpio.txt | 38 ------------
>  .../bindings/gpio/intel,ixp4xx-gpio.yaml           | 70 ++++++++++++++++++++++
>  MAINTAINERS                                        |  2 +-
>  3 files changed, 71 insertions(+), 39 deletions(-)
> 
> diff --git a/Documentation/devicetree/bindings/gpio/intel,ixp4xx-gpio.txt b/Documentation/devicetree/bindings/gpio/intel,ixp4xx-gpio.txt
> deleted file mode 100644
> index 8dc41ed99685..000000000000
> --- a/Documentation/devicetree/bindings/gpio/intel,ixp4xx-gpio.txt
> +++ /dev/null
> @@ -1,38 +0,0 @@
> -Intel IXP4xx XScale Networking Processors GPIO
> -
> -This GPIO controller is found in the Intel IXP4xx processors.
> -It supports 16 GPIO lines.
> -
> -The interrupt portions of the GPIO controller is hierarchical:
> -the synchronous edge detector is part of the GPIO block, but the
> -actual enabling/disabling of the interrupt line is done in the
> -main IXP4xx interrupt controller which has a 1:1 mapping for
> -the first 12 GPIO lines to 12 system interrupts.
> -
> -The remaining 4 GPIO lines can not be used for receiving
> -interrupts.
> -
> -The interrupt parent of this GPIO controller must be the
> -IXP4xx interrupt controller.
> -
> -Required properties:
> -
> -- compatible : Should be
> -  "intel,ixp4xx-gpio"
> -- reg : Should contain registers location and length
> -- gpio-controller : marks this as a GPIO controller
> -- #gpio-cells : Should be 2, see gpio/gpio.txt
> -- interrupt-controller : marks this as an interrupt controller
> -- #interrupt-cells : a standard two-cell interrupt, see
> -  interrupt-controller/interrupts.txt
> -
> -Example:
> -
> -gpio0: gpio@c8004000 {
> -	compatible = "intel,ixp4xx-gpio";
> -	reg = <0xc8004000 0x1000>;
> -	gpio-controller;
> -	#gpio-cells = <2>;
> -	interrupt-controller;
> -	#interrupt-cells = <2>;
> -};
> diff --git a/Documentation/devicetree/bindings/gpio/intel,ixp4xx-gpio.yaml b/Documentation/devicetree/bindings/gpio/intel,ixp4xx-gpio.yaml
> new file mode 100644
> index 000000000000..bb1fc393bd8c
> --- /dev/null
> +++ b/Documentation/devicetree/bindings/gpio/intel,ixp4xx-gpio.yaml
> @@ -0,0 +1,70 @@
> +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
> +%YAML 1.2
> +---
> +$id: http://devicetree.org/schemas/gpio/intel,ixp4xx-gpio.yaml#
> +$schema: http://devicetree.org/meta-schemas/core.yaml#
> +
> +title: Intel IXP4xx XScale Networking Processors GPIO Controller
> +
> +description: This GPIO controller is found in the Intel IXP4xx
> +  processors. It supports 16 GPIO lines.
> +  The interrupt portions of the GPIO controller is hierarchical.
> +  The synchronous edge detector is part of the GPIO block, but the
> +  actual enabling/disabling of the interrupt line is done in the
> +  main IXP4xx interrupt controller which has a 1-to-1 mapping for
> +  the first 12 GPIO lines to 12 system interrupts.
> +  The remaining 4 GPIO lines can not be used for receiving
> +  interrupts.
> +  The interrupt parent of this GPIO controller must be the
> +  IXP4xx interrupt controller.
> +  GPIO 14 and 15 can be used as clock outputs rather than GPIO,
> +  and this can be enabled by a special flag.

Do you care about the formatting here? If so, you are missing a '|'. If 
not, you have strange line breaks.

> +
> +maintainers:
> +  - Linus Walleij <linus.walleij@linaro.org>
> +
> +properties:
> +  compatible:
> +    const: intel,ixp4xx-gpio
> +
> +  reg:
> +    maxItems: 1
> +
> +  gpio-controller: true

Blank line between DT properties

> +  "#gpio-cells":
> +    const: 2
> +
> +  interrupt-controller: true

Blank line

> +  "#interrupt-cells":
> +    const: 2

Otherwise, with those nits fixed:

Reviewed-by: Rob Herring <robh@kernel.org>

  reply	other threads:[~2023-09-21 18:52 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-09-20 22:23 [PATCH 0/2] gpio: ixp4xx: Handle external clock output Linus Walleij
2023-09-20 22:23 ` [PATCH 1/2] gpio: Rewrite IXP4xx GPIO bindings in schema Linus Walleij
2023-09-21 18:44   ` Rob Herring [this message]
2023-09-20 22:23 ` [PATCH 2/2] gpio: ixp4xx: Handle clock output on pin 14 and 15 Linus Walleij
2023-09-21 11:22   ` Andy Shevchenko
2023-09-21 12:34     ` Linus Walleij

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20230921184411.GA784095-robh@kernel.org \
    --to=robh@kernel.org \
    --cc=andy@kernel.org \
    --cc=brgl@bgdev.pl \
    --cc=conor+dt@kernel.org \
    --cc=devicetree@vger.kernel.org \
    --cc=kaloz@openwrt.org \
    --cc=khalasa@piap.pl \
    --cc=krzysztof.kozlowski+dt@linaro.org \
    --cc=linus.walleij@linaro.org \
    --cc=linusw@kernel.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-gpio@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).