linux-stable/drivers/acpi
Hans de Goede 84d3f6b764 ACPI / button: Delay acpi_lid_initialize_state() until first user space open
ACPI _LID methods may depend on OpRegions and do not always handle
handlers for those OpRegions not being present properly e.g. :

            Method (_LID, 0, NotSerialized)  // _LID: Lid Status
            {
                If ((^^I2C5.PMI1.AVBL == One) && (^^GPO2.AVBL == One))
                {
                    Return (^^GPO2.LPOL) /* \_SB_.GPO2.LPOL */
                }
            }

Note the missing Return (1) when either of the OpRegions is not available,
this causes (in this case) a report of the lid-switch being closed,
which causes userspace to do an immediate suspend at boot.

This commit delays getting the initial state and thus calling _LID for
the first time until userspace opens the /dev/input/event# node. This
ensures that all drivers will have had a chance to load and registerer
their OpRegions before the first _LID call, fixing this issue.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
2017-11-09 00:30:44 +01:00
..
acpica License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
apei License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
arm64 ACPI/IORT: Fix PCI ACS enablement 2017-10-04 17:34:41 +01:00
dptf License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
nfit License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
pmic License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
x86 ACPI / property: Support Apple _DSM properties 2017-08-03 23:26:22 +02:00
ac.c
acpi_amba.c
acpi_apd.c ACPI: APD: Fix HID for Hisilicon Hip07/08 2017-07-30 14:33:48 +02:00
acpi_cmos_rtc.c
acpi_configfs.c ACPI: configfs: Unload SSDT on configfs entry removal 2017-06-22 02:43:12 +02:00
acpi_dbg.c ACPI: fix whitespace in pr_fmt() to align log entries 2017-06-22 02:18:20 +02:00
acpi_extlog.c ACPI: Switch to use generic guid_t in acpi_evaluate_dsm() 2017-06-07 12:20:49 +02:00
acpi_ipmi.c
acpi_lpat.c ACPI / lpat: Fix typos in comments and kerneldoc style 2017-07-24 22:52:00 +02:00
acpi_lpss.c ACPI / LPSS: Don't abort ACPI scan on missing mem resource 2017-08-10 01:41:41 +02:00
acpi_memhotplug.c
acpi_pad.c
acpi_platform.c
acpi_pnp.c
acpi_processor.c ACPI / processor: make function acpi_processor_check_duplicates() static 2017-08-24 03:25:47 +02:00
acpi_video.c dmi: Mark all struct dmi_system_id instances const 2017-09-14 11:59:30 +02:00
acpi_watchdog.c ACPI / watchdog: properly initialize resources 2017-09-19 01:49:02 +02:00
battery.c ACPI: make device_attribute const 2017-08-24 03:38:25 +02:00
battery.h License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
bgrt.c ACPI: BGRT: constify attribute_group structures 2017-07-04 22:15:20 +02:00
blacklist.c dmi: Mark all struct dmi_system_id instances const 2017-09-14 11:59:30 +02:00
bus.c dmi: Mark all struct dmi_system_id instances const 2017-09-14 11:59:30 +02:00
button.c ACPI / button: Delay acpi_lid_initialize_state() until first user space open 2017-11-09 00:30:44 +01:00
cm_sbs.c
container.c
cppc_acpi.c scripts/spelling.txt: add regsiter -> register spelling mistake 2017-05-08 17:15:13 -07:00
custom_method.c
debugfs.c
device_pm.c ACPI / PM: Add debug statements to acpi_pm_notify_handler() 2017-08-18 01:53:32 +02:00
device_sysfs.c
dock.c ACPI / dock: constify attribute_group structure 2017-08-03 23:28:24 +02:00
ec.c dmi: Mark all struct dmi_system_id instances const 2017-09-14 11:59:30 +02:00
ec_sys.c
event.c License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
evged.c
fan.c
glue.c IOMMU Updates for Linux v4.12 2017-05-09 15:15:47 -07:00
hed.c
internal.h Merge branches 'acpi-x86', 'acpi-soc', 'acpi-pmic' and 'acpi-apple' 2017-09-03 23:54:03 +02:00
ioapic.c ACPI: fix whitespace in pr_fmt() to align log entries 2017-06-22 02:18:20 +02:00
irq.c ACPI / irq: Fix return code of acpi_gsi_to_irq() 2017-07-12 13:11:49 +02:00
Kconfig License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
Makefile License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
numa.c ACPI: NUMA: Fix typo in the full name of SRAT 2017-07-24 22:27:44 +02:00
nvs.c
osi.c dmi: Mark all struct dmi_system_id instances const 2017-09-14 11:59:30 +02:00
osl.c
pci_irq.c
pci_link.c
pci_mcfg.c
pci_root.c treewide: Consolidate Apple DMI checks 2017-08-03 23:26:22 +02:00
pci_slot.c dmi: Mark all struct dmi_system_id instances const 2017-09-14 11:59:30 +02:00
power.c ACPI / power: constify attribute_group structures 2017-07-04 22:15:14 +02:00
proc.c License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
processor_core.c
processor_driver.c ACPI: processor: use dev_dbg() instead of dev_warn() when CPPC probe failed 2017-07-27 01:51:06 +02:00
processor_idle.c Revert "x86/mm: Stop calling leave_mm() in idle code" 2017-11-04 15:01:50 +01:00
processor_pdc.c License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
processor_perflib.c
processor_thermal.c
processor_throttling.c acpi/processor: Prevent cpu hotplug deadlock 2017-05-26 10:10:47 +02:00
property.c ACPI: properties: Fix __acpi_node_get_property_reference() return codes 2017-10-11 21:16:37 +02:00
reboot.c License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
resource.c ACPI: Introduce DMA ranges parsing 2017-08-07 14:28:51 +02:00
sbs.c Merge branches 'acpi-video', 'acpi-battery', 'acpi-spcr' and 'acpi-misc' 2017-09-03 23:54:29 +02:00
sbshc.c
sbshc.h License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
scan.c Device properties framework updates for v4.14-rc1 2017-09-05 12:50:00 -07:00
sleep.c dmi: Mark all struct dmi_system_id instances const 2017-09-14 11:59:30 +02:00
sleep.h License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
spcr.c Merge branches 'acpi-video', 'acpi-battery', 'acpi-spcr' and 'acpi-misc' 2017-09-03 23:54:29 +02:00
sysfs.c License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
tables.c ACPICA: Tables: Change table duplication check to be related to acpi_gbl_verify_table_checksum 2017-07-20 16:38:25 +02:00
thermal.c dmi: Mark all struct dmi_system_id instances const 2017-09-14 11:59:30 +02:00
utils.c ACPI / blacklist: add acpi_match_platform_list() 2017-08-29 01:42:48 +02:00
video_detect.c ACPI / video: Add force_none quirk for Dell OptiPlex 9020M 2017-07-16 02:27:23 +02:00
wakeup.c License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00