From: Martin Fuzzey <mfuzzey@parkeon.com>
To: Alexandre Courbot <gnurou@gmail.com>,
Linus Walleij <linus.walleij@linaro.org>,
Rob Herring <robh+dt@kernel.org>
Cc: linux-gpio@vger.kernel.org, linux-arm-kernel@lists.infradead.org,
devicetree@vger.kernel.org
Subject: [PATCH 1/2] Doc: DT: Add binding document for GPIO exporter
Date: Mon, 13 Apr 2015 13:05:17 +0200 [thread overview]
Message-ID: <20150413110517.9681.2438.stgit@localhost> (raw)
In-Reply-To: <20150413110515.9681.58848.stgit@localhost>
Signed-off-by: Martin Fuzzey <mfuzzey@parkeon.com>
---
.../devicetree/bindings/gpio/gpio-exporter.txt | 40 ++++++++++++++++++++
1 file changed, 40 insertions(+)
create mode 100644 Documentation/devicetree/bindings/gpio/gpio-exporter.txt
diff --git a/Documentation/devicetree/bindings/gpio/gpio-exporter.txt b/Documentation/devicetree/bindings/gpio/gpio-exporter.txt
new file mode 100644
index 0000000..58fc2a9
--- /dev/null
+++ b/Documentation/devicetree/bindings/gpio/gpio-exporter.txt
@@ -0,0 +1,40 @@
+Bindings to export some GPIOs to userspace.
+
+This is useful when some signals are made externally available by a piece
+of hardware (eg terminal blocks to connect sensors, actuators) but no
+special purpose kernel driver exists.
+
+Use of this binding allows userspace to have a stable name and input
+/ output mode across hardware and software versions.
+
+Required properties:
+- compatible: "linux,gpio-exporter"
+
+
+Each GPIO to be exported is represented as a child node with:
+
+Required child properties:
+- gpios : Reference to the GPIO to export (standard gpio binding)
+
+Optional child properties:
+- output : if present GPIO is output, otherwise input
+- initial-state : Initial state (0=low, 1=high) for output
+- allow-direction-change : Present if GPIO direction may be modified
+
+The name of the child node is that exposed to userspace.
+
+Example:
+ gpio_exporter:gpio-exporter {
+ compatible = "linux,gpio-exporter";
+
+ terminalblock_1_out1 {
+ gpios = <&gpio2 12 0>;
+ output;
+ initial-state = <0>;
+ };
+
+ terminalblock_1_in1 {
+ gpios = <&gpio2 15 0>;
+ };
+
+ };
next prev parent reply other threads:[~2015-04-13 11:05 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-04-13 11:05 [PATCH 0/2] gpio: Allow userspace export from DT Martin Fuzzey
2015-04-13 11:05 ` Martin Fuzzey [this message]
2015-04-13 11:05 ` [PATCH 2/2] gpio: add driver to export DT configured GPIOs to userspace Martin Fuzzey
2015-04-15 13:19 ` [PATCH 0/2] gpio: Allow userspace export from DT Rob Herring
[not found] ` <CAL_JsqJorndYh4ROdKbJfpG1KY=Xosjc6BMFYRPrb+BsauFsnQ-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2015-04-28 12:56 ` Linus Walleij
2015-05-04 8:49 ` Johan Hovold
2015-05-06 7:22 ` Linus Walleij
2015-05-06 13:06 ` Johan Hovold
2015-05-06 17:56 ` Fuzzey, Martin
2015-05-08 9:31 ` Johan Hovold
2015-05-06 11:24 ` Russell King - ARM Linux
2015-05-06 12:43 ` Johan Hovold
2015-05-06 12:57 ` Russell King - ARM Linux
[not found] ` <20150506125707.GV2067-l+eeeJia6m9vn6HldHNs0ANdhmdF6hFW@public.gmane.org>
2015-05-06 13:25 ` Johan Hovold
2015-05-07 5:38 ` Jiří Prchal
2015-05-07 12:28 ` Russell King - ARM Linux
[not found] ` <20150507122840.GB2067-l+eeeJia6m9vn6HldHNs0ANdhmdF6hFW@public.gmane.org>
2015-05-08 10:04 ` Johan Hovold
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=20150413110517.9681.2438.stgit@localhost \
--to=mfuzzey@parkeon.com \
--cc=devicetree@vger.kernel.org \
--cc=gnurou@gmail.com \
--cc=linus.walleij@linaro.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-gpio@vger.kernel.org \
--cc=robh+dt@kernel.org \
/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).