diff options
author | Octavian Purdila <octavian.purdila@intel.com> | 2016-07-08 19:13:09 +0300 |
---|---|---|
committer | Rafael J. Wysocki <rafael.j.wysocki@intel.com> | 2016-07-08 22:52:35 +0300 |
commit | 68bdb6773289f8c9a36633f9f6525b127c093258 (patch) | |
tree | 675807b263d4ce87f5d35beac0f21658d77a3ff5 /include/linux/acpi.h | |
parent | 10c7e20b2ff3caa5a8c0e7d60aef5a9c86e60ce8 (diff) | |
download | linux-68bdb6773289f8c9a36633f9f6525b127c093258.tar.xz |
ACPI: add support for ACPI reconfiguration notifiers
Add support for ACPI reconfiguration notifiers to allow subsystems
to react to changes in the ACPI tables that happen after the initial
enumeration. This is similar with the way dynamic device tree
notifications work.
The reconfigure notifications supported for now are device add and
device remove.
Since ACPICA allows only one table notification handler, this patch
makes the table notifier function generic and moves it out of the
sysfs specific code.
Signed-off-by: Octavian Purdila <octavian.purdila@intel.com>
Reviewed-by: Mika Westerberg <mika.westerberg@linux.intel.com>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Diffstat (limited to 'include/linux/acpi.h')
-rw-r--r-- | include/linux/acpi.h | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/include/linux/acpi.h b/include/linux/acpi.h index db680e8788c4..8b48de17e388 100644 --- a/include/linux/acpi.h +++ b/include/linux/acpi.h @@ -541,6 +541,14 @@ static inline void acpi_device_clear_enumerated(struct acpi_device *adev) adev->flags.visited = false; } +enum acpi_reconfig_event { + ACPI_RECONFIG_DEVICE_ADD = 0, + ACPI_RECONFIG_DEVICE_REMOVE, +}; + +int acpi_reconfig_notifier_register(struct notifier_block *nb); +int acpi_reconfig_notifier_unregister(struct notifier_block *nb); + #else /* !CONFIG_ACPI */ #define acpi_disabled 1 @@ -694,6 +702,16 @@ static inline void acpi_device_clear_enumerated(struct acpi_device *adev) { } +static inline int acpi_reconfig_notifier_register(struct notifier_block *nb) +{ + return -EINVAL; +} + +static inline int acpi_reconfig_notifier_unregister(struct notifier_block *nb) +{ + return -EINVAL; +} + #endif /* !CONFIG_ACPI */ #ifdef CONFIG_ACPI |