[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20210530161333.3996-2-maukka@ext.kapsi.fi>
Date: Sun, 30 May 2021 19:13:32 +0300
From: Mauri Sandberg <maukka@....kapsi.fi>
To: sandberg@...lfence.com
Cc: andy.shevchenko@...il.com, bgolaszewski@...libre.com,
geert+renesas@...der.be, linus.walleij@...aro.org,
linux-gpio@...r.kernel.org, robh+dt@...nel.org,
devicetree@...r.kernel.org, linux-kernel@...r.kernel.org,
drew@...gleboard.org, Mauri Sandberg <maukka@....kapsi.fi>
Subject: [PATCH v4 1/2] dt-bindings: gpio-mux-input: add documentation
Add documentation for a general GPIO multiplexer.
Signed-off-by: Mauri Sandberg <maukka@....kapsi.fi>
Tested-by: Drew Fustini <drew@...gleboard.org>
Reviewed-by: Drew Fustini <drew@...gleboard.org>
---
v3 -> v4:
- Changed author email
- Included Tested-by and Reviewed-by from Drew
v2 -> v3: added a complete example on dual 4-way multiplexer
v1 -> v2: added a little bit more text in the binding documenation
---
.../bindings/gpio/gpio-mux-input.yaml | 75 +++++++++++++++++++
1 file changed, 75 insertions(+)
create mode 100644 Documentation/devicetree/bindings/gpio/gpio-mux-input.yaml
diff --git a/Documentation/devicetree/bindings/gpio/gpio-mux-input.yaml b/Documentation/devicetree/bindings/gpio/gpio-mux-input.yaml
new file mode 100644
index 000000000000..1ca4c3c8d64b
--- /dev/null
+++ b/Documentation/devicetree/bindings/gpio/gpio-mux-input.yaml
@@ -0,0 +1,75 @@
+# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/gpio/gpio-mux-input.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Generic GPIO input multiplexer
+
+maintainers:
+ - Mauri Sandberg <maukka@....kapsi.fi>
+
+description: |
+ A generic GPIO based input multiplexer
+
+ This driver uses a mux-controller to drive the multiplexer and has a single
+ output pin for reading the inputs to the mux.
+
+ For GPIO consumer documentation see gpio.txt.
+
+properties:
+ compatible:
+ enum:
+ - gpio-mux-input
+
+ gpio-controller: true
+
+ '#gpio-cells':
+ const: 2
+
+ pin-gpios:
+ description: |
+ The GPIO pin used as the output from the multiplexer
+
+required:
+ - compatible
+ - gpio-controller
+ - "#gpio-cells"
+ - pin-gpios
+
+additionalProperties: false
+
+examples:
+ - |
+ #include <dt-bindings/gpio/gpio.h>
+ mux: mux-controller {
+ compatible = "gpio-mux";
+ #mux-control-cells = <0>;
+
+ mux-gpios = <&gpio 9 GPIO_ACTIVE_HIGH>,
+ <&gpio 11 GPIO_ACTIVE_HIGH>;
+ };
+
+ gpio2: key-mux1 {
+ compatible = "gpio-mux-input";
+ mux-controls = <&mux>;
+
+ gpio-controller;
+ #gpio-cells = <2>;
+
+ // GPIOs used by this node, mux pin
+ pin-gpios = <&gpio 12 GPIO_ACTIVE_HIGH>;
+ };
+
+ gpio3: key-mux2 {
+ compatible = "gpio-mux-input";
+ mux-controls = <&mux>;
+
+ gpio-controller;
+ #gpio-cells = <2>;
+
+ // GPIOs used by this node, mux pin
+ pin-gpios = <&gpio 14 GPIO_ACTIVE_HIGH>;
+ };
+
+...
--
2.25.1
Powered by blists - more mailing lists