Linux Audio

Check our new training course

Loading...
v5.4
 1/* SPDX-License-Identifier: GPL-2.0 */
 2#ifndef ACPI_BUTTON_H
 3#define ACPI_BUTTON_H
 4
 5#include <linux/notifier.h>
 
 
 6
 7#if IS_ENABLED(CONFIG_ACPI_BUTTON)
 8extern int acpi_lid_notifier_register(struct notifier_block *nb);
 9extern int acpi_lid_notifier_unregister(struct notifier_block *nb);
10extern int acpi_lid_open(void);
11#else
12static inline int acpi_lid_notifier_register(struct notifier_block *nb)
13{
14	return 0;
15}
16static inline int acpi_lid_notifier_unregister(struct notifier_block *nb)
17{
18	return 0;
19}
20static inline int acpi_lid_open(void)
21{
22	return 1;
23}
24#endif /* IS_ENABLED(CONFIG_ACPI_BUTTON) */
25
26#endif /* ACPI_BUTTON_H */
v6.13.7
 1/* SPDX-License-Identifier: GPL-2.0 */
 2#ifndef ACPI_BUTTON_H
 3#define ACPI_BUTTON_H
 4
 5#define ACPI_BUTTON_HID_POWER	"PNP0C0C"
 6#define ACPI_BUTTON_HID_LID	"PNP0C0D"
 7#define ACPI_BUTTON_HID_SLEEP	"PNP0C0E"
 8
 9#if IS_ENABLED(CONFIG_ACPI_BUTTON)
 
 
10extern int acpi_lid_open(void);
11#else
 
 
 
 
 
 
 
 
12static inline int acpi_lid_open(void)
13{
14	return 1;
15}
16#endif /* IS_ENABLED(CONFIG_ACPI_BUTTON) */
17
18#endif /* ACPI_BUTTON_H */