diff options
author | Sascha Hauer <s.hauer@pengutronix.de> | 2021-05-17 13:27:45 +0200 |
---|---|---|
committer | Sascha Hauer <s.hauer@pengutronix.de> | 2021-05-17 16:23:06 +0200 |
commit | a5a4c1d5a3c4f89059fb612b5786ec8b61b959f1 (patch) | |
tree | fe87198c6cc02e54d3131d087d2b9f7c3e96c689 /dts/Bindings/counter | |
parent | ba9de18c5f211678f5d0f67a0758c632ab774cca (diff) | |
download | barebox-a5a4c1d5a3c4f89059fb612b5786ec8b61b959f1.tar.gz barebox-a5a4c1d5a3c4f89059fb612b5786ec8b61b959f1.tar.xz |
dts: update to v5.13-rc1
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Diffstat (limited to 'dts/Bindings/counter')
-rw-r--r-- | dts/Bindings/counter/interrupt-counter.yaml | 62 |
1 files changed, 62 insertions, 0 deletions
diff --git a/dts/Bindings/counter/interrupt-counter.yaml b/dts/Bindings/counter/interrupt-counter.yaml new file mode 100644 index 0000000000..fd075d1046 --- /dev/null +++ b/dts/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>; + }; + +... |