diff options
author | Rafael J. Wysocki <rafael.j.wysocki@intel.com> | 2014-02-20 19:06:58 -0500 |
---|---|---|
committer | Rafael J. Wysocki <rafael.j.wysocki@intel.com> | 2014-02-20 19:06:58 -0500 |
commit | 2bd74d91b1217d84d08db57b860d056d130248d3 (patch) | |
tree | 6333daab84310e75200be4c3dc511b7e4baa1f42 /include/acpi | |
parent | ae3caa80a5d532d334c7a4785d74104e3de5a9ae (diff) | |
parent | cc6254e00eb676dda6501655f8185aef7b761b4f (diff) |
Merge branch 'acpi-pci-hotplug' into acpi-ost
Diffstat (limited to 'include/acpi')
-rw-r--r-- | include/acpi/acpi_bus.h | 27 | ||||
-rw-r--r-- | include/acpi/acpixf.h | 4 |
2 files changed, 30 insertions, 1 deletions
diff --git a/include/acpi/acpi_bus.h b/include/acpi/acpi_bus.h index adef502cb8f1..5225fe06e4ff 100644 --- a/include/acpi/acpi_bus.h +++ b/include/acpi/acpi_bus.h | |||
@@ -145,6 +145,16 @@ struct acpi_scan_handler { | |||
145 | }; | 145 | }; |
146 | 146 | ||
147 | /* | 147 | /* |
148 | * ACPI Hotplug Context | ||
149 | * -------------------- | ||
150 | */ | ||
151 | |||
152 | struct acpi_hotplug_context { | ||
153 | struct acpi_device *self; | ||
154 | int (*event)(struct acpi_device *, u32); | ||
155 | }; | ||
156 | |||
157 | /* | ||
148 | * ACPI Driver | 158 | * ACPI Driver |
149 | * ----------- | 159 | * ----------- |
150 | */ | 160 | */ |
@@ -198,7 +208,8 @@ struct acpi_device_flags { | |||
198 | u32 initialized:1; | 208 | u32 initialized:1; |
199 | u32 visited:1; | 209 | u32 visited:1; |
200 | u32 no_hotplug:1; | 210 | u32 no_hotplug:1; |
201 | u32 reserved:24; | 211 | u32 hotplug_notify:1; |
212 | u32 reserved:23; | ||
202 | }; | 213 | }; |
203 | 214 | ||
204 | /* File System */ | 215 | /* File System */ |
@@ -337,6 +348,7 @@ struct acpi_device { | |||
337 | struct acpi_device_perf performance; | 348 | struct acpi_device_perf performance; |
338 | struct acpi_device_dir dir; | 349 | struct acpi_device_dir dir; |
339 | struct acpi_scan_handler *handler; | 350 | struct acpi_scan_handler *handler; |
351 | struct acpi_hotplug_context *hp; | ||
340 | struct acpi_driver *driver; | 352 | struct acpi_driver *driver; |
341 | void *driver_data; | 353 | void *driver_data; |
342 | struct device dev; | 354 | struct device dev; |
@@ -359,6 +371,15 @@ static inline void acpi_set_device_status(struct acpi_device *adev, u32 sta) | |||
359 | *((u32 *)&adev->status) = sta; | 371 | *((u32 *)&adev->status) = sta; |
360 | } | 372 | } |
361 | 373 | ||
374 | static inline void acpi_set_hp_context(struct acpi_device *adev, | ||
375 | struct acpi_hotplug_context *hp, | ||
376 | int (*event)(struct acpi_device *, u32)) | ||
377 | { | ||
378 | hp->self = adev; | ||
379 | hp->event = event; | ||
380 | adev->hp = hp; | ||
381 | } | ||
382 | |||
362 | /* acpi_device.dev.bus == &acpi_bus_type */ | 383 | /* acpi_device.dev.bus == &acpi_bus_type */ |
363 | extern struct bus_type acpi_bus_type; | 384 | extern struct bus_type acpi_bus_type; |
364 | 385 | ||
@@ -389,6 +410,8 @@ extern int unregister_acpi_notifier(struct notifier_block *); | |||
389 | */ | 410 | */ |
390 | 411 | ||
391 | int acpi_bus_get_device(acpi_handle handle, struct acpi_device **device); | 412 | int acpi_bus_get_device(acpi_handle handle, struct acpi_device **device); |
413 | struct acpi_device *acpi_bus_get_acpi_device(acpi_handle handle); | ||
414 | void acpi_bus_put_acpi_device(struct acpi_device *adev); | ||
392 | acpi_status acpi_bus_get_status_handle(acpi_handle handle, | 415 | acpi_status acpi_bus_get_status_handle(acpi_handle handle, |
393 | unsigned long long *sta); | 416 | unsigned long long *sta); |
394 | int acpi_bus_get_status(struct acpi_device *device); | 417 | int acpi_bus_get_status(struct acpi_device *device); |
@@ -410,6 +433,8 @@ static inline bool acpi_bus_can_wakeup(acpi_handle handle) { return false; } | |||
410 | 433 | ||
411 | void acpi_scan_lock_acquire(void); | 434 | void acpi_scan_lock_acquire(void); |
412 | void acpi_scan_lock_release(void); | 435 | void acpi_scan_lock_release(void); |
436 | void acpi_lock_hp_context(void); | ||
437 | void acpi_unlock_hp_context(void); | ||
413 | int acpi_scan_add_handler(struct acpi_scan_handler *handler); | 438 | int acpi_scan_add_handler(struct acpi_scan_handler *handler); |
414 | int acpi_bus_register_driver(struct acpi_driver *driver); | 439 | int acpi_bus_register_driver(struct acpi_driver *driver); |
415 | void acpi_bus_unregister_driver(struct acpi_driver *driver); | 440 | void acpi_bus_unregister_driver(struct acpi_driver *driver); |
diff --git a/include/acpi/acpixf.h b/include/acpi/acpixf.h index fea6773f87fc..34bad459c11b 100644 --- a/include/acpi/acpixf.h +++ b/include/acpi/acpixf.h | |||
@@ -230,6 +230,10 @@ acpi_attach_data(acpi_handle object, acpi_object_handler handler, void *data); | |||
230 | acpi_status acpi_detach_data(acpi_handle object, acpi_object_handler handler); | 230 | acpi_status acpi_detach_data(acpi_handle object, acpi_object_handler handler); |
231 | 231 | ||
232 | acpi_status | 232 | acpi_status |
233 | acpi_get_data_full(acpi_handle object, acpi_object_handler handler, void **data, | ||
234 | void (*callback)(void *)); | ||
235 | |||
236 | acpi_status | ||
233 | acpi_get_data(acpi_handle object, acpi_object_handler handler, void **data); | 237 | acpi_get_data(acpi_handle object, acpi_object_handler handler, void **data); |
234 | 238 | ||
235 | acpi_status | 239 | acpi_status |