ACPI button: provide lid status functions

Some drivers need to know when a lid event occurs and get the current
status.  This can be useful for when a platform firmware clobbers some
hardware state at lid time, and a driver needs to restore things when
the lid is opened again.

Acked-by: Matthew Garrett <[email protected]>
Signed-off-by: Jesse Barnes <[email protected]>
Signed-off-by: Eric Anholt <[email protected]>
This commit is contained in:
Jesse Barnes 2009-09-10 15:28:02 -07:00 • committed by Eric Anholt
commit 7e12715ecc
2 changed files with 53 additions and 2 deletions

10
include/acpi/button.h Normal file
View file

@ -0,0 +1,10 @@
#ifndef ACPI_BUTTON_H
#define ACPI_BUTTON_H
#include <linux/notifier.h>
extern int acpi_lid_notifier_register(struct notifier_block *nb);
extern int acpi_lid_notifier_unregister(struct notifier_block *nb);
extern int acpi_lid_open(void);
#endif /* ACPI_BUTTON_H */