]> asedeno.scripts.mit.edu Git - linux.git/commit
ACPI: button: Allow disabling LID support with the lid_init_state module option
authorHans de Goede <hdegoede@redhat.com>
Sat, 26 Oct 2019 20:24:32 +0000 (22:24 +0200)
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>
Mon, 28 Oct 2019 14:40:26 +0000 (15:40 +0100)
commit593681e2c75f59f23cf6f6cefc4f00cae2a4522b
tree15fc5d61e8bb1484391629c5f2ff6145317866a4
parent065bd4d35b3fb4484c61fc40a51eeffd5abe52e8
ACPI: button: Allow disabling LID support with the lid_init_state module option

Add a new "disabled" value for the lid_init_state module option, which can
be used to disable LID support on devices where it is completely broken.

Sometimes devices seem to spontaneously suspend and the cause for this is
not clear. The LID switch is known to be one possible cause for this,
this commit allows easily disabling the LID switch for testing if it
is the cause.

For example some devices which do not even have a lid, still have a LID
device in their ACPI tables, pointing to a floating GPIO.

This is not really related to the initial LID state, but re-using the
existing option keeps things simple and it will make it much easier to
add DMI quirks which can either disable the LID completely or set another
non-default lid_init_state value, both of which are necessary on some
devices.

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