Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

dt-bindings: brcmstb-gpio: document properties for wakeup

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>
Signed-off-by: Gregory Fong <gregory.0xf0@gmail.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>

authored by

Gregory Fong and committed by
Linus Walleij
7c50181b d32651f6

+28 -7
+28 -7
Documentation/devicetree/bindings/gpio/brcm,brcmstb-gpio.txt
··· 33 33 - interrupt-parent: 34 34 phandle of the parent interrupt controller 35 35 36 + - interrupts-extended: 37 + Alternate form of specifying interrupts and parents that allows for 38 + multiple parents. This takes precedence over 'interrupts' and 39 + 'interrupt-parent'. Wakeup-capable GPIO controllers often route their 40 + wakeup interrupt lines through a different interrupt controller than the 41 + primary interrupt line, making this property necessary. 42 + 36 43 - #interrupt-cells: 37 44 Should be <2>. The first cell is the GPIO number, the second should specify 38 45 flags. The following subset of flags is supported: ··· 54 47 - interrupt-controller: 55 48 Marks the device node as an interrupt controller 56 49 57 - - interrupt-names: 58 - The name of the IRQ resource used by this controller 50 + - wakeup-source: 51 + GPIOs for this controller can be used as a wakeup source 59 52 60 53 Example: 61 54 upg_gio: gpio@f040a700 { 62 - #gpio-cells = <0x2>; 63 - #interrupt-cells = <0x2>; 55 + #gpio-cells = <2>; 56 + #interrupt-cells = <2>; 64 57 compatible = "brcm,bcm7445-gpio", "brcm,brcmstb-gpio"; 65 58 gpio-controller; 66 59 interrupt-controller; 67 60 reg = <0xf040a700 0x80>; 68 - interrupt-parent = <0xf>; 61 + interrupt-parent = <&irq0_intc>; 69 62 interrupts = <0x6>; 70 - interrupt-names = "upg_gio"; 71 - brcm,gpio-bank-widths = <0x20 0x20 0x20 0x18>; 63 + brcm,gpio-bank-widths = <32 32 32 24>; 64 + }; 65 + 66 + upg_gio_aon: gpio@f04172c0 { 67 + #gpio-cells = <2>; 68 + #interrupt-cells = <2>; 69 + compatible = "brcm,bcm7445-gpio", "brcm,brcmstb-gpio"; 70 + gpio-controller; 71 + interrupt-controller; 72 + reg = <0xf04172c0 0x40>; 73 + interrupt-parent = <&irq0_aon_intc>; 74 + interrupts = <0x6>; 75 + interrupts-extended = <&irq0_aon_intc 0x6>, 76 + <&aon_pm_l2_intc 0x5>; 77 + wakeup-source; 78 + brcm,gpio-bank-widths = <18 4>; 72 79 };