xref: /openbmc/linux/include/acpi/button.h (revision bcb2b0b2bae2de744223c68521cd51c57feb486c)
17e12715eSJesse Barnes #ifndef ACPI_BUTTON_H
27e12715eSJesse Barnes #define ACPI_BUTTON_H
37e12715eSJesse Barnes 
47e12715eSJesse Barnes #include <linux/notifier.h>
57e12715eSJesse Barnes 
6*bcb2b0b2SSudeep Holla #if IS_ENABLED(CONFIG_ACPI_BUTTON)
77e12715eSJesse Barnes extern int acpi_lid_notifier_register(struct notifier_block *nb);
87e12715eSJesse Barnes extern int acpi_lid_notifier_unregister(struct notifier_block *nb);
97e12715eSJesse Barnes extern int acpi_lid_open(void);
101a133e0cSJesse Barnes #else
111a133e0cSJesse Barnes static inline int acpi_lid_notifier_register(struct notifier_block *nb)
121a133e0cSJesse Barnes {
131a133e0cSJesse Barnes 	return 0;
141a133e0cSJesse Barnes }
151a133e0cSJesse Barnes static inline int acpi_lid_notifier_unregister(struct notifier_block *nb)
161a133e0cSJesse Barnes {
171a133e0cSJesse Barnes 	return 0;
181a133e0cSJesse Barnes }
191a133e0cSJesse Barnes static inline int acpi_lid_open(void)
201a133e0cSJesse Barnes {
211a133e0cSJesse Barnes 	return 1;
221a133e0cSJesse Barnes }
23*bcb2b0b2SSudeep Holla #endif /* IS_ENABLED(CONFIG_ACPI_BUTTON) */
247e12715eSJesse Barnes 
257e12715eSJesse Barnes #endif /* ACPI_BUTTON_H */
26