linux-gpio.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [RFCv2 PATCH 1/4] dt-bindings: bus: add Wiegand bus dt documentation
@ 2022-10-05 14:57 Martin Zaťovič
  2022-10-05 14:57 ` [RFCv2 PATCH 2/4] bus: add Wiegand bus driver Martin Zaťovič
                   ` (5 more replies)
  0 siblings, 6 replies; 13+ messages in thread
From: Martin Zaťovič @ 2022-10-05 14:57 UTC (permalink / raw)
  To: robh+dt, krzysztof.kozlowski+dt, linus.walleij, brgl, gregkh,
	jeffrey.l.hugo, andersson, Michael.Srba, saravanak, mani,
	hemantk, linux-kernel, devicetree, linux-gpio
  Cc: Martin Zaťovič

This patch documents the devicetree entry for enabling Wiegand
bus driver. The drivers that will use Wiegand bus driver shall
create a sub-node of the documented node.

Signed-off-by: Martin Zaťovič <m.zatovic1@gmail.com>
---
Hello again,

this is the second round of RFC patches in an attempt to add Wiegand
driver to linux kernel. Thank you for all the issues you have pointed
out in the first round. I have tried to fix all of them and I have
also implemented a Wiegand bus driver, that is now used by the GPIO
driver itself - as suggested by Linus.

Any advice you have for me regarding the patches will be appreciated!

With regards,
Martin Zaťovič
---
 .../devicetree/bindings/bus/wiegand.yaml      | 50 +++++++++++++++++++
 1 file changed, 50 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/bus/wiegand.yaml

diff --git a/Documentation/devicetree/bindings/bus/wiegand.yaml b/Documentation/devicetree/bindings/bus/wiegand.yaml
new file mode 100644
index 000000000000..1ed863ab925c
--- /dev/null
+++ b/Documentation/devicetree/bindings/bus/wiegand.yaml
@@ -0,0 +1,50 @@
+# SPDX-License-Identifier: GPL-2.0
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/bus/wiegand.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Wiegand Bus
+
+maintainers:
+  - Martin Zaťovič <m.zatovic1@gmail.com>
+
+description: |
+  Wiegand interface is a wiring standard popularized in the 1980s. To this day
+  many card readers, fingerprint readers, sensors, etc. use Wiegand interface
+  particularly for access control applications. It utilizes two wires to
+  transmit the data - D0 and D1.
+
+  Both data lines are initially pulled up. To send a bit of value 1, the D1
+  line is set low. Similarly to send a bit of value 0, the D0 line is set low.
+
+properties:
+  $nodename:
+    pattern: "^wiegand(@[0-9a-f]+)?$"
+
+  compatible:
+    contains:
+      const: wiegand
+
+required:
+  - compatible
+
+additionalProperties: false
+
+examples:
+  - |
+    #include <dt-bindings/gpio/gpio.h>
+
+    wiegand {
+        compatible = "wiegand";
+
+        wiegand-gpio {
+            compatible = "wiegand,wiegand-gpio";
+            pinctrl-names = "default";
+            pinctrl-0 = <&pinctrl_uart2_wiegand>;
+            data-hi-gpios = <&gpio 7 (GPIO_ACTIVE_HIGH|GPIO_OPEN_DRAIN)>;
+            data-lo-gpios = <&gpio 6 (GPIO_ACTIVE_HIGH|GPIO_OPEN_DRAIN)>;
+        };
+    };
+
+...
-- 
2.37.3


^ permalink raw reply related	[flat|nested] 13+ messages in thread

end of thread, other threads:[~2022-10-17  8:49 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-10-05 14:57 [RFCv2 PATCH 1/4] dt-bindings: bus: add Wiegand bus dt documentation Martin Zaťovič
2022-10-05 14:57 ` [RFCv2 PATCH 2/4] bus: add Wiegand bus driver Martin Zaťovič
2022-10-06  8:29   ` Krzysztof Kozlowski
2022-10-17  8:49   ` Linus Walleij
2022-10-05 14:57 ` [RFCv2 PATCH 3/4] dt-bindings: gpio: add Wiegand GPIO driver dt documentation Martin Zaťovič
2022-10-06  2:18   ` Rob Herring
2022-10-06  8:23   ` Krzysztof Kozlowski
2022-10-06  8:34     ` Krzysztof Kozlowski
2022-10-05 14:57 ` [RFCv2 PATCH 4/4] gpio: add Wiegand GPIO driver Martin Zaťovič
2022-10-12 12:16   ` Bartosz Golaszewski
2022-10-06  2:18 ` [RFCv2 PATCH 1/4] dt-bindings: bus: add Wiegand bus dt documentation Rob Herring
2022-10-06  8:25 ` Krzysztof Kozlowski
2022-10-06  8:33 ` Krzysztof Kozlowski

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).