From patchwork Tue Jan 13 13:41:45 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Semen Protsenko X-Patchwork-Id: 428368 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 50DEE1400EA for ; Wed, 14 Jan 2015 00:42:23 +1100 (AEDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752265AbbAMNmW (ORCPT ); Tue, 13 Jan 2015 08:42:22 -0500 Received: from exprod5og108.obsmtp.com ([64.18.0.186]:51412 "EHLO exprod5og108.obsmtp.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752079AbbAMNmF (ORCPT ); Tue, 13 Jan 2015 08:42:05 -0500 Received: from mail-lb0-f181.google.com ([209.85.217.181]) (using TLSv1) by exprod5ob108.postini.com ([64.18.4.12]) with SMTP ID DSNKVLUgrBo8wmMKgwDo6G5KxkmqA9xUIuum@postini.com; Tue, 13 Jan 2015 05:42:04 PST Received: by mail-lb0-f181.google.com with SMTP id l4so2576099lbv.12 for ; Tue, 13 Jan 2015 05:42:02 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=globallogic.com; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=LsjzsXbKl+umztsH/gXmT6SdNtiEbukT/+Wms/kBPBY=; b=WBLOefzeNa5trjEpF+HC6mLEtUqZxmYdSkSgzbygQ/Tzr9jsCrAonq0ZGUsDNNYnFD YEpXhP+8FIBV6dRLKqZFFZOcjvSE15Y+HYViPZVZ9WICAhoZG8gcq1LTwOjfgmdH8ZfB gKQOMQ5t2fioaqv0ndgYhocFFE9FcatZc5Brk= 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=LsjzsXbKl+umztsH/gXmT6SdNtiEbukT/+Wms/kBPBY=; b=Tdlbs8WOAZYK78D0AdSaKSv80JKfTNLlFKo0j/WgEHEEjNjfuAbiT3waUS0Q6XgMxw DUiFtb4So1ZEALW5ykbnG6+CxQAz1rswpZWoQDbc8JtTyLjKdC6ISZm8ByEF+uxEc6CU Gw02cftpKbKMHpLa8Tk46CPBrcKRihO1U/mvpSwlyjyexe5XeFn36o/0dvo6nMm2xlHB Poz5NbfFrJCiwneRunP/toCou2eNDDVWvHDQ96+4K16SwXi8V5Z4yDK9yvnfVJbAcjj8 H9SeMVUacXj3O7Nqf06vU2L4QG6jZl4yYbHu/77Ef4KEIK+OjeJAmaT3pBjdnRdloPIZ PecQ== X-Gm-Message-State: ALoCoQnCKr1HvnWxNRdqYBt6j0O/rg11sHOZQM9IQLMjwPhzLpSrh1QhLxz78BzHzT2qkvlwJi24Ppf9Pd1OQrUXttx+xhsp+4xqBsCN/wg5PQ72IeRVSXTiAm6uigz0DD4QQHvzsHUEUgZcIjwqxchYVkrjKZpECQ== X-Received: by 10.152.206.41 with SMTP id ll9mr42676826lac.62.1421156522915; Tue, 13 Jan 2015 05:42:02 -0800 (PST) X-Received: by 10.152.206.41 with SMTP id ll9mr42676812lac.62.1421156522860; Tue, 13 Jan 2015 05:42:02 -0800 (PST) Received: from localhost ([195.238.92.132]) by mx.google.com with ESMTPSA id lh6sm845591lab.49.2015.01.13.05.42.02 (version=TLSv1.2 cipher=RC4-SHA bits=128/128); Tue, 13 Jan 2015 05:42:02 -0800 (PST) From: Semen Protsenko To: Linus Walleij , Alexandre Courbot Cc: Grant Likely , Mark Rutland , linux-gpio@vger.kernel.org, linux-kernel@vger.kernel.org, devicetree@vger.kernel.org, Marc Zyngier , Grygorii Strashko , Illia Smyrnov Subject: [PATCH 4/4] gpio: max732x: Add DT binding documentation Date: Tue, 13 Jan 2015 15:41:45 +0200 Message-Id: <1421156505-16600-5-git-send-email-semen.protsenko@globallogic.com> X-Mailer: git-send-email 1.7.9.5 In-Reply-To: <1421156505-16600-1-git-send-email-semen.protsenko@globallogic.com> References: <1421156505-16600-1-git-send-email-semen.protsenko@globallogic.com> Sender: linux-gpio-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-gpio@vger.kernel.org Add a devicetree binding documentation for the max732x driver. Signed-off-by: Semen Protsenko --- .../devicetree/bindings/gpio/gpio-max732x.txt | 59 ++++++++++++++++++++ 1 file changed, 59 insertions(+) create mode 100644 Documentation/devicetree/bindings/gpio/gpio-max732x.txt diff --git a/Documentation/devicetree/bindings/gpio/gpio-max732x.txt b/Documentation/devicetree/bindings/gpio/gpio-max732x.txt new file mode 100644 index 0000000..5fdc843 --- /dev/null +++ b/Documentation/devicetree/bindings/gpio/gpio-max732x.txt @@ -0,0 +1,59 @@ +* MAX732x-compatible I/O expanders + +Required properties: + - compatible: Should be one of the following: + - "maxim,max7319": For the Maxim MAX7319 + - "maxim,max7320": For the Maxim MAX7320 + - "maxim,max7321": For the Maxim MAX7321 + - "maxim,max7322": For the Maxim MAX7322 + - "maxim,max7323": For the Maxim MAX7323 + - "maxim,max7324": For the Maxim MAX7324 + - "maxim,max7325": For the Maxim MAX7325 + - "maxim,max7326": For the Maxim MAX7326 + - "maxim,max7327": For the Maxim MAX7327 + - reg: I2C slave address for this device. + - gpio-controller: Marks the device node as a GPIO controller. + - #gpio-cells: Should be 2. + - first cell is the GPIO number + - second cell specifies GPIO flags, as defined in . + Only the GPIO_ACTIVE_HIGH and GPIO_ACTIVE_LOW flags are supported. + +Optional properties: + + The I/O expander can detect input state changes, and thus optionally act as + an interrupt controller. When the expander interrupt line is connected all the + following properties must be set. For more information please see the + interrupt controller device tree bindings documentation available at + Documentation/devicetree/bindings/interrupt-controller/interrupts.txt. + + - interrupt-controller: Identifies the node as an interrupt controller. + - #interrupt-cells: Number of cells to encode an interrupt source, shall be 2. + - first cell is the pin number + - second cell is used to specify flags + - interrupt-parent: phandle of the parent interrupt controller. + - interrupts: Interrupt specifier for the controllers interrupt. + +Please refer to gpio.txt in this directory for details of the common GPIO +bindings used by client devices. + +Example 1. MAX7325 with interrupt support enabled (CONFIG_GPIO_MAX732X_IRQ=y): + + expander: max7325@6d { + compatible = "maxim,max7325"; + reg = <0x6d>; + gpio-controller; + #gpio-cells = <2>; + interrupt-controller; + #interrupt-cells = <2>; + interrupt-parent = <&gpio4>; + interrupts = <29 IRQ_TYPE_EDGE_FALLING>; + }; + +Example 2. MAX7325 with interrupt support disabled (CONFIG_GPIO_MAX732X_IRQ=n): + + expander: max7325@6d { + compatible = "maxim,max7325"; + reg = <0x6d>; + gpio-controller; + #gpio-cells = <2>; + };