aboutsummaryrefslogtreecommitdiffstats
path: root/include/acpi
diff options
context:
space:
mode:
authorRafael J. Wysocki <rafael.j.wysocki@intel.com>2013-01-18 07:48:30 -0500
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>2013-01-18 07:48:30 -0500
commit0b3571274b8ff53c0e08bc667ecd3d8a43bd8714 (patch)
tree57fa58c4c5abe63cccf3fd842548d16fc8d792ba /include/acpi
parent7d1f9aeff1ee4a20b1aeb377dd0f579fe9647619 (diff)
parent5993c4670ea2453ef5abb45b312f150e994e6eb9 (diff)
Merge branch 'acpi-scan' into acpi-lpss
The following commits depend on the 'acpi-scan' material.
Diffstat (limited to 'include/acpi')
-rw-r--r--include/acpi/acpi_bus.h25
1 files changed, 7 insertions, 18 deletions
diff --git a/include/acpi/acpi_bus.h b/include/acpi/acpi_bus.h
index 7ced5dc20dd3..567851b4f043 100644
--- a/include/acpi/acpi_bus.h
+++ b/include/acpi/acpi_bus.h
@@ -91,21 +91,12 @@ struct acpi_device;
91typedef int (*acpi_op_add) (struct acpi_device * device); 91typedef int (*acpi_op_add) (struct acpi_device * device);
92typedef int (*acpi_op_remove) (struct acpi_device * device, int type); 92typedef int (*acpi_op_remove) (struct acpi_device * device, int type);
93typedef int (*acpi_op_start) (struct acpi_device * device); 93typedef int (*acpi_op_start) (struct acpi_device * device);
94typedef int (*acpi_op_bind) (struct acpi_device * device);
95typedef int (*acpi_op_unbind) (struct acpi_device * device);
96typedef void (*acpi_op_notify) (struct acpi_device * device, u32 event); 94typedef void (*acpi_op_notify) (struct acpi_device * device, u32 event);
97 95
98struct acpi_bus_ops {
99 u32 acpi_op_add:1;
100 u32 acpi_op_start:1;
101};
102
103struct acpi_device_ops { 96struct acpi_device_ops {
104 acpi_op_add add; 97 acpi_op_add add;
105 acpi_op_remove remove; 98 acpi_op_remove remove;
106 acpi_op_start start; 99 acpi_op_start start;
107 acpi_op_bind bind;
108 acpi_op_unbind unbind;
109 acpi_op_notify notify; 100 acpi_op_notify notify;
110}; 101};
111 102
@@ -148,7 +139,8 @@ struct acpi_device_flags {
148 u32 power_manageable:1; 139 u32 power_manageable:1;
149 u32 performance_manageable:1; 140 u32 performance_manageable:1;
150 u32 eject_pending:1; 141 u32 eject_pending:1;
151 u32 reserved:24; 142 u32 match_driver:1;
143 u32 reserved:23;
152}; 144};
153 145
154/* File System */ 146/* File System */
@@ -279,11 +271,9 @@ struct acpi_device {
279 struct acpi_device_wakeup wakeup; 271 struct acpi_device_wakeup wakeup;
280 struct acpi_device_perf performance; 272 struct acpi_device_perf performance;
281 struct acpi_device_dir dir; 273 struct acpi_device_dir dir;
282 struct acpi_device_ops ops;
283 struct acpi_driver *driver; 274 struct acpi_driver *driver;
284 void *driver_data; 275 void *driver_data;
285 struct device dev; 276 struct device dev;
286 struct acpi_bus_ops bus_ops; /* workaround for different code path for hotplug */
287 enum acpi_bus_removal_type removal_type; /* indicate for different removal type */ 277 enum acpi_bus_removal_type removal_type; /* indicate for different removal type */
288 u8 physical_node_count; 278 u8 physical_node_count;
289 struct list_head physical_node_list; 279 struct list_head physical_node_list;
@@ -316,7 +306,7 @@ struct acpi_bus_event {
316}; 306};
317 307
318struct acpi_eject_event { 308struct acpi_eject_event {
319 acpi_handle handle; 309 struct acpi_device *device;
320 u32 event; 310 u32 event;
321}; 311};
322 312
@@ -356,11 +346,9 @@ static inline int acpi_bus_generate_proc_event(struct acpi_device *device, u8 ty
356#endif 346#endif
357int acpi_bus_register_driver(struct acpi_driver *driver); 347int acpi_bus_register_driver(struct acpi_driver *driver);
358void acpi_bus_unregister_driver(struct acpi_driver *driver); 348void acpi_bus_unregister_driver(struct acpi_driver *driver);
359int acpi_bus_add(struct acpi_device **child, struct acpi_device *parent, 349int acpi_bus_add(acpi_handle handle);
360 acpi_handle handle, int type);
361void acpi_bus_hot_remove_device(void *context); 350void acpi_bus_hot_remove_device(void *context);
362int acpi_bus_trim(struct acpi_device *start, int rmdevice); 351int acpi_bus_trim(struct acpi_device *start);
363int acpi_bus_start(struct acpi_device *device);
364acpi_status acpi_bus_get_ejd(acpi_handle handle, acpi_handle * ejd); 352acpi_status acpi_bus_get_ejd(acpi_handle handle, acpi_handle * ejd);
365int acpi_match_device_ids(struct acpi_device *device, 353int acpi_match_device_ids(struct acpi_device *device,
366 const struct acpi_device_id *ids); 354 const struct acpi_device_id *ids);
@@ -390,6 +378,8 @@ struct acpi_bus_type {
390 int (*find_device) (struct device *, acpi_handle *); 378 int (*find_device) (struct device *, acpi_handle *);
391 /* For bridges, such as PCI root bridge, IDE controller */ 379 /* For bridges, such as PCI root bridge, IDE controller */
392 int (*find_bridge) (struct device *, acpi_handle *); 380 int (*find_bridge) (struct device *, acpi_handle *);
381 void (*setup)(struct device *);
382 void (*cleanup)(struct device *);
393}; 383};
394int register_acpi_bus_type(struct acpi_bus_type *); 384int register_acpi_bus_type(struct acpi_bus_type *);
395int unregister_acpi_bus_type(struct acpi_bus_type *); 385int unregister_acpi_bus_type(struct acpi_bus_type *);
@@ -397,7 +387,6 @@ int unregister_acpi_bus_type(struct acpi_bus_type *);
397struct acpi_pci_root { 387struct acpi_pci_root {
398 struct list_head node; 388 struct list_head node;
399 struct acpi_device * device; 389 struct acpi_device * device;
400 struct acpi_pci_id id;
401 struct pci_bus *bus; 390 struct pci_bus *bus;
402 u16 segment; 391 u16 segment;
403 struct resource secondary; /* downstream bus range */ 392 struct resource secondary; /* downstream bus range */