arm64: allwinner: a64: allow laptops to wake up from lid
authorIcenowy Zheng <icenowy@aosc.io>
Fri, 22 Jun 2018 16:06:31 +0000 (00:06 +0800)
committerMaxime Ripard <maxime.ripard@bootlin.com>
Mon, 25 Jun 2018 17:08:58 +0000 (19:08 +0200)
Currently all ARM kernels will have s2idle enabled if CONFIG_SUSPEND is
present. In this case if the lid is closed, systemd-logind will enter
s2idle mode by default; however there's no possible wakeup source
defined, so the system will enter a forever idle.

Add the lid itself as a wakeup source, thus the system can wakeup when
the lid is opened.

Signed-off-by: Icenowy Zheng <icenowy@aosc.io>
Signed-off-by: Maxime Ripard <maxime.ripard@bootlin.com>
arch/arm64/boot/dts/allwinner/sun50i-a64-pinebook.dts
arch/arm64/boot/dts/allwinner/sun50i-a64-teres-i.dts

index 58253d6..e6e5bf1 100644 (file)
@@ -49,6 +49,7 @@
                        linux,input-type = <EV_SW>;
                        linux,code = <SW_LID>;
                        linux,can-disable;
+                       wakeup-source;
                };
        };
 
index 02fecc4..33f78e7 100644 (file)
@@ -38,6 +38,7 @@
                        gpios = <&r_pio 0 8 GPIO_ACTIVE_LOW>; /* PL8 */
                        linux,input-type = <EV_SW>;
                        linux,code = <SW_LID>;
+                       wakeup-source;
                };
        };