From patchwork Fri Oct 7 15:21:05 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Pantelis Antoniou X-Patchwork-Id: 9366303 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 BBE826075E for ; Fri, 7 Oct 2016 15:26:08 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id AE84A296C3 for ; Fri, 7 Oct 2016 15:26:08 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id A26B4296E6; Fri, 7 Oct 2016 15:26:08 +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.3 required=2.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_HI, RCVD_IN_SORBS_SPAM, T_DKIM_INVALID autolearn=unavailable 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 A019E296DA for ; Fri, 7 Oct 2016 15:26:07 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1757076AbcJGPYn (ORCPT ); Fri, 7 Oct 2016 11:24:43 -0400 Received: from mail-wm0-f42.google.com ([74.125.82.42]:38189 "EHLO mail-wm0-f42.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S938879AbcJGPXj (ORCPT ); Fri, 7 Oct 2016 11:23:39 -0400 Received: by mail-wm0-f42.google.com with SMTP id i130so46049371wmg.1 for ; Fri, 07 Oct 2016 08:23:39 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=konsulko.com; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=/nOij1BFistrHG905lwzx39tLaoKbSM/DXdaN27v3+g=; b=QTp/ICfpk9sORN75G/I3pbWRnqQjwK5SI554uwELNfmR/XsG29jHt+TyWyHXSad1p+ rIayw8FC77BjtIkoxgMaz5NxQBSwUt/MqZl0uKvPQIPrCb4fse75BX19qX3xg3Kchm10 anhwrSPBF+rdYftofqYC2gVXhT72UgXZkfMTs= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=/nOij1BFistrHG905lwzx39tLaoKbSM/DXdaN27v3+g=; b=ke5Bza136gnCXYJIP/ih45fMvFOxdNgX74wHCUwuhMMQD98Ezmjl9j6f/cJhsqLuK1 5K5l2BzIc+F5A2wQWPiZVMX8skqZyc2FJ7vtZs9/edLH2C/ZKdLUoXfjqHjqmpXKw02y 1YHxxsOg7lUX3z2/BZ5WQI8Bvux4cVAWKyQkUJMh475/GotZc25p3I17HaFqSwdsAt28 I60usmcvjTHJl6UguMeT4m1Q1v2SwJgBDhZn4en3nF8RPDrDaNEJAIsi4Yo1RZ78mlvo eK9LW0iQs1OMFFkpuIlBpGoL0LdcfxbHk7PmMwha6ZHfwFJOqYIxXRio0E/MZrIRtlDY DHsQ== X-Gm-Message-State: AA6/9RlQBZw8+TKBD61gEdkt4oRFTfCMDPtGztjCTfDAA4y86VOxwjB8khzzMxZJXcH0kg== X-Received: by 10.28.164.130 with SMTP id n124mr28942942wme.105.1475853818336; Fri, 07 Oct 2016 08:23:38 -0700 (PDT) Received: from localhost.localdomain ([195.97.110.117]) by smtp.gmail.com with ESMTPSA id n5sm20048269wjv.35.2016.10.07.08.23.35 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Fri, 07 Oct 2016 08:23:37 -0700 (PDT) From: Pantelis Antoniou To: Lee Jones Cc: Linus Walleij , Alexandre Courbot , Rob Herring , Mark Rutland , Frank Rowand , Wolfram Sang , Richard Purdie , Jacek Anaszewski , Jean Delvare , Peter Rosin , Avirup Banerjee , Georgi Vlaev , Guenter Roeck , JawaharBalaji Thirumalaisamy , Pantelis Antoniou , devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-gpio@vger.kernel.org, linux-i2c@vger.kernel.org, linux-leds@vger.kernel.org, linux-hwmon@vger.kernel.org Subject: [PATCH 06/10] gpio: gpio-i2cs: Document bindings of I2CS FPGA GPIO block Date: Fri, 7 Oct 2016 18:21:05 +0300 Message-Id: <1475853669-22480-7-git-send-email-pantelis.antoniou@konsulko.com> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1475853669-22480-1-git-send-email-pantelis.antoniou@konsulko.com> References: <1475853669-22480-1-git-send-email-pantelis.antoniou@konsulko.com> Sender: linux-hwmon-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-hwmon@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP From: Georgi Vlaev Add device tree bindings document for the GPIO driver of Juniper's I2CS FPGA. Signed-off-by: Georgi Vlaev [Ported from Juniper kernel] Signed-off-by: Pantelis Antoniou --- .../devicetree/bindings/gpio/jnx,gpio-i2cs.txt | 43 ++++++++++++++++++++++ 1 file changed, 43 insertions(+) create mode 100644 Documentation/devicetree/bindings/gpio/jnx,gpio-i2cs.txt diff --git a/Documentation/devicetree/bindings/gpio/jnx,gpio-i2cs.txt b/Documentation/devicetree/bindings/gpio/jnx,gpio-i2cs.txt new file mode 100644 index 0000000..835b7fb4 --- /dev/null +++ b/Documentation/devicetree/bindings/gpio/jnx,gpio-i2cs.txt @@ -0,0 +1,43 @@ +Juniper I2CS FPGA GPIO presence block + +This is virtual gpio driver, that maps each bit of the I2CS FPGA to +a gpio. It's used as a compatibility replacement for FRUs that use +I2CS FPGA to report presence, control and report power status in +the Juniper's driver infra that uses gpios. Compatible with any I2CS. + +Required properties: + +Required properties: +- compatible: "jnx,gpio-i2cs" + +- reg: + Address on the I2C bus of the I2CS FPGA + +- gpio-controller: Marks the device node as a gpio controller. + +- interrupt-controller: Marks the device node as an interrupt + controller. + +- i2c-gpio-map: Map of "I2CS register" and "direction". The registers + are 8 bit wide, each bit of the register is mapped to either + input or output depending on the bits of the "direction". If + the bit in the direction is 1, then that bit from the I2CS + register is mapped to gpio input, otherwise to gpio output. + +- #gpio-cells : Should be two. The first cell is the pin number and + the second cell is used to specify the gpio polarity: + 0 = active high + 1 = active low + +Optional properties: + +Example: + +cb0_slave: i2c-slave@54 { + compatible = "jnx,gpio-i2cs"; + reg = <0x54>; + #gpio-cells = <2>; + gpio-controller; + interrupt-controller; + i2c-gpio-map = <0x21 0xff>; /* power status (bit 6) */ +};