From: Oleksij Rempel <o.rempel@pengutronix.de>
To: Rob Herring <robh+dt@kernel.org>,
William Breathitt Gray <vilhelm.gray@gmail.com>
Cc: Oleksij Rempel <o.rempel@pengutronix.de>,
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,
Linus Walleij <linus.walleij@linaro.org>,
Jonathan Cameron <jic23@kernel.org>
Subject: [PATCH v5 1/2] dt-bindings: counter: add event-counter binding
Date: Mon, 8 Feb 2021 14:53:46 +0100 [thread overview]
Message-ID: <20210208135347.18494-2-o.rempel@pengutronix.de> (raw)
In-Reply-To: <20210208135347.18494-1-o.rempel@pengutronix.de>
Add binding for the event counter node
Signed-off-by: Oleksij Rempel <o.rempel@pengutronix.de>
---
.../bindings/counter/event-counter.yaml | 56 +++++++++++++++++++
1 file changed, 56 insertions(+)
create mode 100644 Documentation/devicetree/bindings/counter/event-counter.yaml
diff --git a/Documentation/devicetree/bindings/counter/event-counter.yaml b/Documentation/devicetree/bindings/counter/event-counter.yaml
new file mode 100644
index 000000000000..bd05c1b38f20
--- /dev/null
+++ b/Documentation/devicetree/bindings/counter/event-counter.yaml
@@ -0,0 +1,56 @@
+# SPDX-License-Identifier: GPL-2.0
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/counter/event-counter.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Event counter
+
+maintainers:
+ - Oleksij Rempel <o.rempel@pengutronix.de>
+
+description: |
+ A generic event counter to measure event 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.
+
+properties:
+ compatible:
+ const: event-counter
+
+ interrupts:
+ maxItems: 1
+
+ gpios:
+ description: Optional diagnostic interface to measure signal level
+ maxItems: 1
+
+required:
+ - compatible
+
+additionalProperties: false
+
+examples:
+ - |
+
+ #include <dt-bindings/interrupt-controller/irq.h>
+ #include <dt-bindings/gpio/gpio.h>
+
+ counter-0 {
+ compatible = "event-counter";
+ interrupts-extended = <&gpio 0 IRQ_TYPE_EDGE_RISING>;
+ };
+
+ counter-1 {
+ compatible = "event-counter";
+ gpios = <&gpio 2 GPIO_ACTIVE_HIGH>;
+ };
+
+ counter-2 {
+ compatible = "event-counter";
+ interrupts-extended = <&gpio 2 IRQ_TYPE_EDGE_RISING>;
+ gpios = <&gpio 2 GPIO_ACTIVE_HIGH>;
+ };
+
+...
--
2.30.0
next prev parent reply other threads:[~2021-02-08 13:58 UTC|newest]
Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-02-08 13:53 [PATCH v5 0/2] add support for GPIO or IRQ based evemt counter Oleksij Rempel
2021-02-08 13:53 ` Oleksij Rempel [this message]
2021-02-10 18:41 ` [PATCH v5 1/2] dt-bindings: counter: add event-counter binding Rob Herring
2021-02-12 9:22 ` Linus Walleij
2021-02-12 9:29 ` Linus Walleij
2021-02-08 13:53 ` [PATCH v5 2/2] counter: add IRQ or GPIO based event counter Oleksij Rempel
2021-02-08 14:14 ` William Breathitt Gray
2021-02-12 9:26 ` Linus Walleij
2021-02-15 7:58 ` Oleksij Rempel
2021-02-14 8:54 ` William Breathitt Gray
2021-02-15 9:17 ` Oleksij Rempel
2021-02-22 1:43 ` William Breathitt Gray
2021-02-23 10:06 ` Oleksij Rempel
2021-02-23 17:45 ` Oleksij Rempel
2021-02-24 2:34 ` William Breathitt Gray
2021-02-24 7:35 ` Oleksij Rempel
2021-02-24 8:11 ` William Breathitt Gray
2021-02-24 8:20 ` William Breathitt Gray
2021-02-26 6:46 ` Oleksij Rempel
2021-02-26 6:58 ` William Breathitt Gray
2021-03-02 15:37 ` Linus Walleij
2021-02-14 7:43 ` [PATCH v5 0/2] add support for GPIO or IRQ based evemt counter William Breathitt Gray
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=20210208135347.18494-2-o.rempel@pengutronix.de \
--to=o.rempel@pengutronix.de \
--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=robh+dt@kernel.org \
--cc=robin@protonic.nl \
--cc=vilhelm.gray@gmail.com \
/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).