mirror of
https://github.com/Fishwaldo/Star64_linux.git
synced 2025-07-23 23:32:14 +00:00
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>
This commit is contained in:
parent
10c7e20b2f
commit
68bdb67732
5 changed files with 99 additions and 5 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue