diff options
Diffstat (limited to 'include/acpi')
| -rw-r--r-- | include/acpi/acconfig.h | 1 | ||||
| -rw-r--r-- | include/acpi/acexcep.h | 2 | ||||
| -rw-r--r-- | include/acpi/acnames.h | 1 | ||||
| -rw-r--r-- | include/acpi/acpi_bus.h | 78 | ||||
| -rw-r--r-- | include/acpi/acpi_drivers.h | 4 | ||||
| -rw-r--r-- | include/acpi/acpiosxf.h | 3 | ||||
| -rw-r--r-- | include/acpi/acpixf.h | 18 | ||||
| -rw-r--r-- | include/acpi/actbl3.h | 22 | ||||
| -rw-r--r-- | include/acpi/actypes.h | 42 |
9 files changed, 121 insertions, 50 deletions
diff --git a/include/acpi/acconfig.h b/include/acpi/acconfig.h index 03f14856bd09..0943457e0fa5 100644 --- a/include/acpi/acconfig.h +++ b/include/acpi/acconfig.h | |||
| @@ -241,6 +241,7 @@ | |||
| 241 | *****************************************************************************/ | 241 | *****************************************************************************/ |
| 242 | 242 | ||
| 243 | #define ACPI_DEBUGGER_MAX_ARGS 8 /* Must be max method args + 1 */ | 243 | #define ACPI_DEBUGGER_MAX_ARGS 8 /* Must be max method args + 1 */ |
| 244 | #define ACPI_DB_LINE_BUFFER_SIZE 512 | ||
| 244 | 245 | ||
| 245 | #define ACPI_DEBUGGER_COMMAND_PROMPT '-' | 246 | #define ACPI_DEBUGGER_COMMAND_PROMPT '-' |
| 246 | #define ACPI_DEBUGGER_EXECUTE_PROMPT '%' | 247 | #define ACPI_DEBUGGER_EXECUTE_PROMPT '%' |
diff --git a/include/acpi/acexcep.h b/include/acpi/acexcep.h index 19503449814f..6c3890e02140 100644 --- a/include/acpi/acexcep.h +++ b/include/acpi/acexcep.h | |||
| @@ -122,7 +122,7 @@ | |||
| 122 | #define AE_CODE_TBL_MAX 0x0005 | 122 | #define AE_CODE_TBL_MAX 0x0005 |
| 123 | 123 | ||
| 124 | /* | 124 | /* |
| 125 | * AML exceptions. These are caused by problems with | 125 | * AML exceptions. These are caused by problems with |
| 126 | * the actual AML byte stream | 126 | * the actual AML byte stream |
| 127 | */ | 127 | */ |
| 128 | #define AE_AML_BAD_OPCODE (acpi_status) (0x0001 | AE_CODE_AML) | 128 | #define AE_AML_BAD_OPCODE (acpi_status) (0x0001 | AE_CODE_AML) |
diff --git a/include/acpi/acnames.h b/include/acpi/acnames.h index 745dd24e3cb5..7665df663284 100644 --- a/include/acpi/acnames.h +++ b/include/acpi/acnames.h | |||
| @@ -50,6 +50,7 @@ | |||
| 50 | #define METHOD_NAME__HID "_HID" | 50 | #define METHOD_NAME__HID "_HID" |
| 51 | #define METHOD_NAME__CID "_CID" | 51 | #define METHOD_NAME__CID "_CID" |
| 52 | #define METHOD_NAME__UID "_UID" | 52 | #define METHOD_NAME__UID "_UID" |
| 53 | #define METHOD_NAME__SUB "_SUB" | ||
| 53 | #define METHOD_NAME__ADR "_ADR" | 54 | #define METHOD_NAME__ADR "_ADR" |
| 54 | #define METHOD_NAME__INI "_INI" | 55 | #define METHOD_NAME__INI "_INI" |
| 55 | #define METHOD_NAME__STA "_STA" | 56 | #define METHOD_NAME__STA "_STA" |
diff --git a/include/acpi/acpi_bus.h b/include/acpi/acpi_bus.h index 0daa0fbd8654..7ced5dc20dd3 100644 --- a/include/acpi/acpi_bus.h +++ b/include/acpi/acpi_bus.h | |||
| @@ -144,12 +144,11 @@ struct acpi_device_flags { | |||
| 144 | u32 bus_address:1; | 144 | u32 bus_address:1; |
| 145 | u32 removable:1; | 145 | u32 removable:1; |
| 146 | u32 ejectable:1; | 146 | u32 ejectable:1; |
| 147 | u32 lockable:1; | ||
| 148 | u32 suprise_removal_ok:1; | 147 | u32 suprise_removal_ok:1; |
| 149 | u32 power_manageable:1; | 148 | u32 power_manageable:1; |
| 150 | u32 performance_manageable:1; | 149 | u32 performance_manageable:1; |
| 151 | u32 eject_pending:1; | 150 | u32 eject_pending:1; |
| 152 | u32 reserved:23; | 151 | u32 reserved:24; |
| 153 | }; | 152 | }; |
| 154 | 153 | ||
| 155 | /* File System */ | 154 | /* File System */ |
| @@ -180,6 +179,7 @@ struct acpi_device_pnp { | |||
| 180 | acpi_device_name device_name; /* Driver-determined */ | 179 | acpi_device_name device_name; /* Driver-determined */ |
| 181 | acpi_device_class device_class; /* " */ | 180 | acpi_device_class device_class; /* " */ |
| 182 | union acpi_object *str_obj; /* unicode string for _STR method */ | 181 | union acpi_object *str_obj; /* unicode string for _STR method */ |
| 182 | unsigned long sun; /* _SUN */ | ||
| 183 | }; | 183 | }; |
| 184 | 184 | ||
| 185 | #define acpi_device_bid(d) ((d)->pnp.bus_id) | 185 | #define acpi_device_bid(d) ((d)->pnp.bus_id) |
| @@ -201,6 +201,7 @@ struct acpi_device_power_flags { | |||
| 201 | struct acpi_device_power_state { | 201 | struct acpi_device_power_state { |
| 202 | struct { | 202 | struct { |
| 203 | u8 valid:1; | 203 | u8 valid:1; |
| 204 | u8 os_accessible:1; | ||
| 204 | u8 explicit_set:1; /* _PSx present? */ | 205 | u8 explicit_set:1; /* _PSx present? */ |
| 205 | u8 reserved:6; | 206 | u8 reserved:6; |
| 206 | } flags; | 207 | } flags; |
| @@ -339,6 +340,7 @@ acpi_status acpi_bus_get_status_handle(acpi_handle handle, | |||
| 339 | unsigned long long *sta); | 340 | unsigned long long *sta); |
| 340 | int acpi_bus_get_status(struct acpi_device *device); | 341 | int acpi_bus_get_status(struct acpi_device *device); |
| 341 | int acpi_bus_set_power(acpi_handle handle, int state); | 342 | int acpi_bus_set_power(acpi_handle handle, int state); |
| 343 | int acpi_device_set_power(struct acpi_device *device, int state); | ||
| 342 | int acpi_bus_update_power(acpi_handle handle, int *state_p); | 344 | int acpi_bus_update_power(acpi_handle handle, int *state_p); |
| 343 | bool acpi_bus_power_manageable(acpi_handle handle); | 345 | bool acpi_bus_power_manageable(acpi_handle handle); |
| 344 | bool acpi_bus_can_wakeup(acpi_handle handle); | 346 | bool acpi_bus_can_wakeup(acpi_handle handle); |
| @@ -410,36 +412,100 @@ acpi_handle acpi_get_child(acpi_handle, u64); | |||
| 410 | int acpi_is_root_bridge(acpi_handle); | 412 | int acpi_is_root_bridge(acpi_handle); |
| 411 | acpi_handle acpi_get_pci_rootbridge_handle(unsigned int, unsigned int); | 413 | acpi_handle acpi_get_pci_rootbridge_handle(unsigned int, unsigned int); |
| 412 | struct acpi_pci_root *acpi_pci_find_root(acpi_handle handle); | 414 | struct acpi_pci_root *acpi_pci_find_root(acpi_handle handle); |
| 413 | #define DEVICE_ACPI_HANDLE(dev) ((acpi_handle)((dev)->archdata.acpi_handle)) | 415 | #define DEVICE_ACPI_HANDLE(dev) ((acpi_handle)ACPI_HANDLE(dev)) |
| 414 | 416 | ||
| 415 | int acpi_enable_wakeup_device_power(struct acpi_device *dev, int state); | 417 | int acpi_enable_wakeup_device_power(struct acpi_device *dev, int state); |
| 416 | int acpi_disable_wakeup_device_power(struct acpi_device *dev); | 418 | int acpi_disable_wakeup_device_power(struct acpi_device *dev); |
| 417 | 419 | ||
| 418 | #ifdef CONFIG_PM | 420 | #ifdef CONFIG_PM |
| 421 | acpi_status acpi_add_pm_notifier(struct acpi_device *adev, | ||
| 422 | acpi_notify_handler handler, void *context); | ||
| 423 | acpi_status acpi_remove_pm_notifier(struct acpi_device *adev, | ||
| 424 | acpi_notify_handler handler); | ||
| 425 | int acpi_device_power_state(struct device *dev, struct acpi_device *adev, | ||
| 426 | u32 target_state, int d_max_in, int *d_min_p); | ||
| 419 | int acpi_pm_device_sleep_state(struct device *, int *, int); | 427 | int acpi_pm_device_sleep_state(struct device *, int *, int); |
| 420 | #else | 428 | #else |
| 421 | static inline int acpi_pm_device_sleep_state(struct device *d, int *p, int m) | 429 | static inline acpi_status acpi_add_pm_notifier(struct acpi_device *adev, |
| 430 | acpi_notify_handler handler, | ||
| 431 | void *context) | ||
| 432 | { | ||
| 433 | return AE_SUPPORT; | ||
| 434 | } | ||
| 435 | static inline acpi_status acpi_remove_pm_notifier(struct acpi_device *adev, | ||
| 436 | acpi_notify_handler handler) | ||
| 437 | { | ||
| 438 | return AE_SUPPORT; | ||
| 439 | } | ||
| 440 | static inline int __acpi_device_power_state(int m, int *p) | ||
| 422 | { | 441 | { |
| 423 | if (p) | 442 | if (p) |
| 424 | *p = ACPI_STATE_D0; | 443 | *p = ACPI_STATE_D0; |
| 425 | return (m >= ACPI_STATE_D0 && m <= ACPI_STATE_D3) ? m : ACPI_STATE_D0; | 444 | return (m >= ACPI_STATE_D0 && m <= ACPI_STATE_D3) ? m : ACPI_STATE_D0; |
| 426 | } | 445 | } |
| 446 | static inline int acpi_device_power_state(struct device *dev, | ||
| 447 | struct acpi_device *adev, | ||
| 448 | u32 target_state, int d_max_in, | ||
| 449 | int *d_min_p) | ||
| 450 | { | ||
| 451 | return __acpi_device_power_state(d_max_in, d_min_p); | ||
| 452 | } | ||
| 453 | static inline int acpi_pm_device_sleep_state(struct device *d, int *p, int m) | ||
| 454 | { | ||
| 455 | return __acpi_device_power_state(m, p); | ||
| 456 | } | ||
| 427 | #endif | 457 | #endif |
| 428 | 458 | ||
| 429 | #ifdef CONFIG_PM_SLEEP | 459 | #ifdef CONFIG_PM_RUNTIME |
| 460 | int __acpi_device_run_wake(struct acpi_device *, bool); | ||
| 430 | int acpi_pm_device_run_wake(struct device *, bool); | 461 | int acpi_pm_device_run_wake(struct device *, bool); |
| 431 | int acpi_pm_device_sleep_wake(struct device *, bool); | ||
| 432 | #else | 462 | #else |
| 463 | static inline int __acpi_device_run_wake(struct acpi_device *adev, bool en) | ||
| 464 | { | ||
| 465 | return -ENODEV; | ||
| 466 | } | ||
| 433 | static inline int acpi_pm_device_run_wake(struct device *dev, bool enable) | 467 | static inline int acpi_pm_device_run_wake(struct device *dev, bool enable) |
| 434 | { | 468 | { |
| 435 | return -ENODEV; | 469 | return -ENODEV; |
| 436 | } | 470 | } |
| 471 | #endif | ||
| 472 | |||
| 473 | #ifdef CONFIG_PM_SLEEP | ||
| 474 | int __acpi_device_sleep_wake(struct acpi_device *, u32, bool); | ||
| 475 | int acpi_pm_device_sleep_wake(struct device *, bool); | ||
| 476 | #else | ||
| 477 | static inline int __acpi_device_sleep_wake(struct acpi_device *adev, | ||
| 478 | u32 target_state, bool enable) | ||
| 479 | { | ||
| 480 | return -ENODEV; | ||
| 481 | } | ||
| 437 | static inline int acpi_pm_device_sleep_wake(struct device *dev, bool enable) | 482 | static inline int acpi_pm_device_sleep_wake(struct device *dev, bool enable) |
| 438 | { | 483 | { |
| 439 | return -ENODEV; | 484 | return -ENODEV; |
| 440 | } | 485 | } |
| 441 | #endif | 486 | #endif |
| 442 | 487 | ||
| 488 | #ifdef CONFIG_ACPI_SLEEP | ||
| 489 | u32 acpi_target_system_state(void); | ||
| 490 | #else | ||
| 491 | static inline u32 acpi_target_system_state(void) { return ACPI_STATE_S0; } | ||
| 492 | #endif | ||
| 493 | |||
| 494 | static inline bool acpi_device_power_manageable(struct acpi_device *adev) | ||
| 495 | { | ||
| 496 | return adev->flags.power_manageable; | ||
| 497 | } | ||
| 498 | |||
| 499 | static inline bool acpi_device_can_wakeup(struct acpi_device *adev) | ||
| 500 | { | ||
| 501 | return adev->wakeup.flags.valid; | ||
| 502 | } | ||
| 503 | |||
| 504 | static inline bool acpi_device_can_poweroff(struct acpi_device *adev) | ||
| 505 | { | ||
| 506 | return adev->power.states[ACPI_STATE_D3_COLD].flags.os_accessible; | ||
| 507 | } | ||
| 508 | |||
| 443 | #else /* CONFIG_ACPI */ | 509 | #else /* CONFIG_ACPI */ |
| 444 | 510 | ||
| 445 | static inline int register_acpi_bus_type(void *bus) { return 0; } | 511 | static inline int register_acpi_bus_type(void *bus) { return 0; } |
diff --git a/include/acpi/acpi_drivers.h b/include/acpi/acpi_drivers.h index bb145e4b935e..8b1d7a6a9695 100644 --- a/include/acpi/acpi_drivers.h +++ b/include/acpi/acpi_drivers.h | |||
| @@ -92,8 +92,8 @@ int acpi_pci_link_free_irq(acpi_handle handle); | |||
| 92 | 92 | ||
| 93 | /* ACPI PCI Interrupt Routing (pci_irq.c) */ | 93 | /* ACPI PCI Interrupt Routing (pci_irq.c) */ |
| 94 | 94 | ||
| 95 | int acpi_pci_irq_add_prt(acpi_handle handle, struct pci_bus *bus); | 95 | int acpi_pci_irq_add_prt(acpi_handle handle, int segment, int bus); |
| 96 | void acpi_pci_irq_del_prt(struct pci_bus *bus); | 96 | void acpi_pci_irq_del_prt(int segment, int bus); |
| 97 | 97 | ||
| 98 | /* ACPI PCI Device Binding (pci_bind.c) */ | 98 | /* ACPI PCI Device Binding (pci_bind.c) */ |
| 99 | 99 | ||
diff --git a/include/acpi/acpiosxf.h b/include/acpi/acpiosxf.h index 1222ba93d80a..43152742b46f 100644 --- a/include/acpi/acpiosxf.h +++ b/include/acpi/acpiosxf.h | |||
| @@ -1,7 +1,6 @@ | |||
| 1 | |||
| 2 | /****************************************************************************** | 1 | /****************************************************************************** |
| 3 | * | 2 | * |
| 4 | * Name: acpiosxf.h - All interfaces to the OS Services Layer (OSL). These | 3 | * Name: acpiosxf.h - All interfaces to the OS Services Layer (OSL). These |
| 5 | * interfaces must be implemented by OSL to interface the | 4 | * interfaces must be implemented by OSL to interface the |
| 6 | * ACPI components to the host operating system. | 5 | * ACPI components to the host operating system. |
| 7 | * | 6 | * |
diff --git a/include/acpi/acpixf.h b/include/acpi/acpixf.h index 8b891dbead66..3d88395d4d6f 100644 --- a/include/acpi/acpixf.h +++ b/include/acpi/acpixf.h | |||
| @@ -1,4 +1,3 @@ | |||
| 1 | |||
| 2 | /****************************************************************************** | 1 | /****************************************************************************** |
| 3 | * | 2 | * |
| 4 | * Name: acpixf.h - External interfaces to the ACPI subsystem | 3 | * Name: acpixf.h - External interfaces to the ACPI subsystem |
| @@ -47,7 +46,7 @@ | |||
| 47 | 46 | ||
| 48 | /* Current ACPICA subsystem version in YYYYMMDD format */ | 47 | /* Current ACPICA subsystem version in YYYYMMDD format */ |
| 49 | 48 | ||
| 50 | #define ACPI_CA_VERSION 0x20120913 | 49 | #define ACPI_CA_VERSION 0x20121018 |
| 51 | 50 | ||
| 52 | #include <acpi/acconfig.h> | 51 | #include <acpi/acconfig.h> |
| 53 | #include <acpi/actypes.h> | 52 | #include <acpi/actypes.h> |
| @@ -178,8 +177,7 @@ acpi_status acpi_unload_table_id(acpi_owner_id id); | |||
| 178 | 177 | ||
| 179 | acpi_status | 178 | acpi_status |
| 180 | acpi_get_table_header(acpi_string signature, | 179 | acpi_get_table_header(acpi_string signature, |
| 181 | u32 instance, | 180 | u32 instance, struct acpi_table_header *out_table_header); |
| 182 | struct acpi_table_header *out_table_header); | ||
| 183 | 181 | ||
| 184 | acpi_status | 182 | acpi_status |
| 185 | acpi_get_table_with_size(acpi_string signature, | 183 | acpi_get_table_with_size(acpi_string signature, |
| @@ -190,8 +188,7 @@ acpi_get_table(acpi_string signature, | |||
| 190 | u32 instance, struct acpi_table_header **out_table); | 188 | u32 instance, struct acpi_table_header **out_table); |
| 191 | 189 | ||
| 192 | acpi_status | 190 | acpi_status |
| 193 | acpi_get_table_by_index(u32 table_index, | 191 | acpi_get_table_by_index(u32 table_index, struct acpi_table_header **out_table); |
| 194 | struct acpi_table_header **out_table); | ||
| 195 | 192 | ||
| 196 | acpi_status | 193 | acpi_status |
| 197 | acpi_install_table_handler(acpi_tbl_handler handler, void *context); | 194 | acpi_install_table_handler(acpi_tbl_handler handler, void *context); |
| @@ -274,7 +271,7 @@ acpi_install_initialization_handler(acpi_init_handler handler, u32 function); | |||
| 274 | 271 | ||
| 275 | ACPI_HW_DEPENDENT_RETURN_STATUS(acpi_status | 272 | ACPI_HW_DEPENDENT_RETURN_STATUS(acpi_status |
| 276 | acpi_install_global_event_handler | 273 | acpi_install_global_event_handler |
| 277 | (ACPI_GBL_EVENT_HANDLER handler, void *context)) | 274 | (acpi_gbl_event_handler handler, void *context)) |
| 278 | 275 | ||
| 279 | ACPI_HW_DEPENDENT_RETURN_STATUS(acpi_status | 276 | ACPI_HW_DEPENDENT_RETURN_STATUS(acpi_status |
| 280 | acpi_install_fixed_event_handler(u32 | 277 | acpi_install_fixed_event_handler(u32 |
| @@ -300,10 +297,9 @@ ACPI_HW_DEPENDENT_RETURN_STATUS(acpi_status | |||
| 300 | u32 gpe_number, | 297 | u32 gpe_number, |
| 301 | acpi_gpe_handler | 298 | acpi_gpe_handler |
| 302 | address)) | 299 | address)) |
| 303 | acpi_status | 300 | acpi_status acpi_install_notify_handler(acpi_handle device, u32 handler_type, |
| 304 | acpi_install_notify_handler(acpi_handle device, | 301 | acpi_notify_handler handler, |
| 305 | u32 handler_type, | 302 | void *context); |
| 306 | acpi_notify_handler handler, void *context); | ||
| 307 | 303 | ||
| 308 | acpi_status | 304 | acpi_status |
| 309 | acpi_remove_notify_handler(acpi_handle device, | 305 | acpi_remove_notify_handler(acpi_handle device, |
diff --git a/include/acpi/actbl3.h b/include/acpi/actbl3.h index 8c61b5fe42a4..6585141e4b97 100644 --- a/include/acpi/actbl3.h +++ b/include/acpi/actbl3.h | |||
| @@ -277,10 +277,10 @@ struct acpi_table_gtdt { | |||
| 277 | ******************************************************************************/ | 277 | ******************************************************************************/ |
| 278 | 278 | ||
| 279 | #define ACPI_MPST_CHANNEL_INFO \ | 279 | #define ACPI_MPST_CHANNEL_INFO \ |
| 280 | u16 reserved1; \ | ||
| 281 | u8 channel_id; \ | 280 | u8 channel_id; \ |
| 282 | u8 reserved2; \ | 281 | u8 reserved1[3]; \ |
| 283 | u16 power_node_count; | 282 | u16 power_node_count; \ |
| 283 | u16 reserved2; | ||
| 284 | 284 | ||
| 285 | /* Main table */ | 285 | /* Main table */ |
| 286 | 286 | ||
| @@ -304,9 +304,8 @@ struct acpi_mpst_power_node { | |||
| 304 | u32 length; | 304 | u32 length; |
| 305 | u64 range_address; | 305 | u64 range_address; |
| 306 | u64 range_length; | 306 | u64 range_length; |
| 307 | u8 num_power_states; | 307 | u32 num_power_states; |
| 308 | u8 num_physical_components; | 308 | u32 num_physical_components; |
| 309 | u16 reserved2; | ||
| 310 | }; | 309 | }; |
| 311 | 310 | ||
| 312 | /* Values for Flags field above */ | 311 | /* Values for Flags field above */ |
| @@ -332,10 +331,11 @@ struct acpi_mpst_component { | |||
| 332 | 331 | ||
| 333 | struct acpi_mpst_data_hdr { | 332 | struct acpi_mpst_data_hdr { |
| 334 | u16 characteristics_count; | 333 | u16 characteristics_count; |
| 334 | u16 reserved; | ||
| 335 | }; | 335 | }; |
| 336 | 336 | ||
| 337 | struct acpi_mpst_power_data { | 337 | struct acpi_mpst_power_data { |
| 338 | u8 revision; | 338 | u8 structure_id; |
| 339 | u8 flags; | 339 | u8 flags; |
| 340 | u16 reserved1; | 340 | u16 reserved1; |
| 341 | u32 average_power; | 341 | u32 average_power; |
| @@ -356,10 +356,10 @@ struct acpi_mpst_shared { | |||
| 356 | u32 signature; | 356 | u32 signature; |
| 357 | u16 pcc_command; | 357 | u16 pcc_command; |
| 358 | u16 pcc_status; | 358 | u16 pcc_status; |
| 359 | u16 command_register; | 359 | u32 command_register; |
| 360 | u16 status_register; | 360 | u32 status_register; |
| 361 | u16 power_state_id; | 361 | u32 power_state_id; |
| 362 | u16 power_node_id; | 362 | u32 power_node_id; |
| 363 | u64 energy_consumed; | 363 | u64 energy_consumed; |
| 364 | u64 average_power; | 364 | u64 average_power; |
| 365 | }; | 365 | }; |
diff --git a/include/acpi/actypes.h b/include/acpi/actypes.h index a85bae968262..4f43f1fba132 100644 --- a/include/acpi/actypes.h +++ b/include/acpi/actypes.h | |||
| @@ -453,10 +453,14 @@ typedef u64 acpi_integer; | |||
| 453 | #define ACPI_PHYSADDR_TO_PTR(i) ACPI_TO_POINTER(i) | 453 | #define ACPI_PHYSADDR_TO_PTR(i) ACPI_TO_POINTER(i) |
| 454 | #define ACPI_PTR_TO_PHYSADDR(i) ACPI_TO_INTEGER(i) | 454 | #define ACPI_PTR_TO_PHYSADDR(i) ACPI_TO_INTEGER(i) |
| 455 | 455 | ||
| 456 | /* Optimizations for 4-character (32-bit) acpi_name manipulation */ | ||
| 457 | |||
| 456 | #ifndef ACPI_MISALIGNMENT_NOT_SUPPORTED | 458 | #ifndef ACPI_MISALIGNMENT_NOT_SUPPORTED |
| 457 | #define ACPI_COMPARE_NAME(a,b) (*ACPI_CAST_PTR (u32, (a)) == *ACPI_CAST_PTR (u32, (b))) | 459 | #define ACPI_COMPARE_NAME(a,b) (*ACPI_CAST_PTR (u32, (a)) == *ACPI_CAST_PTR (u32, (b))) |
| 460 | #define ACPI_MOVE_NAME(dest,src) (*ACPI_CAST_PTR (u32, (dest)) = *ACPI_CAST_PTR (u32, (src))) | ||
| 458 | #else | 461 | #else |
| 459 | #define ACPI_COMPARE_NAME(a,b) (!ACPI_STRNCMP (ACPI_CAST_PTR (char, (a)), ACPI_CAST_PTR (char, (b)), ACPI_NAME_SIZE)) | 462 | #define ACPI_COMPARE_NAME(a,b) (!ACPI_STRNCMP (ACPI_CAST_PTR (char, (a)), ACPI_CAST_PTR (char, (b)), ACPI_NAME_SIZE)) |
| 463 | #define ACPI_MOVE_NAME(dest,src) (ACPI_STRNCPY (ACPI_CAST_PTR (char, (dest)), ACPI_CAST_PTR (char, (src)), ACPI_NAME_SIZE)) | ||
| 460 | #endif | 464 | #endif |
| 461 | 465 | ||
| 462 | /******************************************************************************* | 466 | /******************************************************************************* |
| @@ -796,11 +800,11 @@ typedef u8 acpi_adr_space_type; | |||
| 796 | 800 | ||
| 797 | /* Sleep function dispatch */ | 801 | /* Sleep function dispatch */ |
| 798 | 802 | ||
| 799 | typedef acpi_status(*ACPI_SLEEP_FUNCTION) (u8 sleep_state); | 803 | typedef acpi_status(*acpi_sleep_function) (u8 sleep_state); |
| 800 | 804 | ||
| 801 | struct acpi_sleep_functions { | 805 | struct acpi_sleep_functions { |
| 802 | ACPI_SLEEP_FUNCTION legacy_function; | 806 | acpi_sleep_function legacy_function; |
| 803 | ACPI_SLEEP_FUNCTION extended_function; | 807 | acpi_sleep_function extended_function; |
| 804 | }; | 808 | }; |
| 805 | 809 | ||
| 806 | /* | 810 | /* |
| @@ -922,7 +926,8 @@ struct acpi_system_info { | |||
| 922 | /* | 926 | /* |
| 923 | * Types specific to the OS service interfaces | 927 | * Types specific to the OS service interfaces |
| 924 | */ | 928 | */ |
| 925 | typedef u32(ACPI_SYSTEM_XFACE * acpi_osd_handler) (void *context); | 929 | typedef u32 |
| 930 | (ACPI_SYSTEM_XFACE * acpi_osd_handler) (void *context); | ||
| 926 | 931 | ||
| 927 | typedef void | 932 | typedef void |
| 928 | (ACPI_SYSTEM_XFACE * acpi_osd_exec_callback) (void *context); | 933 | (ACPI_SYSTEM_XFACE * acpi_osd_exec_callback) (void *context); |
| @@ -931,14 +936,15 @@ typedef void | |||
| 931 | * Various handlers and callback procedures | 936 | * Various handlers and callback procedures |
| 932 | */ | 937 | */ |
| 933 | typedef | 938 | typedef |
| 934 | void (*ACPI_GBL_EVENT_HANDLER) (u32 event_type, | 939 | void (*acpi_gbl_event_handler) (u32 event_type, |
| 935 | acpi_handle device, | 940 | acpi_handle device, |
| 936 | u32 event_number, void *context); | 941 | u32 event_number, void *context); |
| 937 | 942 | ||
| 938 | #define ACPI_EVENT_TYPE_GPE 0 | 943 | #define ACPI_EVENT_TYPE_GPE 0 |
| 939 | #define ACPI_EVENT_TYPE_FIXED 1 | 944 | #define ACPI_EVENT_TYPE_FIXED 1 |
| 940 | 945 | ||
| 941 | typedef u32(*acpi_event_handler) (void *context); | 946 | typedef |
| 947 | u32(*acpi_event_handler) (void *context); | ||
| 942 | 948 | ||
| 943 | typedef | 949 | typedef |
| 944 | u32 (*acpi_gpe_handler) (acpi_handle gpe_device, u32 gpe_number, void *context); | 950 | u32 (*acpi_gpe_handler) (acpi_handle gpe_device, u32 gpe_number, void *context); |
| @@ -1018,17 +1024,17 @@ u32 (*acpi_interface_handler) (acpi_string interface_name, u32 supported); | |||
| 1018 | 1024 | ||
| 1019 | #define ACPI_UUID_LENGTH 16 | 1025 | #define ACPI_UUID_LENGTH 16 |
| 1020 | 1026 | ||
| 1021 | /* Structures used for device/processor HID, UID, CID */ | 1027 | /* Structures used for device/processor HID, UID, CID, and SUB */ |
| 1022 | 1028 | ||
| 1023 | struct acpica_device_id { | 1029 | struct acpi_pnp_device_id { |
| 1024 | u32 length; /* Length of string + null */ | 1030 | u32 length; /* Length of string + null */ |
| 1025 | char *string; | 1031 | char *string; |
| 1026 | }; | 1032 | }; |
| 1027 | 1033 | ||
| 1028 | struct acpica_device_id_list { | 1034 | struct acpi_pnp_device_id_list { |
| 1029 | u32 count; /* Number of IDs in Ids array */ | 1035 | u32 count; /* Number of IDs in Ids array */ |
| 1030 | u32 list_size; /* Size of list, including ID strings */ | 1036 | u32 list_size; /* Size of list, including ID strings */ |
| 1031 | struct acpica_device_id ids[1]; /* ID array */ | 1037 | struct acpi_pnp_device_id ids[1]; /* ID array */ |
| 1032 | }; | 1038 | }; |
| 1033 | 1039 | ||
| 1034 | /* | 1040 | /* |
| @@ -1046,9 +1052,10 @@ struct acpi_device_info { | |||
| 1046 | u8 lowest_dstates[5]; /* _sx_w values: 0xFF indicates not valid */ | 1052 | u8 lowest_dstates[5]; /* _sx_w values: 0xFF indicates not valid */ |
| 1047 | u32 current_status; /* _STA value */ | 1053 | u32 current_status; /* _STA value */ |
| 1048 | u64 address; /* _ADR value */ | 1054 | u64 address; /* _ADR value */ |
| 1049 | struct acpica_device_id hardware_id; /* _HID value */ | 1055 | struct acpi_pnp_device_id hardware_id; /* _HID value */ |
| 1050 | struct acpica_device_id unique_id; /* _UID value */ | 1056 | struct acpi_pnp_device_id unique_id; /* _UID value */ |
| 1051 | struct acpica_device_id_list compatible_id_list; /* _CID list <must be last> */ | 1057 | struct acpi_pnp_device_id subsystem_id; /* _SUB value */ |
| 1058 | struct acpi_pnp_device_id_list compatible_id_list; /* _CID list <must be last> */ | ||
| 1052 | }; | 1059 | }; |
| 1053 | 1060 | ||
| 1054 | /* Values for Flags field above (acpi_get_object_info) */ | 1061 | /* Values for Flags field above (acpi_get_object_info) */ |
| @@ -1061,11 +1068,12 @@ struct acpi_device_info { | |||
| 1061 | #define ACPI_VALID_ADR 0x02 | 1068 | #define ACPI_VALID_ADR 0x02 |
| 1062 | #define ACPI_VALID_HID 0x04 | 1069 | #define ACPI_VALID_HID 0x04 |
| 1063 | #define ACPI_VALID_UID 0x08 | 1070 | #define ACPI_VALID_UID 0x08 |
| 1064 | #define ACPI_VALID_CID 0x10 | 1071 | #define ACPI_VALID_SUB 0x10 |
| 1065 | #define ACPI_VALID_SXDS 0x20 | 1072 | #define ACPI_VALID_CID 0x20 |
| 1066 | #define ACPI_VALID_SXWS 0x40 | 1073 | #define ACPI_VALID_SXDS 0x40 |
| 1074 | #define ACPI_VALID_SXWS 0x80 | ||
| 1067 | 1075 | ||
| 1068 | /* Flags for _STA method */ | 1076 | /* Flags for _STA return value (current_status above) */ |
| 1069 | 1077 | ||
| 1070 | #define ACPI_STA_DEVICE_PRESENT 0x01 | 1078 | #define ACPI_STA_DEVICE_PRESENT 0x01 |
| 1071 | #define ACPI_STA_DEVICE_ENABLED 0x02 | 1079 | #define ACPI_STA_DEVICE_ENABLED 0x02 |
