linux-mips.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
To: Keguang Zhang <keguang.zhang@gmail.com>,
	linux-gpio@vger.kernel.org, devicetree@vger.kernel.org,
	linux-mips@vger.kernel.org, linux-kernel@vger.kernel.org
Cc: Linus Walleij <linus.walleij@linaro.org>,
	Bartosz Golaszewski <brgl@bgdev.pl>,
	Rob Herring <robh+dt@kernel.org>,
	Krzysztof Kozlowski <krzysztof.kozlowski+dt@linaro.org>
Subject: Re: [PATCH 4/4] dt-bindings: gpio: Add Loongson-1 GPIO
Date: Wed, 22 Feb 2023 13:35:04 +0100	[thread overview]
Message-ID: <18d1048e-c66b-fea8-2755-6c1c6e23fde9@linaro.org> (raw)
In-Reply-To: <20230222111213.2241633-5-keguang.zhang@gmail.com>

On 22/02/2023 12:12, Keguang Zhang wrote:
> Add devicetree binding document for Loongson-1 GPIO.
> 
> Signed-off-by: Keguang Zhang <keguang.zhang@gmail.com>
> ---
>  .../bindings/gpio/loongson,ls1x-gpio.yaml     | 60 +++++++++++++++++++
>  1 file changed, 60 insertions(+)
>  create mode 100644 Documentation/devicetree/bindings/gpio/loongson,ls1x-gpio.yaml
> 
> diff --git a/Documentation/devicetree/bindings/gpio/loongson,ls1x-gpio.yaml b/Documentation/devicetree/bindings/gpio/loongson,ls1x-gpio.yaml
> new file mode 100644
> index 000000000000..e4ab49d48fae
> --- /dev/null
> +++ b/Documentation/devicetree/bindings/gpio/loongson,ls1x-gpio.yaml
> @@ -0,0 +1,60 @@
> +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
> +%YAML 1.2
> +---
> +$id: http://devicetree.org/schemas/gpio/loongson,ls1x-gpio.yaml#
> +$schema: http://devicetree.org/meta-schemas/core.yaml#
> +
> +title: Loongson-1 GPIO controller
> +
> +maintainers:
> +  - Keguang Zhang <keguang.zhang@gmail.com>
> +
> +properties:
> +  compatible:
> +    const: loongson,ls1x-gpio
> +
> +  reg:
> +    maxItems: 1
> +
> +  gpio-controller: true
> +
> +  "#gpio-cells":
> +    const: 2
> +
> +  ngpios:
> +    minimum: 1
> +    maximum: 32

Isn't this fixed at 32? Do you have hardware with different number of GPIOs?

> +
> +required:
> +  - compatible
> +  - reg
> +  - gpio-controller
> +  - '#gpio-cells'

Use consistent quotes - either " or '

> +  - ngpios
> +
> +additionalProperties: false
> +
> +examples:
> +  - |
> +    gpio0: gpio@1fd010c0 {
> +        compatible = "loongson,ls1x-gpio";
> +        reg = <0x1fd010c0 0x4>;
> +
> +        gpio-controller;
> +        #gpio-cells = <2>;
> +
> +        ngpios = <32>;
> +    };
> +
> +  - |
> +    gpio1: gpio@1fd010c4 {
> +        compatible = "loongson,ls1x-gpio";
> +        reg = <0x1fd010c4 0x4>;
> +
> +        gpio-controller;
> +        #gpio-cells = <2>;
> +
> +        ngpios = <32>;
> +    };

These are two the same examples, keep only one.

Best regards,
Krzysztof


  reply	other threads:[~2023-02-22 12:35 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-02-22 11:12 [PATCH 0/4] Devicetree support for Loongson-1 GPIO Keguang Zhang
2023-02-22 11:12 ` [PATCH 1/4] gpio: loongson1: Update copyright Keguang Zhang
2023-02-22 12:17   ` andy.shevchenko
2023-03-02 11:09     ` Kelvin Cheung
2023-03-02 11:40       ` Krzysztof Kozlowski
2023-03-02 12:16         ` Kelvin Cheung
2023-03-02 19:02           ` Andy Shevchenko
2023-02-22 11:12 ` [PATCH 2/4] gpio: loongson1: Introduce ls1x_gpio_chip struct Keguang Zhang
2023-02-22 12:18   ` andy.shevchenko
2023-03-02 11:11     ` Kelvin Cheung
2023-02-22 11:12 ` [PATCH 3/4] gpio: loongson1: Add DT support Keguang Zhang
2023-02-22 12:20   ` andy.shevchenko
2023-03-02 11:08     ` Kelvin Cheung
2023-02-22 11:12 ` [PATCH 4/4] dt-bindings: gpio: Add Loongson-1 GPIO Keguang Zhang
2023-02-22 12:35   ` Krzysztof Kozlowski [this message]
2023-03-01  9:50     ` Kelvin Cheung

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=18d1048e-c66b-fea8-2755-6c1c6e23fde9@linaro.org \
    --to=krzysztof.kozlowski@linaro.org \
    --cc=brgl@bgdev.pl \
    --cc=devicetree@vger.kernel.org \
    --cc=keguang.zhang@gmail.com \
    --cc=krzysztof.kozlowski+dt@linaro.org \
    --cc=linus.walleij@linaro.org \
    --cc=linux-gpio@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mips@vger.kernel.org \
    --cc=robh+dt@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).