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: 6207311 Return-Path: X-Original-To: patchwork-linux-arm@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 2EAA4BF4A7 for ; Mon, 13 Apr 2015 11:08:28 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id D91C5202FE for ; Mon, 13 Apr 2015 11:08:25 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.9]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 2CE5F202E9 for ; Mon, 13 Apr 2015 11:08:23 +0000 (UTC) Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1YhcBt-0001Dm-1j; Mon, 13 Apr 2015 11:06:09 +0000 Received: from ip83.parkeon.com ([213.152.31.83] helo=mta2.parkeon.com) by bombadil.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1YhcBX-0000wU-Hb for linux-arm-kernel@lists.infradead.org; Mon, 13 Apr 2015 11:05:49 +0000 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 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-Score: -2.0 (--) X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20150413_040547_782660_4841E1DE X-CRM114-Status: UNSURE ( 6.18 ) X-CRM114-Notice: Please train this message. X-Spam-Score: -0.0 (/) Cc: linux-gpio@vger.kernel.org, linux-arm-kernel@lists.infradead.org, devicetree@vger.kernel.org X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Spam-Status: No, score=-4.2 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_MED, T_RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP 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 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>; + }; + + };