arm64: allwinner: a64: allow laptops to wake up from lid

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>
This commit is contained in:
Icenowy Zheng 2018-06-23 00:06:31 +08:00 committed by Maxime Ripard
parent e4357c82e3
commit 48f3e7bf38
No known key found for this signature in database
GPG Key ID: D2B4C094214DAF74
2 changed files with 2 additions and 0 deletions

View File

@ -49,6 +49,7 @@ lid_switch {
linux,input-type = <EV_SW>;
linux,code = <SW_LID>;
linux,can-disable;
wakeup-source;
};
};

View File

@ -38,6 +38,7 @@ lid-switch {
gpios = <&r_pio 0 8 GPIO_ACTIVE_LOW>; /* PL8 */
linux,input-type = <EV_SW>;
linux,code = <SW_LID>;
wakeup-source;
};
};