2015-10-21 18:09:58 +08:00
|
|
|
Specifying wakeup capability for devices
|
|
|
|
============================================
|
|
|
|
|
|
|
|
Any device nodes
|
|
|
|
----------------
|
|
|
|
Nodes that describe devices which has wakeup capability must contain an
|
|
|
|
"wakeup-source" boolean property.
|
|
|
|
|
|
|
|
Also, if device is marked as a wakeup source, then all the primary
|
|
|
|
interrupt(s) can be used as wakeup interrupt(s).
|
|
|
|
|
|
|
|
However if the devices have dedicated interrupt as the wakeup source
|
|
|
|
then they need to specify/identify the same using device specific
|
|
|
|
interrupt name. In such cases only that interrupt can be used as wakeup
|
|
|
|
interrupt.
|
|
|
|
|
|
|
|
List of legacy properties and respective binding document
|
|
|
|
---------------------------------------------------------
|
|
|
|
|
|
|
|
1. "enable-sdio-wakeup" Documentation/devicetree/bindings/mmc/mmc.txt
|
|
|
|
2. "gpio-key,wakeup" Documentation/devicetree/bindings/input/gpio-keys{,-polled}.txt
|
|
|
|
3. "has-tpo" Documentation/devicetree/bindings/rtc/rtc-opal.txt
|
2017-07-07 04:40:03 +08:00
|
|
|
4. "linux,wakeup" Documentation/devicetree/bindings/input/gpio-matrix-keypad.txt
|
2015-10-21 18:09:58 +08:00
|
|
|
Documentation/devicetree/bindings/mfd/tc3589x.txt
|
2018-05-09 02:14:57 +08:00
|
|
|
Documentation/devicetree/bindings/input/touchscreen/ads7846.txt
|
2017-07-07 04:40:03 +08:00
|
|
|
5. "linux,keypad-wakeup" Documentation/devicetree/bindings/input/qcom,pm8xxx-keypad.txt
|
|
|
|
6. "linux,input-wakeup" Documentation/devicetree/bindings/input/samsung-keypad.txt
|
|
|
|
7. "nvidia,wakeup-source" Documentation/devicetree/bindings/input/nvidia,tegra20-kbc.txt
|
2015-10-21 18:09:58 +08:00
|
|
|
|
|
|
|
Examples
|
|
|
|
--------
|
|
|
|
|
|
|
|
1. With "wakeup" interrupt name
|
|
|
|
|
|
|
|
device@10000 {
|
|
|
|
compatible = "vendor,device-id";
|
|
|
|
reg = <0x10000 0x1000>;
|
|
|
|
interrupts = <0 19 4>, <0 21 4>, <0 22 4>;
|
|
|
|
interrupt-names = "ack", "err", "wakeup";
|
|
|
|
wakeup-source;
|
|
|
|
};
|
|
|
|
|
|
|
|
2. Without "wakeup" interrupt name
|
|
|
|
|
|
|
|
embedded-controller {
|
|
|
|
compatible = "google,cros-ec-i2c";
|
|
|
|
reg = <0x1e>;
|
|
|
|
interrupts = <6 0>;
|
|
|
|
interrupt-parent = <&gpx1>;
|
|
|
|
pinctrl-names = "default";
|
|
|
|
pinctrl-0 = <&ec_irq>;
|
|
|
|
wakeup-source;
|
|
|
|
};
|
|
|
|
|
|
|
|
3. Without interrupts
|
|
|
|
|
|
|
|
gpio_keys {
|
|
|
|
compatible = "gpio-keys";
|
|
|
|
#address-cells = <1>;
|
|
|
|
#size-cells = <0>;
|
|
|
|
|
|
|
|
button@1 {
|
2018-02-13 22:15:27 +08:00
|
|
|
debounce-interval = <50>;
|
2015-10-21 18:09:58 +08:00
|
|
|
wakeup-source;
|
|
|
|
linux,code = <116>;
|
|
|
|
label = "POWER";
|
|
|
|
gpios = <&iofpga_gpio0 0 0x4>;
|
|
|
|
};
|
|
|
|
[....]
|
|
|
|
};
|