summaryrefslogtreecommitdiff
path: root/include/acpi/acpi_bus.h
diff options
context:
space:
mode:
authorRafael J. Wysocki <rafael.j.wysocki@intel.com>2013-03-03 23:08:16 +0100
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>2013-03-04 14:25:32 +0100
commit3f8055c3583640ed3e4c81864dd76e06a7faa505 (patch)
treec77ae4121942fc43be57cd603435f1a9dcb78b3d /include/acpi/acpi_bus.h
parent4b59cc1fd6fd1dac1d4468b4f327ae9f59d1c0aa (diff)
ACPI / hotplug: Introduce user space interface for hotplug profiles
Introduce user space interface for manipulating hotplug profiles associated with ACPI scan handlers. The interface consists of sysfs directories under /sys/firmware/acpi/hotplug/, one for each hotplug profile, containing an attribute allowing user space to manipulate the enabled field of the corresponding profile. Namely, switching the enabled attribute from '0' to '1' will cause the common hotplug notify handler to be installed for all ACPI namespace objects representing devices matching the scan handler associated with the given hotplug profile (and analogously for the converse switch). Drivers willing to use the new user space interface should add their ACPI scan handlers with the help of new funtion acpi_scan_add_handler_with_hotplug(). Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com> Acked-by: Toshi Kani <toshi.kani@hp.com> Tested-by: Toshi Kani <toshi.kani@hp.com>
Diffstat (limited to 'include/acpi/acpi_bus.h')
-rw-r--r--include/acpi/acpi_bus.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/include/acpi/acpi_bus.h b/include/acpi/acpi_bus.h
index f2c1d08a4798..533ef039c5e0 100644
--- a/include/acpi/acpi_bus.h
+++ b/include/acpi/acpi_bus.h
@@ -95,10 +95,17 @@ enum acpi_hotplug_mode {
};
struct acpi_hotplug_profile {
+ struct kobject kobj;
bool enabled:1;
enum acpi_hotplug_mode mode;
};
+static inline struct acpi_hotplug_profile *to_acpi_hotplug_profile(
+ struct kobject *kobj)
+{
+ return container_of(kobj, struct acpi_hotplug_profile, kobj);
+}
+
struct acpi_scan_handler {
const struct acpi_device_id *ids;
struct list_head list_node;