xref: /openbmc/linux/include/acpi/button.h (revision b24413180f5600bcb3bb70fbed5cf186b60864bd)
1*b2441318SGreg Kroah-Hartman /* SPDX-License-Identifier: GPL-2.0 */
27e12715eSJesse Barnes #ifndef ACPI_BUTTON_H
37e12715eSJesse Barnes #define ACPI_BUTTON_H
47e12715eSJesse Barnes 
57e12715eSJesse Barnes #include <linux/notifier.h>
67e12715eSJesse Barnes 
7bcb2b0b2SSudeep Holla #if IS_ENABLED(CONFIG_ACPI_BUTTON)
87e12715eSJesse Barnes extern int acpi_lid_notifier_register(struct notifier_block *nb);
97e12715eSJesse Barnes extern int acpi_lid_notifier_unregister(struct notifier_block *nb);
107e12715eSJesse Barnes extern int acpi_lid_open(void);
111a133e0cSJesse Barnes #else
121a133e0cSJesse Barnes static inline int acpi_lid_notifier_register(struct notifier_block *nb)
131a133e0cSJesse Barnes {
141a133e0cSJesse Barnes 	return 0;
151a133e0cSJesse Barnes }
161a133e0cSJesse Barnes static inline int acpi_lid_notifier_unregister(struct notifier_block *nb)
171a133e0cSJesse Barnes {
181a133e0cSJesse Barnes 	return 0;
191a133e0cSJesse Barnes }
201a133e0cSJesse Barnes static inline int acpi_lid_open(void)
211a133e0cSJesse Barnes {
221a133e0cSJesse Barnes 	return 1;
231a133e0cSJesse Barnes }
24bcb2b0b2SSudeep Holla #endif /* IS_ENABLED(CONFIG_ACPI_BUTTON) */
257e12715eSJesse Barnes 
267e12715eSJesse Barnes #endif /* ACPI_BUTTON_H */
27