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

Documentation: devicetree: standardize/consolidate on "wakeup-source" property

Currently different drivers use multiple forms of annotating devices
that should be set up as wakeup sources for the system.

This patch adds a separate binding document inorder to standardize and
consolidate to use "wakeup-source" boolean property to mark the devices
as wakeup capable.

Cc: Rob Herring <robh+dt@kernel.org>
Cc: Pawel Moll <pawel.moll@arm.com>
Cc: Mark Rutland <mark.rutland@arm.com>
Cc: Ian Campbell <ijc+devicetree@hellion.org.uk>
Signed-off-by: Sudeep Holla <sudeep.holla@arm.com>
Signed-off-by: Rob Herring <robh@kernel.org>

authored by

Sudeep Holla and committed by
Rob Herring
a68eee4c 0b13ea8e

+71
+71
Documentation/devicetree/bindings/power/wakeup-source.txt
··· 1 + Specifying wakeup capability for devices 2 + ============================================ 3 + 4 + Any device nodes 5 + ---------------- 6 + Nodes that describe devices which has wakeup capability must contain an 7 + "wakeup-source" boolean property. 8 + 9 + Also, if device is marked as a wakeup source, then all the primary 10 + interrupt(s) can be used as wakeup interrupt(s). 11 + 12 + However if the devices have dedicated interrupt as the wakeup source 13 + then they need to specify/identify the same using device specific 14 + interrupt name. In such cases only that interrupt can be used as wakeup 15 + interrupt. 16 + 17 + List of legacy properties and respective binding document 18 + --------------------------------------------------------- 19 + 20 + 1. "enable-sdio-wakeup" Documentation/devicetree/bindings/mmc/mmc.txt 21 + 2. "gpio-key,wakeup" Documentation/devicetree/bindings/input/gpio-keys{,-polled}.txt 22 + 3. "has-tpo" Documentation/devicetree/bindings/rtc/rtc-opal.txt 23 + 4. "isil,irq2-can-wakeup-machine" Documentation/devicetree/bindings/rtc/isil,isl12057.txt 24 + 5. "linux,wakeup" Documentation/devicetree/bindings/input/gpio-matrix-keypad.txt 25 + Documentation/devicetree/bindings/mfd/tc3589x.txt 26 + Documentation/devicetree/bindings/input/ads7846.txt 27 + 6. "linux,keypad-wakeup" Documentation/devicetree/bindings/input/qcom,pm8xxx-keypad.txt 28 + 7. "linux,input-wakeup" Documentation/devicetree/bindings/input/samsung-keypad.txt 29 + 8. "nvidia,wakeup-source" Documentation/devicetree/bindings/input/nvidia,tegra20-kbc.txt 30 + 31 + Examples 32 + -------- 33 + 34 + 1. With "wakeup" interrupt name 35 + 36 + device@10000 { 37 + compatible = "vendor,device-id"; 38 + reg = <0x10000 0x1000>; 39 + interrupts = <0 19 4>, <0 21 4>, <0 22 4>; 40 + interrupt-names = "ack", "err", "wakeup"; 41 + wakeup-source; 42 + }; 43 + 44 + 2. Without "wakeup" interrupt name 45 + 46 + embedded-controller { 47 + compatible = "google,cros-ec-i2c"; 48 + reg = <0x1e>; 49 + interrupts = <6 0>; 50 + interrupt-parent = <&gpx1>; 51 + pinctrl-names = "default"; 52 + pinctrl-0 = <&ec_irq>; 53 + wakeup-source; 54 + }; 55 + 56 + 3. Without interrupts 57 + 58 + gpio_keys { 59 + compatible = "gpio-keys"; 60 + #address-cells = <1>; 61 + #size-cells = <0>; 62 + 63 + button@1 { 64 + debounce_interval = <50>; 65 + wakeup-source; 66 + linux,code = <116>; 67 + label = "POWER"; 68 + gpios = <&iofpga_gpio0 0 0x4>; 69 + }; 70 + [....] 71 + };