From patchwork Fri May 29 02:14:07 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Gregory Fong X-Patchwork-Id: 477539 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 DBD3814016A for ; Fri, 29 May 2015 12:15:52 +1000 (AEST) Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b=yuLbx/yY; dkim-atps=neutral Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755404AbbE2CPu (ORCPT ); Thu, 28 May 2015 22:15:50 -0400 Received: from mail-pa0-f52.google.com ([209.85.220.52]:33649 "EHLO mail-pa0-f52.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755382AbbE2CPA (ORCPT ); Thu, 28 May 2015 22:15:00 -0400 Received: by padbw4 with SMTP id bw4so36999484pad.0; Thu, 28 May 2015 19:14:59 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=nqH67A7/rJ6XKCfw0jsyqlQNJ4K7PkSL13o50wvwPVA=; b=yuLbx/yYVfQ3d7+6W/uKRtMvjWAwGcmclwQZq6OkTP7fq8rLXYtQuBB2YQdbpMrQGF dIEhc7YKCqRA2DvEFz/vVEZb31SycDKkTj7JCW4sx/V6BNCA/WzaGtk++IGpf0tA5eHO YXZ6nswB/cblK9ZjcK/OWbUNQMrDXxRbu05G6265lqKSkm0mNYHlqLZPskBB3S5O+QfW ToO0W2XL6uqhthH2XN9ih791H8IJnXr96sDGR2Xnx4C8pRbSUKat8eoVFg/HfUyW7Vau czwy80rAIH/co63uqBBeRXt9n0O1xYCDqQAjmNTH6BTaEP8JgtzzwluXIH7UL0c94ZKw p6Xw== X-Received: by 10.68.88.33 with SMTP id bd1mr10908490pbb.124.1432865699734; Thu, 28 May 2015 19:14:59 -0700 (PDT) Received: from gregory-irv-00.irv.broadcom.com (5520-maca-inet1-outside.broadcom.com. [216.31.211.11]) by mx.google.com with ESMTPSA id ph4sm3722456pdb.43.2015.05.28.19.14.57 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Thu, 28 May 2015 19:14:58 -0700 (PDT) From: Gregory Fong To: linux-gpio@vger.kernel.org Cc: Gregory Fong , Alexandre Courbot , bcm-kernel-feedback-list@broadcom.com, Brian Norris , devicetree@vger.kernel.org, Florian Fainelli , Ian Campbell , Kumar Gala , Linus Walleij , linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, Mark Rutland , Pawel Moll , Rob Herring , Russell King Subject: [PATCH v2 3/6] dt-bindings: brcmstb-gpio: document properties for wakeup Date: Thu, 28 May 2015 19:14:07 -0700 Message-Id: <1432865650-4062-4-git-send-email-gregory.0xf0@gmail.com> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1432865650-4062-1-git-send-email-gregory.0xf0@gmail.com> References: <1432865650-4062-1-git-send-email-gregory.0xf0@gmail.com> Sender: linux-gpio-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-gpio@vger.kernel.org Some brcmstb GPIO controllers can be used to wake from suspend, so use the de facto standard property 'wakeup-source' to mark the nodes of controllers with that capability. Also document interrupts-extended, which will be used for wakeup handling because the interrupt parent for the wake IRQ is different from the regular IRQ. Signed-off-by: Gregory Fong Reviewed-by: Brian Norris --- New in v2. .../devicetree/bindings/gpio/brcm,brcmstb-gpio.txt | 26 +++++++++++++++++++++- 1 file changed, 25 insertions(+), 1 deletion(-) diff --git a/Documentation/devicetree/bindings/gpio/brcm,brcmstb-gpio.txt b/Documentation/devicetree/bindings/gpio/brcm,brcmstb-gpio.txt index 435f1bc..568814f 100644 --- a/Documentation/devicetree/bindings/gpio/brcm,brcmstb-gpio.txt +++ b/Documentation/devicetree/bindings/gpio/brcm,brcmstb-gpio.txt @@ -33,6 +33,12 @@ Optional properties: - interrupt-parent: phandle of the parent interrupt controller +- interrupts-extended: + Alternate form of specifying interrupts and parents that allows for + multiple parents. This takes precedence over 'interrupts' and + 'interrupt-parent'. This probably must be used if the wakeup-source + property is provided because that may have a different interrupt parent. + - #interrupt-cells: Should be <2>. The first cell is the GPIO number, the second should specify flags. The following subset of flags is supported: @@ -48,7 +54,10 @@ Optional properties: Marks the device node as an interrupt controller - interrupt-names: - The name of the IRQ resource used by this controller + The names of the IRQ resources used by this controller + +- wakeup-source: + GPIOs for this controller can be used as a wakeup source Example: upg_gio: gpio@f040a700 { @@ -63,3 +72,18 @@ Example: interrupt-names = "upg_gio"; brcm,gpio-bank-widths = <0x20 0x20 0x20 0x18>; }; + + upg_gio_aon: gpio@f04172c0 { + #gpio-cells = <0x2>; + #interrupt-cells = <0x2>; + compatible = "brcm,bcm7445-gpio", "brcm,brcmstb-gpio"; + gpio-controller; + interrupt-controller; + reg = <0xf04172c0 0x40>; + interrupt-parent = <0xc>; + interrupts = <0x6>; + interrupts-extended = <0xc 0x6 0xa 0x5>; + interrupt-names = "upg_gio_aon", "upg_gio_aon_wakeup"; + wakeup-source; + brcm,gpio-bank-widths = <0x12 0x4>; + };