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