[PATCHv5 3/4] dt-bindings: wiegand: add GPIO bitbanged Wiegand controller

From: Martin Zaťovič
Date: Thu Aug 24 2023 - 07:11:11 EST


GPIO bitbanged Wiegand controller requires definitions of GPIO lines to be
used on top of the common Wiegand properties. Wiegand utilizes two such
lines - DATA0(low data line) and DATA1(high data line).

Acked-by: Linus Walleij <linus.walleij@xxxxxxxxxx>
Signed-off-by: Martin Zaťovič <m.zatovic1@xxxxxxxxx>
---
.../bindings/wiegand/wiegand-gpio.yaml | 46 +++++++++++++++++++
MAINTAINERS | 5 ++
2 files changed, 51 insertions(+)
create mode 100644 Documentation/devicetree/bindings/wiegand/wiegand-gpio.yaml

diff --git a/Documentation/devicetree/bindings/wiegand/wiegand-gpio.yaml b/Documentation/devicetree/bindings/wiegand/wiegand-gpio.yaml
new file mode 100644
index 000000000000..cf2cb938de02
--- /dev/null
+++ b/Documentation/devicetree/bindings/wiegand/wiegand-gpio.yaml
@@ -0,0 +1,46 @@
+# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/wiegand/wiegand-gpio.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: GPIO bitbanged Wiegand interface properties
+
+maintainers:
+ - Martin Zaťovič <m.zatovic1@xxxxxxxxx>
+
+description:
+ This represents the GPIO lines used for bit-banged Wiegand on dedicated GPIO
+ lines.
+
+allOf:
+ - $ref: /schemas/wiegand/wiegand-controller.yaml#
+
+properties:
+ compatible:
+ const: wiegand-gpio
+
+ data-gpios:
+ description: GPIOs used as Wiegand data lines, DATA0 and DATA1 respectivelly.
+ maxItems: 2
+
+required:
+ - compatible
+ - data-gpios
+
+unevaluatedProperties: false
+
+examples:
+ - |
+ #include <dt-bindings/gpio/gpio.h>
+
+ wiegand@f00 {
+ compatible = "wiegand-gpio";
+ pulse-len-us = <50>;
+ interval-len-us = <2000>;
+ frame-gap-us = <2000>;
+ data-gpios = <&gpio2 6 (GPIO_ACTIVE_HIGH|GPIO_OPEN_DRAIN)>,
+ <&gpio2 7 (GPIO_ACTIVE_HIGH|GPIO_OPEN_DRAIN)>;
+
+ /* devices */
+ };
diff --git a/MAINTAINERS b/MAINTAINERS
index 0afcc88a38d2..fb158e74ca4b 100644
--- a/MAINTAINERS
+++ b/MAINTAINERS
@@ -22929,6 +22929,11 @@ F: Documentation/devicetree/bindings/wiegand/wiegand-controller.yaml
F: drivers/wiegand/wiegand.c
F: include/linux/wiegand.h

+WIEGAND GPIO BITBANG DRIVER
+M: Martin Zaťovič <m.zatovic1@xxxxxxxxx>
+S: Maintained
+F: Documentation/devicetree/bindings/wiegand/wiegand-gpio.yaml
+
WILOCITY WIL6210 WIRELESS DRIVER
L: linux-wireless@xxxxxxxxxxxxxxx
S: Orphan
--
2.40.1