Page MenuHomeFreeBSD

acpi_lid: add an in-kernel lid state eventhandler
ClosedPublic

Authored by seuros on Tue, Oct 13, 3:46 PM.
Tags
None
Referenced Files
Unknown Object (File)
Wed, Oct 14, 8:31 AM
Unknown Object (File)
Wed, Oct 14, 8:27 AM
Unknown Object (File)
Wed, Oct 14, 3:18 AM
Unknown Object (File)
Wed, Oct 14, 1:10 AM
Unknown Object (File)
Wed, Oct 14, 12:32 AM
Unknown Object (File)
Tue, Oct 13, 10:00 PM
Unknown Object (File)
Tue, Oct 13, 6:03 PM
Unknown Object (File)
Tue, Oct 13, 4:49 PM
Subscribers

Details

Summary

Lid state changes are only published to userland, via devd and evdev.
Drivers that need to react to the lid in the kernel have no hook, so
they end up installing a second ACPI_DEVICE_NOTIFY handler on the same
lid object and reimplementing the _LID evaluation.

Add acpi_lid_event, invoked from acpi_lid_status_update() alongside the
existing devd notification, carrying the new state (1 open, 0 closed).

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

oh neat, are there places we can delete these notifications from once this is landed?

In tree ? none. we missing it.

The first ones could be apple_acpi, and the kmod (intel/amd)

This revision is now accepted and ready to land.Tue, Oct 13, 5:38 PM