From: Serge Semin <fancer.lancer@gmail.com>
To: Sascha Hauer <s.hauer@pengutronix.de>
Cc: linux-gpio@vger.kernel.org, devicetree@vger.kernel.org,
linux-kernel@vger.kernel.org,
Linus Walleij <linus.walleij@linaro.org>,
Bartosz Golaszewski <brgl@bgdev.pl>,
kernel@pengutronix.de, Rob Herring <robh@kernel.org>
Subject: Re: [PATCH v5 2/2] dt-bindings: gpio: Add gpio-latch binding document
Date: Fri, 7 Oct 2022 19:33:47 +0300 [thread overview]
Message-ID: <20221007163347.f4swjph7624eueay@mobilestation> (raw)
In-Reply-To: <20221007114647.2723457-3-s.hauer@pengutronix.de>
On Fri, Oct 07, 2022 at 01:46:47PM +0200, Sascha Hauer wrote:
> This adds a binding for a GPIO multiplexer driver based on latches
> connected to other GPIOs.
>
> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
> Reviewed-by: Rob Herring <robh@kernel.org>
Reviewed-by: Serge Semin <fancer.lancer@gmail.com>
Just a note. In accordance with [1] the DT-bindings patches should come
in the series before the code implementing the bindings.
[1] Documentation/devicetree/bindings/submitting-patches.rst, unit I.5).
-Sergey
> ---
>
> Notes:
> Changes since v3:
> - Introduce delays between GPIO toggles as suggested by Serge Semin
>
> Changes since v1:
> - Add license to binding file
>
> .../devicetree/bindings/gpio/gpio-latch.yaml | 94 +++++++++++++++++++
> 1 file changed, 94 insertions(+)
> create mode 100644 Documentation/devicetree/bindings/gpio/gpio-latch.yaml
>
> diff --git a/Documentation/devicetree/bindings/gpio/gpio-latch.yaml b/Documentation/devicetree/bindings/gpio/gpio-latch.yaml
> new file mode 100644
> index 0000000000000..1ed82a2cebdaa
> --- /dev/null
> +++ b/Documentation/devicetree/bindings/gpio/gpio-latch.yaml
> @@ -0,0 +1,94 @@
> +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
> +%YAML 1.2
> +---
> +$id: http://devicetree.org/schemas/gpio/gpio-latch.yaml#
> +$schema: http://devicetree.org/meta-schemas/core.yaml#
> +
> +title: GPIO latch controller
> +
> +maintainers:
> + - Sascha Hauer <s.hauer@pengutronix.de>
> +
> +description: |
> + This binding describes a GPIO multiplexer based on latches connected to
> + other GPIOs, like this:
> +
> + CLK0 ----------------------. ,--------.
> + CLK1 -------------------. `--------|> #0 |
> + | | |
> + OUT0 ----------------+--|-----------|D0 Q0|-----|<
> + OUT1 --------------+-|--|-----------|D1 Q1|-----|<
> + OUT2 ------------+-|-|--|-----------|D2 Q2|-----|<
> + OUT3 ----------+-|-|-|--|-----------|D3 Q3|-----|<
> + OUT4 --------+-|-|-|-|--|-----------|D4 Q4|-----|<
> + OUT5 ------+-|-|-|-|-|--|-----------|D5 Q5|-----|<
> + OUT6 ----+-|-|-|-|-|-|--|-----------|D6 Q6|-----|<
> + OUT7 --+-|-|-|-|-|-|-|--|-----------|D7 Q7|-----|<
> + | | | | | | | | | `--------'
> + | | | | | | | | |
> + | | | | | | | | | ,--------.
> + | | | | | | | | `-----------|> #1 |
> + | | | | | | | | | |
> + | | | | | | | `--------------|D0 Q0|-----|<
> + | | | | | | `----------------|D1 Q1|-----|<
> + | | | | | `------------------|D2 Q2|-----|<
> + | | | | `--------------------|D3 Q3|-----|<
> + | | | `----------------------|D4 Q4|-----|<
> + | | `------------------------|D5 Q5|-----|<
> + | `--------------------------|D6 Q6|-----|<
> + `----------------------------|D7 Q7|-----|<
> + `--------'
> +
> + The number of clk-gpios and latched-gpios is not fixed. The actual number
> + of number of latches and the number of inputs per latch is derived from
> + the number of GPIOs given in the corresponding device tree properties.
> +
> +properties:
> + compatible:
> + const: gpio-latch
> + "#gpio-cells":
> + const: 2
> +
> + clk-gpios:
> + description: Array of GPIOs to be used to clock a latch
> +
> + latched-gpios:
> + description: Array of GPIOs to be used as inputs per latch
> +
> + setup-duration-ns:
> + description: Delay in nanoseconds to wait after the latch inputs have been
> + set up
> +
> + clock-duration-ns:
> + description: Delay in nanoseconds to wait between clock output changes
> +
> + gpio-controller: true
> +
> + gpio-line-names: true
> +
> +required:
> + - compatible
> + - "#gpio-cells"
> + - gpio-controller
> + - clk-gpios
> + - latched-gpios
> +
> +additionalProperties: false
> +
> +examples:
> + - |
> + gpio-latch {
> + #gpio-cells = <2>;
> + pinctrl-names = "default";
> + pinctrl-0 = <&pinctrl_di_do_leds>;
> + compatible = "gpio-latch";
> + gpio-controller;
> + setup-duration-ns = <100>;
> + clock-duration-ns = <100>;
> +
> + clk-gpios = <&gpio3 7 0>, <&gpio3 8 0>;
> + latched-gpios = <&gpio3 21 0>, <&gpio3 22 0>,
> + <&gpio3 23 0>, <&gpio3 24 0>,
> + <&gpio3 25 0>, <&gpio3 26 0>,
> + <&gpio3 27 0>, <&gpio3 28 0>;
> + };
> --
> 2.30.2
>
next prev parent reply other threads:[~2022-10-07 16:33 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-10-07 11:46 [PATCH v5 0/2] gpio: Add gpio-latch driver Sascha Hauer
2022-10-07 11:46 ` [PATCH v5 1/2] gpio: Add gpio latch driver Sascha Hauer
2022-10-07 16:29 ` Serge Semin
2022-10-17 8:50 ` Linus Walleij
2022-10-07 11:46 ` [PATCH v5 2/2] dt-bindings: gpio: Add gpio-latch binding document Sascha Hauer
2022-10-07 16:33 ` Serge Semin [this message]
2022-10-17 8:51 ` Linus Walleij
2022-10-25 9:39 ` [PATCH v5 0/2] gpio: Add gpio-latch driver Bartosz Golaszewski
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=20221007163347.f4swjph7624eueay@mobilestation \
--to=fancer.lancer@gmail.com \
--cc=brgl@bgdev.pl \
--cc=devicetree@vger.kernel.org \
--cc=kernel@pengutronix.de \
--cc=linus.walleij@linaro.org \
--cc=linux-gpio@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=robh@kernel.org \
--cc=s.hauer@pengutronix.de \
/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).