ACPI / button: Add quirks for initial lid state notification
authorLv Zheng <lv.zheng@intel.com>
Wed, 1 Jun 2016 10:10:48 +0000 (18:10 +0800)
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>
Wed, 22 Jun 2016 00:10:17 +0000 (02:10 +0200)
commit3540c32a9ae4cb23ab70f7798f45affc02762fa7
tree77bb6a7d07af7a2afa75ca4c86e5f1b35499f150
parentee7e22653f5077169ec706b5a140a3be9db381e7
ACPI / button: Add quirks for initial lid state notification

Linux userspace (systemd-logind) keeps on rechecking lid state when the
lid state is closed. If it failed to update the lid state to open after
boot/resume, the system suspending right after the boot/resume could be
resulted.

Graphics drivers also use the lid notifications to implment
MODESET_ON_LID_OPEN option.

Before the situation is improved from the userspace and from the graphics
driver, users can simply configure ACPI button driver to send initial
"open" lid state using button.lid_init_state=open to avoid such kind of
issues.

And our ultimate target should be making button.lid_init_state=ignore
the default behavior.  This patch implements the 2 options and keep the
old behavior (button.lid_init_state=method).

Link: https://lkml.org/2016/3/7/460
Link: https://github.com/systemd/systemd/issues/2087
Signed-off-by: Lv Zheng <lv.zheng@intel.com>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
drivers/acpi/button.c