Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1197901

[PATCH v4 1/4] dt-bindings: brcmstb-gpio: document properties for wakeup

Path csiph.com!aioe.org!news.servidellagleba.it!bofh.it!news.nic.it!robomod
From Gregory Fong <gregory.0xf0@gmail.com>
Newsgroups linux.kernel
Subject [PATCH v4 1/4] dt-bindings: brcmstb-gpio: document properties for wakeup
Date Sat, 01 Aug 2015 03:20:02 +0200
Message-ID <pStCW-6lv-13@gated-at.bofh.it> (permalink)
References <pStCV-6lv-3@gated-at.bofh.it>
X-Original-To Linus Walleij <linus.walleij@linaro.org>
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=ge0CNDtpSclZLtRHGKY16AGgboKtBAFupAynVT8r6E0=; b=XzvdJHlrREbI1QkxTv83tYBZnpnIaqHqZFkT35qj7xSaJ6TH/g8AkYUlAdppxvHj9/ ElEgTlfYXkQFEntEJoe3Ws/cm82ZJcxLGi5ULx3ivRKcGPF0VFH9ht2Rmp3ctt6g4NRW gpuz3MqzgZHWhY7BkJTbD9jKcO23ajlTbYISvB9OABAnr4ob5Aad0anIQV/+hv8J7X8O ciaDgf6JtBUEm7tljYTibIHDNmLlNp6VCNyXQZgqvx3kFSTqDzyJHhxoSv6s5WsASzW/ WScseSAJbh91BNuZW2Tohhow9ND9KNjb+4/nuLE4r457ro1VMXZtS8sItsNN4ROEL5JX fTHA==
X-Received by 10.70.65.99 with SMTP id w3mr13270503pds.132.1438391874421; Fri, 31 Jul 2015 18:17:54 -0700 (PDT)
X-Mailer git-send-email 1.9.1
Sender robomod@news.nic.it
List-ID <linux-kernel.vger.kernel.org>
X-Mailing-List linux-kernel@vger.kernel.org
Approved robomod@news.nic.it
Lines 92
Organization linux.* mail to news gateway
X-Original-Cc Gregory Fong <gregory.0xf0@gmail.com>, Alexandre Courbot <gnurou@gmail.com>, bcm-kernel-feedback-list@broadcom.com, Brian Norris <computersforpeace@gmail.com>, devicetree@vger.kernel.org, Florian Fainelli <f.fainelli@gmail.com>, Ian Campbell <ijc+devicetree@hellion.org.uk>, Kumar Gala <galak@codeaurora.org>, linux-arm-kernel@lists.infradead.org, linux-gpio@vger.kernel.org, linux-kernel@vger.kernel.org, Mark Rutland <mark.rutland@arm.com>, Pawel Moll <pawel.moll@arm.com>, Rob Herring <robh+dt@kernel.org>, Russell King <linux@arm.linux.org.uk>
X-Original-Date Fri, 31 Jul 2015 18:17:42 -0700
X-Original-Message-ID <1438391865-7862-2-git-send-email-gregory.0xf0@gmail.com>
X-Original-References <1438391865-7862-1-git-send-email-gregory.0xf0@gmail.com>
X-Original-Sender linux-kernel-owner@vger.kernel.org
Xref aioe.org linux.kernel:1197901

Show key headers only | View raw


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.

While we're at it, a few more fixes: We don't actually use the
"interrupt-names" property, so remove it from the listed optional
properties and from the examples.  And since we're modifying the
examples, also follow Brian's suggestions to:
- change #gpio-cells, #interrupt-cells, and brcm,gpio-bank-widths from
  hex to dec
- use phandles

Reviewed-by: Brian Norris <computersforpeace@gmail.com>
Acked-by: Florian Fainelli <f.fainelli@gmail.com>
Signed-off-by: Gregory Fong <gregory.0xf0@gmail.com>
---
v4: no changes from v3

 .../devicetree/bindings/gpio/brcm,brcmstb-gpio.txt | 35 +++++++++++++++++-----
 1 file changed, 28 insertions(+), 7 deletions(-)

