From: William Breathitt Gray <vilhelm.gray@gmail.com>
To: Oleksij Rempel <o.rempel@pengutronix.de>,
Jonathan Cameron <jic23@kernel.org>
Cc: Rob Herring <robh+dt@kernel.org>,
Linus Walleij <linus.walleij@linaro.org>,
devicetree@vger.kernel.org, linux-kernel@vger.kernel.org,
Pengutronix Kernel Team <kernel@pengutronix.de>,
David Jander <david@protonic.nl>,
Robin van der Gracht <robin@protonic.nl>,
linux-iio@vger.kernel.org
Subject: Re: [PATCH v8 1/2] dt-bindings: counter: add interrupt-counter binding
Date: Tue, 2 Mar 2021 10:16:15 +0900 [thread overview]
Message-ID: <YD2R33ocanYrlAN1@shinobu> (raw)
In-Reply-To: <20210301080401.22190-2-o.rempel@pengutronix.de>
[-- Attachment #1: Type: text/plain, Size: 2530 bytes --]
On Mon, Mar 01, 2021 at 09:04:00AM +0100, Oleksij Rempel wrote:
> Add binding for the interrupt counter node
>
> Signed-off-by: Oleksij Rempel <o.rempel@pengutronix.de>
> Reviewed-by: Linus Walleij <linus.walleij@linaro.org>
Acked-by: William Breathitt Gray <vilhelm.gray@gmail.com>
> ---
> .../bindings/counter/interrupt-counter.yaml | 62 +++++++++++++++++++
> 1 file changed, 62 insertions(+)
> create mode 100644 Documentation/devicetree/bindings/counter/interrupt-counter.yaml
>
> diff --git a/Documentation/devicetree/bindings/counter/interrupt-counter.yaml b/Documentation/devicetree/bindings/counter/interrupt-counter.yaml
> new file mode 100644
> index 000000000000..fd075d104631
> --- /dev/null
> +++ b/Documentation/devicetree/bindings/counter/interrupt-counter.yaml
> @@ -0,0 +1,62 @@
> +# SPDX-License-Identifier: GPL-2.0
> +%YAML 1.2
> +---
> +$id: http://devicetree.org/schemas/counter/interrupt-counter.yaml#
> +$schema: http://devicetree.org/meta-schemas/core.yaml#
> +
> +title: Interrupt counter
> +
> +maintainers:
> + - Oleksij Rempel <o.rempel@pengutronix.de>
> +
> +description: |
> + A generic interrupt counter to measure interrupt frequency. It was developed
> + and used for agricultural devices to measure rotation speed of wheels or
> + other tools. Since the direction of rotation is not important, only one
> + signal line is needed.
> + Interrupts or gpios are required. If both are defined, the interrupt will
> + take precedence for counting interrupts.
> +
> +properties:
> + compatible:
> + const: interrupt-counter
> +
> + interrupts:
> + maxItems: 1
> +
> + gpios:
> + maxItems: 1
> +
> +required:
> + - compatible
> +
> +anyOf:
> + - required: [ interrupts-extended ]
> + - required: [ interrupts ]
> + - required: [ gpios ]
> +
> +additionalProperties: false
> +
> +examples:
> + - |
> +
> + #include <dt-bindings/interrupt-controller/irq.h>
> + #include <dt-bindings/gpio/gpio.h>
> +
> + counter-0 {
> + compatible = "interrupt-counter";
> + interrupts-extended = <&gpio 0 IRQ_TYPE_EDGE_RISING>;
> + };
> +
> + counter-1 {
> + compatible = "interrupt-counter";
> + gpios = <&gpio 2 GPIO_ACTIVE_HIGH>;
> + };
> +
> + counter-2 {
> + compatible = "interrupt-counter";
> + interrupts-extended = <&gpio 2 IRQ_TYPE_EDGE_RISING>;
> + gpios = <&gpio 2 GPIO_ACTIVE_HIGH>;
> + };
> +
> +...
> --
> 2.29.2
>
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]
next prev parent reply other threads:[~2021-03-02 7:47 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-03-01 8:03 [PATCH v8 0/2] add support for GPIO or IRQ based event counter Oleksij Rempel
2021-03-01 8:04 ` [PATCH v8 1/2] dt-bindings: counter: add interrupt-counter binding Oleksij Rempel
2021-03-02 1:16 ` William Breathitt Gray [this message]
2021-03-08 17:30 ` Rob Herring
2021-03-01 8:04 ` [PATCH v8 2/2] counter: add IRQ or GPIO based counter Oleksij Rempel
2021-03-02 1:18 ` William Breathitt Gray
2021-03-14 16:55 ` [PATCH v8 0/2] add support for GPIO or IRQ based event counter Jonathan Cameron
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=YD2R33ocanYrlAN1@shinobu \
--to=vilhelm.gray@gmail.com \
--cc=david@protonic.nl \
--cc=devicetree@vger.kernel.org \
--cc=jic23@kernel.org \
--cc=kernel@pengutronix.de \
--cc=linus.walleij@linaro.org \
--cc=linux-iio@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=o.rempel@pengutronix.de \
--cc=robh+dt@kernel.org \
--cc=robin@protonic.nl \
/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