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.h35
1 files changed, 15 insertions, 20 deletions
diff --git a/include/acpi/acpi_bus.h b/include/acpi/acpi_bus.h
index 1fa3ffb7c93..3cd9ccdcbd8 100644
--- a/include/acpi/acpi_bus.h
+++ b/include/acpi/acpi_bus.h
@@ -30,8 +30,6 @@
30 30
31#include <acpi/acpi.h> 31#include <acpi/acpi.h>
32 32
33#define PREFIX "ACPI: "
34
35/* TBD: Make dynamic */ 33/* TBD: Make dynamic */
36#define ACPI_MAX_HANDLES 10 34#define ACPI_MAX_HANDLES 10
37struct acpi_handle_list { 35struct acpi_handle_list {
@@ -72,7 +70,6 @@ enum acpi_bus_device_type {
72 ACPI_BUS_TYPE_POWER, 70 ACPI_BUS_TYPE_POWER,
73 ACPI_BUS_TYPE_PROCESSOR, 71 ACPI_BUS_TYPE_PROCESSOR,
74 ACPI_BUS_TYPE_THERMAL, 72 ACPI_BUS_TYPE_THERMAL,
75 ACPI_BUS_TYPE_SYSTEM,
76 ACPI_BUS_TYPE_POWER_BUTTON, 73 ACPI_BUS_TYPE_POWER_BUTTON,
77 ACPI_BUS_TYPE_SLEEP_BUTTON, 74 ACPI_BUS_TYPE_SLEEP_BUTTON,
78 ACPI_BUS_DEVICE_TYPE_COUNT 75 ACPI_BUS_DEVICE_TYPE_COUNT
@@ -89,7 +86,6 @@ struct acpi_device;
89typedef int (*acpi_op_add) (struct acpi_device * device); 86typedef int (*acpi_op_add) (struct acpi_device * device);
90typedef int (*acpi_op_remove) (struct acpi_device * device, int type); 87typedef int (*acpi_op_remove) (struct acpi_device * device, int type);
91typedef int (*acpi_op_start) (struct acpi_device * device); 88typedef int (*acpi_op_start) (struct acpi_device * device);
92typedef int (*acpi_op_stop) (struct acpi_device * device, int type);
93typedef int (*acpi_op_suspend) (struct acpi_device * device, 89typedef int (*acpi_op_suspend) (struct acpi_device * device,
94 pm_message_t state); 90 pm_message_t state);
95typedef int (*acpi_op_resume) (struct acpi_device * device); 91typedef int (*acpi_op_resume) (struct acpi_device * device);
@@ -106,7 +102,6 @@ struct acpi_device_ops {
106 acpi_op_add add; 102 acpi_op_add add;
107 acpi_op_remove remove; 103 acpi_op_remove remove;
108 acpi_op_start start; 104 acpi_op_start start;
109 acpi_op_stop stop;
110 acpi_op_suspend suspend; 105 acpi_op_suspend suspend;
111 acpi_op_resume resume; 106 acpi_op_resume resume;
112 acpi_op_bind bind; 107 acpi_op_bind bind;
@@ -146,10 +141,7 @@ struct acpi_device_status {
146 141
147struct acpi_device_flags { 142struct acpi_device_flags {
148 u32 dynamic_status:1; 143 u32 dynamic_status:1;
149 u32 hardware_id:1;
150 u32 compatible_ids:1;
151 u32 bus_address:1; 144 u32 bus_address:1;
152 u32 unique_id:1;
153 u32 removable:1; 145 u32 removable:1;
154 u32 ejectable:1; 146 u32 ejectable:1;
155 u32 lockable:1; 147 u32 lockable:1;
@@ -158,7 +150,7 @@ struct acpi_device_flags {
158 u32 performance_manageable:1; 150 u32 performance_manageable:1;
159 u32 wake_capable:1; /* Wakeup(_PRW) supported? */ 151 u32 wake_capable:1; /* Wakeup(_PRW) supported? */
160 u32 force_power_state:1; 152 u32 force_power_state:1;
161 u32 reserved:19; 153 u32 reserved:22;
162}; 154};
163 155
164/* File System */ 156/* File System */
@@ -173,25 +165,26 @@ struct acpi_device_dir {
173 165
174typedef char acpi_bus_id[8]; 166typedef char acpi_bus_id[8];
175typedef unsigned long acpi_bus_address; 167typedef unsigned long acpi_bus_address;
176typedef char acpi_hardware_id[15];
177typedef char acpi_unique_id[9];
178typedef char acpi_device_name[40]; 168typedef char acpi_device_name[40];
179typedef char acpi_device_class[20]; 169typedef char acpi_device_class[20];
180 170
171struct acpi_hardware_id {
172 struct list_head list;
173 char *id;
174};
175
181struct acpi_device_pnp { 176struct acpi_device_pnp {
182 acpi_bus_id bus_id; /* Object name */ 177 acpi_bus_id bus_id; /* Object name */
183 acpi_bus_address bus_address; /* _ADR */ 178 acpi_bus_address bus_address; /* _ADR */
184 acpi_hardware_id hardware_id; /* _HID */ 179 char *unique_id; /* _UID */
185 struct acpi_compatible_id_list *cid_list; /* _CIDs */ 180 struct list_head ids; /* _HID and _CIDs */
186 acpi_unique_id unique_id; /* _UID */
187 acpi_device_name device_name; /* Driver-determined */ 181 acpi_device_name device_name; /* Driver-determined */
188 acpi_device_class device_class; /* " */ 182 acpi_device_class device_class; /* " */
189}; 183};
190 184
191#define acpi_device_bid(d) ((d)->pnp.bus_id) 185#define acpi_device_bid(d) ((d)->pnp.bus_id)
192#define acpi_device_adr(d) ((d)->pnp.bus_address) 186#define acpi_device_adr(d) ((d)->pnp.bus_address)
193#define acpi_device_hid(d) ((d)->pnp.hardware_id) 187char *acpi_device_hid(struct acpi_device *device);
194#define acpi_device_uid(d) ((d)->pnp.unique_id)
195#define acpi_device_name(d) ((d)->pnp.device_name) 188#define acpi_device_name(d) ((d)->pnp.device_name)
196#define acpi_device_class(d) ((d)->pnp.device_class) 189#define acpi_device_class(d) ((d)->pnp.device_class)
197 190
@@ -268,7 +261,8 @@ struct acpi_device_wakeup {
268/* Device */ 261/* Device */
269 262
270struct acpi_device { 263struct acpi_device {
271 acpi_handle handle; 264 int device_type;
265 acpi_handle handle; /* no handle for fixed hardware */
272 struct acpi_device *parent; 266 struct acpi_device *parent;
273 struct list_head children; 267 struct list_head children;
274 struct list_head node; 268 struct list_head node;
@@ -314,7 +308,7 @@ struct acpi_bus_event {
314 308
315extern struct kobject *acpi_kobj; 309extern struct kobject *acpi_kobj;
316extern int acpi_bus_generate_netlink_event(const char*, const char*, u8, int); 310extern int acpi_bus_generate_netlink_event(const char*, const char*, u8, int);
317void acpi_bus_private_data_handler(acpi_handle, u32, void *); 311void acpi_bus_private_data_handler(acpi_handle, void *);
318int acpi_bus_get_private_data(acpi_handle, void **); 312int acpi_bus_get_private_data(acpi_handle, void **);
319extern int acpi_notifier_call_chain(struct acpi_device *, u32, u32); 313extern int acpi_notifier_call_chain(struct acpi_device *, u32, u32);
320extern int register_acpi_notifier(struct notifier_block *); 314extern int register_acpi_notifier(struct notifier_block *);
@@ -327,7 +321,9 @@ extern void unregister_acpi_bus_notifier(struct notifier_block *nb);
327 */ 321 */
328 322
329int acpi_bus_get_device(acpi_handle handle, struct acpi_device **device); 323int acpi_bus_get_device(acpi_handle handle, struct acpi_device **device);
330void acpi_bus_data_handler(acpi_handle handle, u32 function, void *context); 324void acpi_bus_data_handler(acpi_handle handle, void *context);
325acpi_status acpi_bus_get_status_handle(acpi_handle handle,
326 unsigned long long *sta);
331int acpi_bus_get_status(struct acpi_device *device); 327int acpi_bus_get_status(struct acpi_device *device);
332int acpi_bus_get_power(acpi_handle handle, int *state); 328int acpi_bus_get_power(acpi_handle handle, int *state);
333int acpi_bus_set_power(acpi_handle handle, int state); 329int acpi_bus_set_power(acpi_handle handle, int state);
@@ -356,7 +352,6 @@ void acpi_remove_dir(struct acpi_device *);
356/* 352/*
357 * Bind physical devices with ACPI devices 353 * Bind physical devices with ACPI devices
358 */ 354 */
359#include <linux/device.h>
360struct acpi_bus_type { 355struct acpi_bus_type {
361 struct list_head list; 356 struct list_head list;
362 struct bus_type *bus; 357 struct bus_type *bus;