wakeup-source.txt 2.1 KB

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