From patchwork Mon Apr 13 11:05:17 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Martin Fuzzey X-Patchwork-Id: 460743 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by ozlabs.org (Postfix) with ESMTP id 44EE91402F4 for ; Mon, 13 Apr 2015 21:21:13 +1000 (AEST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754071AbbDMLVJ (ORCPT ); Mon, 13 Apr 2015 07:21:09 -0400 Received: from ip83.parkeon.com ([213.152.31.83]:42215 "EHLO mta2.parkeon.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754019AbbDMLVE (ORCPT ); Mon, 13 Apr 2015 07:21:04 -0400 X-Greylist: delayed 925 seconds by postgrey-1.27 at vger.kernel.org; Mon, 13 Apr 2015 07:21:04 EDT Received: from time001.besancon.parkeon.com ([10.32.16.23] helo=mail.besancon.parkeon.com) by mta2.parkeon.com with esmtp (Exim 4.82) (envelope-from ) id 1YhcB2-0005B9-9Y; Mon, 13 Apr 2015 13:05:16 +0200 Received: from [10.32.51.184] (port=59606 helo=[127.0.0.1]) by mail.besancon.parkeon.com with esmtp (Exim 4.71) (envelope-from ) id 1YhcB3-0000Pf-Ty; Mon, 13 Apr 2015 13:05:17 +0200 Subject: [PATCH 1/2] Doc: DT: Add binding document for GPIO exporter To: Alexandre Courbot , Linus Walleij , Rob Herring From: Martin Fuzzey Cc: linux-gpio@vger.kernel.org, linux-arm-kernel@lists.infradead.org, devicetree@vger.kernel.org Date: Mon, 13 Apr 2015 13:05:17 +0200 Message-ID: <20150413110517.9681.2438.stgit@localhost> In-Reply-To: <20150413110515.9681.58848.stgit@localhost> References: <20150413110515.9681.58848.stgit@localhost> User-Agent: StGit/0.16 MIME-Version: 1.0 X-Spam-Report: Spam detection software, running on the system "srv025-bes.parkeon.com", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see the administrator of that system for details. Content preview: Signed-off-by: Martin Fuzzey --- .../devicetree/bindings/gpio/gpio-exporter.txt | 40 ++++++++++++++++++++ 1 file changed, 40 insertions(+) create mode 100644 Documentation/devicetree/bindings/gpio/gpio-exporter.txt [...] Content analysis details: (-2.0 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- 0.0 URIBL_BLOCKED ADMINISTRATOR NOTICE: The query to URIBL was blocked. See http://wiki.apache.org/spamassassin/DnsBlocklists#dnsbl-block for more information. [URIs: parkeon.com] -1.0 ALL_TRUSTED Passed through trusted hosts only via SMTP -1.0 RP_MATCHES_RCVD Envelope sender domain matches handover relay domain X-Spam-Score: -2.0 (--) Sender: linux-gpio-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-gpio@vger.kernel.org Signed-off-by: Martin Fuzzey --- .../devicetree/bindings/gpio/gpio-exporter.txt | 40 ++++++++++++++++++++ 1 file changed, 40 insertions(+) create mode 100644 Documentation/devicetree/bindings/gpio/gpio-exporter.txt -- To unsubscribe from this list: send the line "unsubscribe linux-gpio" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html 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>; + }; + + };