diff --git a/Documentation/devicetree/bindings/gpio/brcm,brcmstb-gpio.txt b/Documentation/devicetree/bindings/gpio/brcm,brcmstb-gpio.txt
index 435f1bc..b405b44 100644
--- a/Documentation/devicetree/bindings/gpio/brcm,brcmstb-gpio.txt
+++ b/Documentation/devicetree/bindings/gpio/brcm,brcmstb-gpio.txt
@@ -33,6 +33,13 @@ 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'.  Wakeup-capable GPIO controllers often route their
+    wakeup interrupt lines through a different interrupt controller than the
+    primary interrupt line, making this property necessary.
+
 - #interrupt-cells:
     Should be <2>.  The first cell is the GPIO number, the second should specify
     flags.  The following subset of flags is supported:
@@ -47,19 +54,33 @@ Optional properties:
 - interrupt-controller:
     Marks the device node as an interrupt controller
 
-- interrupt-names:
-    The name of the IRQ resource used by this controller
+- wakeup-source:
+    GPIOs for this controller can be used as a wakeup source
 
 Example:
 	upg_gio: gpio@f040a700 {
-		#gpio-cells = <0x2>;
-		#interrupt-cells = <0x2>;
+		#gpio-cells = <2>;
+		#interrupt-cells = <2>;
 		compatible = "brcm,bcm7445-gpio", "brcm,brcmstb-gpio";
 		gpio-controller;
 		interrupt-controller;
 		reg = <0xf040a700 0x80>;
-		interrupt-parent = <0xf>;
+		interrupt-parent = <&irq0_intc>;
+		interrupts = <0x6>;
+		brcm,gpio-bank-widths = <32 32 32 24>;
+	};
+
+	upg_gio_aon: gpio@f04172c0 {
+		#gpio-cells = <2>;
+		#interrupt-cells = <2>;
+		compatible = "brcm,bcm7445-gpio", "brcm,brcmstb-gpio";
+		gpio-controller;
+		interrupt-controller;
+		reg = <0xf04172c0 0x40>;
+		interrupt-parent = <&irq0_aon_intc>;
 		interrupts = <0x6>;
-		interrupt-names = "upg_gio";
-		brcm,gpio-bank-widths = <0x20 0x20 0x20 0x18>;
+		interrupts-extended = <&irq0_aon_intc 0x6>,
+			<&aon_pm_l2_intc 0x5>;
+		wakeup-source;
+		brcm,gpio-bank-widths = <18 4>;
 	};
-- 
1.9.1

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread


Thread

[PATCH v4 0/4] GPIO support for BRCMSTB Gregory Fong <gregory.0xf0@gmail.com> - 2015-08-01 03:20 +0200
  [PATCH v4 4/4] ARM: dts: brcmstb: add BCM7445 GPIO nodes Gregory Fong <gregory.0xf0@gmail.com> - 2015-08-01 03:20 +0200
    Re: [PATCH v4 4/4] ARM: dts: brcmstb: add BCM7445 GPIO nodes Florian Fainelli <f.fainelli@gmail.com> - 2015-08-03 19:40 +0200
  [PATCH v4 1/4] dt-bindings: brcmstb-gpio: document properties for wakeup Gregory Fong <gregory.0xf0@gmail.com> - 2015-08-01 03:20 +0200
  [PATCH v4 2/4] gpio: brcmstb: Add interrupt and wakeup source support Gregory Fong <gregory.0xf0@gmail.com> - 2015-08-01 03:20 +0200
  Re: [PATCH v4 0/4] GPIO support for BRCMSTB Florian Fainelli <f.fainelli@gmail.com> - 2015-08-03 19:40 +0200

csiph-web