wakeup-source.txt 2.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273
  1. Specifying wakeup capability for devices
  2. ============================================
  3. Any device nodes
  4. ----------------
  5. Nodes that describe devices which have wakeup capability may contain a
  6. "wakeup-source" boolean property.
  7. If the device is marked as a wakeup-source, interrupt wake capability depends
  8. on the device specific "interrupt-names" property. If no interrupts are labeled
  9. as wake capable, then it is up to the device to determine which interrupts can
  10. wake the system.
  11. However if a device has a dedicated interrupt as the wakeup source, then it
  12. needs to specify/identify it using a device specific interrupt name. In such
  13. cases only that interrupt can be used as a wakeup interrupt.
  14. While various legacy interrupt names exist, new devices should use "wakeup" as
  15. the canonical interrupt name.
  16. List of legacy properties and respective binding document
  17. ---------------------------------------------------------
  18. 1. "gpio-key,wakeup" Documentation/devicetree/bindings/input/gpio-keys{,-polled}.txt
  19. 2. "has-tpo" Documentation/devicetree/bindings/rtc/rtc-opal.txt
  20. 3. "linux,wakeup" Documentation/devicetree/bindings/input/gpio-matrix-keypad.yaml
  21. Documentation/devicetree/bindings/mfd/tc3589x.txt
  22. Documentation/devicetree/bindings/input/touchscreen/ti,ads7843.yaml
  23. 4. "linux,keypad-wakeup" Documentation/devicetree/bindings/input/qcom,pm8921-keypad.yaml
  24. 5. "linux,input-wakeup" Documentation/devicetree/bindings/input/samsung,s3c6410-keypad.yaml
  25. 6. "nvidia,wakeup-source" Documentation/devicetree/bindings/input/nvidia,tegra20-kbc.txt
  26. Examples
  27. --------
  28. 1. With "wakeup" interrupt name
  29. device@10000 {
  30. compatible = "vendor,device-id";
  31. reg = <0x10000 0x1000>;
  32. interrupts = <0 19 4>, <0 21 4>, <0 22 4>;
  33. interrupt-names = "ack", "err", "wakeup";
  34. wakeup-source;
  35. };
  36. 2. Without "wakeup" interrupt name
  37. embedded-controller {
  38. compatible = "google,cros-ec-i2c";
  39. reg = <0x1e>;
  40. interrupts = <6 0>;
  41. interrupt-parent = <&gpx1>;
  42. pinctrl-names = "default";
  43. pinctrl-0 = <&ec_irq>;
  44. wakeup-source;
  45. };
  46. 3. Without interrupts
  47. gpio_keys {
  48. compatible = "gpio-keys";
  49. #address-cells = <1>;
  50. #size-cells = <0>;
  51. button@1 {
  52. debounce-interval = <50>;
  53. wakeup-source;
  54. linux,code = <116>;
  55. label = "POWER";
  56. gpios = <&iofpga_gpio0 0 0x4>;
  57. };
  58. [....]
  59. };