aboutsummaryrefslogtreecommitdiffstats
path: root/include/acpi/acpi_bus.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/acpi/acpi_bus.h')
-rw-r--r--include/acpi/acpi_bus.h25
1 files changed, 21 insertions, 4 deletions
diff --git a/include/acpi/acpi_bus.h b/include/acpi/acpi_bus.h
index c6fa5e023bc7..86aea44ce6d4 100644
--- a/include/acpi/acpi_bus.h
+++ b/include/acpi/acpi_bus.h
@@ -131,7 +131,7 @@ struct acpi_device_ops {
131struct acpi_driver { 131struct acpi_driver {
132 char name[80]; 132 char name[80];
133 char class[80]; 133 char class[80];
134 char *ids; /* Supported Hardware IDs */ 134 const struct acpi_device_id *ids; /* Supported Hardware IDs */
135 struct acpi_device_ops ops; 135 struct acpi_device_ops ops;
136 struct device_driver drv; 136 struct device_driver drv;
137 struct module *owner; 137 struct module *owner;
@@ -321,7 +321,7 @@ struct acpi_bus_event {
321}; 321};
322 322
323extern struct kset acpi_subsys; 323extern struct kset acpi_subsys;
324 324extern int acpi_bus_generate_netlink_event(const char*, const char*, u8, int);
325/* 325/*
326 * External Functions 326 * External Functions
327 */ 327 */
@@ -331,8 +331,13 @@ void acpi_bus_data_handler(acpi_handle handle, u32 function, void *context);
331int acpi_bus_get_status(struct acpi_device *device); 331int acpi_bus_get_status(struct acpi_device *device);
332int acpi_bus_get_power(acpi_handle handle, int *state); 332int acpi_bus_get_power(acpi_handle handle, int *state);
333int acpi_bus_set_power(acpi_handle handle, int state); 333int acpi_bus_set_power(acpi_handle handle, int state);
334int acpi_bus_generate_event(struct acpi_device *device, u8 type, int data); 334#ifdef CONFIG_ACPI_PROC_EVENT
335int acpi_bus_generate_proc_event(struct acpi_device *device, u8 type, int data);
335int acpi_bus_receive_event(struct acpi_bus_event *event); 336int acpi_bus_receive_event(struct acpi_bus_event *event);
337#else
338static inline int acpi_bus_generate_proc_event(struct acpi_device *device, u8 type, int data)
339 { return 0; }
340#endif
336int acpi_bus_register_driver(struct acpi_driver *driver); 341int acpi_bus_register_driver(struct acpi_driver *driver);
337void acpi_bus_unregister_driver(struct acpi_driver *driver); 342void acpi_bus_unregister_driver(struct acpi_driver *driver);
338int acpi_bus_add(struct acpi_device **child, struct acpi_device *parent, 343int acpi_bus_add(struct acpi_device **child, struct acpi_device *parent,
@@ -340,7 +345,8 @@ int acpi_bus_add(struct acpi_device **child, struct acpi_device *parent,
340int acpi_bus_trim(struct acpi_device *start, int rmdevice); 345int acpi_bus_trim(struct acpi_device *start, int rmdevice);
341int acpi_bus_start(struct acpi_device *device); 346int acpi_bus_start(struct acpi_device *device);
342acpi_status acpi_bus_get_ejd(acpi_handle handle, acpi_handle * ejd); 347acpi_status acpi_bus_get_ejd(acpi_handle handle, acpi_handle * ejd);
343int acpi_match_ids(struct acpi_device *device, char *ids); 348int acpi_match_device_ids(struct acpi_device *device,
349 const struct acpi_device_id *ids);
344int acpi_create_dir(struct acpi_device *); 350int acpi_create_dir(struct acpi_device *);
345void acpi_remove_dir(struct acpi_device *); 351void acpi_remove_dir(struct acpi_device *);
346 352
@@ -364,6 +370,17 @@ acpi_handle acpi_get_child(acpi_handle, acpi_integer);
364acpi_handle acpi_get_pci_rootbridge_handle(unsigned int, unsigned int); 370acpi_handle acpi_get_pci_rootbridge_handle(unsigned int, unsigned int);
365#define DEVICE_ACPI_HANDLE(dev) ((acpi_handle)((dev)->archdata.acpi_handle)) 371#define DEVICE_ACPI_HANDLE(dev) ((acpi_handle)((dev)->archdata.acpi_handle))
366 372
373#ifdef CONFIG_PM_SLEEP
374int acpi_pm_device_sleep_state(struct device *, int, int *);
375#else /* !CONFIG_PM_SLEEP */
376static inline int acpi_pm_device_sleep_state(struct device *d, int w, int *p)
377{
378 if (p)
379 *p = ACPI_STATE_D0;
380 return ACPI_STATE_D3;
381}
382#endif /* !CONFIG_PM_SLEEP */
383
367#endif /* CONFIG_ACPI */ 384#endif /* CONFIG_ACPI */
368 385
369#endif /*__ACPI_BUS_H__*/ 386#endif /*__ACPI_BUS_H__*/