summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorHans de Goede <hdegoede@redhat.com>2017-09-11 16:07:06 +0200
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>2017-11-09 00:30:44 +0100
commit84d3f6b76447896919c63b28ad71f71238cefcce (patch)
tree0ee00fa0c6532ba48342e55011e38b972774a79c /include
parent39dae59d66acd86d1de24294bd2f343fd5e7a625 (diff)
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>
Diffstat (limited to 'include')
0 files changed, 0 insertions, 0 deletions