]> asedeno.scripts.mit.edu Git - linux.git/commit
ACPI: button: Turn lid_blacklst DMI table into a generic quirk table
authorHans de Goede <hdegoede@redhat.com>
Sat, 26 Oct 2019 20:24:33 +0000 (22:24 +0200)
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>
Mon, 28 Oct 2019 14:40:26 +0000 (15:40 +0100)
commitd7cd08231a7fafb0d81786515527651d3242a7f4
tree93f02c89443e386255e0112c7aa9fee890db6a0b
parent593681e2c75f59f23cf6f6cefc4f00cae2a4522b
ACPI: button: Turn lid_blacklst DMI table into a generic quirk table

Commit 3540c32a9ae4 ("ACPI / button: Add quirks for initial lid state
notification") added 3 different modes to the LID handling code to deal
with various buggy implementations.

Until now users which need one of the 2 non-default modes to get their
HW to work have to pass a kernel commandline option for this.

E.g. https://bugzilla.kernel.org/show_bug.cgi?id=106151 was closed with a
note that the user has to add "button.lid_init_state=open" to the kernel
commandline to get the LID code to not cause undesirable suspends on his
Samsung N210 Plus.

This commit modifies the existing lid_blacklst DMI table so that it can
be used not only to completely disable the LID code on devices where
the ACPI tables are broken beyond repair, but also to select one of the 2
non default LID handling modes on devices where this is necessary.

This will allow us to add quirks to make the LID work OOTB on broken
devices. Getting this working OOTB is esp. important because the typical
breakage is false LID closed reporting, causing undesirable suspends which
basically make the system unusable.

Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
drivers/acpi/button.c