diff options
author | Toshi Kani <toshi.kani@hp.com> | 2012-05-23 22:25:20 -0400 |
---|---|---|
committer | Len Brown <len.brown@intel.com> | 2012-06-04 01:09:19 -0400 |
commit | c4753e57b78b213f2384fa0dbafa348b087114fa (patch) | |
tree | 045c893416303dd0a3ea191848597ad401a48e5c /include/acpi/acpi_bus.h | |
parent | 275c58d77062bbb85dbeb3843ba04f34aa50cf8e (diff) |
ACPI: Add _OST support for sysfs eject
Changed acpi_bus_hot_remove_device() to support _OST. This function is
also changed to global so that it can be called from hotplug notify
handlers to perform hot-remove operation.
Changed acpi_eject_store(), which is the sysfs eject handler. It checks
eject_pending to see if the request was originated from ACPI eject
notification. If not, it calls _OST(0x103,84,) per Figure 6-37 in ACPI
5.0 spec.
Added eject_pending bit to acpi_device_flags. This bit is set when the
kernel has received an ACPI eject notification, but does not initiate
its hot-remove operation by itself.
Added struct acpi_eject_event. This structure is used to pass extended
information to acpi_bus_hot_remove_device(), which has a single argument
to support asynchronous call
Signed-off-by: Toshi Kani <toshi.kani@hp.com>
Signed-off-by: Len Brown <len.brown@intel.com>
Diffstat (limited to 'include/acpi/acpi_bus.h')
-rw-r--r-- | include/acpi/acpi_bus.h | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/include/acpi/acpi_bus.h b/include/acpi/acpi_bus.h index 1139f3a01209..62eb514f8e3a 100644 --- a/include/acpi/acpi_bus.h +++ b/include/acpi/acpi_bus.h | |||
@@ -182,7 +182,8 @@ struct acpi_device_flags { | |||
182 | u32 suprise_removal_ok:1; | 182 | u32 suprise_removal_ok:1; |
183 | u32 power_manageable:1; | 183 | u32 power_manageable:1; |
184 | u32 performance_manageable:1; | 184 | u32 performance_manageable:1; |
185 | u32 reserved:24; | 185 | u32 eject_pending:1; |
186 | u32 reserved:23; | ||
186 | }; | 187 | }; |
187 | 188 | ||
188 | /* File System */ | 189 | /* File System */ |
@@ -334,6 +335,11 @@ struct acpi_bus_event { | |||
334 | u32 data; | 335 | u32 data; |
335 | }; | 336 | }; |
336 | 337 | ||
338 | struct acpi_eject_event { | ||
339 | acpi_handle handle; | ||
340 | u32 event; | ||
341 | }; | ||
342 | |||
337 | extern struct kobject *acpi_kobj; | 343 | extern struct kobject *acpi_kobj; |
338 | extern int acpi_bus_generate_netlink_event(const char*, const char*, u8, int); | 344 | extern int acpi_bus_generate_netlink_event(const char*, const char*, u8, int); |
339 | void acpi_bus_private_data_handler(acpi_handle, void *); | 345 | void acpi_bus_private_data_handler(acpi_handle, void *); |
@@ -371,6 +377,7 @@ int acpi_bus_register_driver(struct acpi_driver *driver); | |||
371 | void acpi_bus_unregister_driver(struct acpi_driver *driver); | 377 | void acpi_bus_unregister_driver(struct acpi_driver *driver); |
372 | int acpi_bus_add(struct acpi_device **child, struct acpi_device *parent, | 378 | int acpi_bus_add(struct acpi_device **child, struct acpi_device *parent, |
373 | acpi_handle handle, int type); | 379 | acpi_handle handle, int type); |
380 | void acpi_bus_hot_remove_device(void *context); | ||
374 | int acpi_bus_trim(struct acpi_device *start, int rmdevice); | 381 | int acpi_bus_trim(struct acpi_device *start, int rmdevice); |
375 | int acpi_bus_start(struct acpi_device *device); | 382 | int acpi_bus_start(struct acpi_device *device); |
376 | acpi_status acpi_bus_get_ejd(acpi_handle handle, acpi_handle * ejd); | 383 | acpi_status acpi_bus_get_ejd(acpi_handle handle, acpi_handle * ejd); |