From patchwork Mon Aug 21 19:31:42 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Danilo Krummrich X-Patchwork-Id: 9913575 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id D1432603FA for ; Mon, 21 Aug 2017 19:40:31 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id C325628803 for ; Mon, 21 Aug 2017 19:40:31 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id B804A28814; Mon, 21 Aug 2017 19:40:31 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.9 required=2.0 tests=BAYES_00,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 4550F2881C for ; Mon, 21 Aug 2017 19:40:31 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753665AbdHUTkD (ORCPT ); Mon, 21 Aug 2017 15:40:03 -0400 Received: from hs01.dk-develop.de ([213.136.71.231]:54938 "EHLO hs01.dk-develop.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753610AbdHUTkC (ORCPT ); Mon, 21 Aug 2017 15:40:02 -0400 Received: from hs01.dk-develop.de (vmd3785.contabo.host [213.136.71.231]) by hs01.dk-develop.de (Postfix) with ESMTPSA id 5277E1320E98; Mon, 21 Aug 2017 21:31:44 +0200 (CEST) From: Danilo Krummrich To: linux-kernel@vger.kernel.org, linux-input@vger.kernel.org, dmitry.torokhov@gmail.com, linus.walleij@linaro.org, rdunlap@infradead.org, devicetree@vger.kernel.org, robh@kernel.org Cc: Danilo Krummrich Subject: [PATCH v9 2/2] dt-bindings: new binding for ps/2 gpio devices Date: Mon, 21 Aug 2017 21:31:42 +0200 Message-Id: <20170821193142.29688-3-danilokrummrich@dk-develop.de> X-Mailer: git-send-email 2.14.1 In-Reply-To: <20170821193142.29688-1-danilokrummrich@dk-develop.de> References: <20170821193142.29688-1-danilokrummrich@dk-develop.de> Sender: linux-input-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-input@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP The PS/2 gpio device binding defines the gpio pins (data and clock) as well as the interrupt which should be used to drive the ps/2 bus. It is expected to get an interrupt on the falling edge of the clock line. Also it can be configured whether the host should support writing to the device. Signed-off-by: Danilo Krummrich Acked-by: Rob Herring --- .../devicetree/bindings/serio/ps2-gpio.txt | 23 ++++++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100644 Documentation/devicetree/bindings/serio/ps2-gpio.txt diff --git a/Documentation/devicetree/bindings/serio/ps2-gpio.txt b/Documentation/devicetree/bindings/serio/ps2-gpio.txt new file mode 100644 index 000000000000..7b7bc9cdf986 --- /dev/null +++ b/Documentation/devicetree/bindings/serio/ps2-gpio.txt @@ -0,0 +1,23 @@ +Device-Tree binding for ps/2 gpio device + +Required properties: + - compatible = "ps2-gpio" + - data-gpios: the data pin + - clk-gpios: the clock pin + - interrupts: Should trigger on the falling edge of the clock line. + +Optional properties: + - write-enable: Indicates whether write function is provided + to serio device. Possibly providing the write fn will not work, because + of the tough timing requirements. + +Example nodes: + +ps2@0 { + compatible = "ps2-gpio"; + interrupt-parent = <&gpio>; + interrupts = <23 IRQ_TYPE_EDGE_FALLING>; + data-gpios = <&gpio 24 GPIO_ACTIVE_HIGH>; + clk-gpios = <&gpio 23 GPIO_ACTIVE_HIGH>; + write-enable; +};