diff options
| author | Linus Torvalds <torvalds@linux-foundation.org> | 2011-01-13 23:15:35 -0500 |
|---|---|---|
| committer | Linus Torvalds <torvalds@linux-foundation.org> | 2011-01-13 23:15:35 -0500 |
| commit | 52cfd503ad7176d23a5dd7af3981744feb60622f (patch) | |
| tree | 0a8aeaaf4acbc86ac682f18632b8070c1c6b7ba1 /include/acpi | |
| parent | dc8e7e3ec60bd5ef7868aa88755e9d4c948dc5cc (diff) | |
| parent | 4263d9a3ae4d15785897d0543bb59316c84ee605 (diff) | |
Merge branch 'release' of git://git.kernel.org/pub/scm/linux/kernel/git/lenb/linux-acpi-2.6
* 'release' of git://git.kernel.org/pub/scm/linux/kernel/git/lenb/linux-acpi-2.6: (59 commits)
ACPI / PM: Fix build problems for !CONFIG_ACPI related to NVS rework
ACPI: fix resource check message
ACPI / Battery: Update information on info notification and resume
ACPI: Drop device flag wake_capable
ACPI: Always check if _PRW is present before trying to evaluate it
ACPI / PM: Check status of power resources under mutexes
ACPI / PM: Rename acpi_power_off_device()
ACPI / PM: Drop acpi_power_nocheck
ACPI / PM: Drop acpi_bus_get_power()
Platform / x86: Make fujitsu_laptop use acpi_bus_update_power()
ACPI / Fan: Rework the handling of power resources
ACPI / PM: Register power resource devices as soon as they are needed
ACPI / PM: Register acpi_power_driver early
ACPI / PM: Add function for updating device power state consistently
ACPI / PM: Add function for device power state initialization
ACPI / PM: Introduce __acpi_bus_get_power()
ACPI / PM: Introduce function for refcounting device power resources
ACPI / PM: Add functions for manipulating lists of power resources
ACPI / PM: Prevent acpi_power_get_inferred_state() from making changes
ACPICA: Update version to 20101209
...
Diffstat (limited to 'include/acpi')
| -rw-r--r-- | include/acpi/acpi_bus.h | 12 | ||||
| -rw-r--r-- | include/acpi/acpixf.h | 20 | ||||
| -rw-r--r-- | include/acpi/actypes.h | 52 | ||||
| -rw-r--r-- | include/acpi/processor.h | 6 |
4 files changed, 55 insertions, 35 deletions
diff --git a/include/acpi/acpi_bus.h b/include/acpi/acpi_bus.h index 359ef11725a6..78ca429929f7 100644 --- a/include/acpi/acpi_bus.h +++ b/include/acpi/acpi_bus.h | |||
| @@ -148,9 +148,7 @@ struct acpi_device_flags { | |||
| 148 | u32 suprise_removal_ok:1; | 148 | u32 suprise_removal_ok:1; |
| 149 | u32 power_manageable:1; | 149 | u32 power_manageable:1; |
| 150 | u32 performance_manageable:1; | 150 | u32 performance_manageable:1; |
| 151 | u32 wake_capable:1; /* Wakeup(_PRW) supported? */ | 151 | u32 reserved:24; |
| 152 | u32 force_power_state:1; | ||
| 153 | u32 reserved:22; | ||
| 154 | }; | 152 | }; |
| 155 | 153 | ||
| 156 | /* File System */ | 154 | /* File System */ |
| @@ -242,20 +240,14 @@ struct acpi_device_perf { | |||
| 242 | struct acpi_device_wakeup_flags { | 240 | struct acpi_device_wakeup_flags { |
| 243 | u8 valid:1; /* Can successfully enable wakeup? */ | 241 | u8 valid:1; /* Can successfully enable wakeup? */ |
| 244 | u8 run_wake:1; /* Run-Wake GPE devices */ | 242 | u8 run_wake:1; /* Run-Wake GPE devices */ |
| 245 | u8 always_enabled:1; /* Run-wake devices that are always enabled */ | ||
| 246 | u8 notifier_present:1; /* Wake-up notify handler has been installed */ | 243 | u8 notifier_present:1; /* Wake-up notify handler has been installed */ |
| 247 | }; | 244 | }; |
| 248 | 245 | ||
| 249 | struct acpi_device_wakeup_state { | ||
| 250 | u8 enabled:1; | ||
| 251 | }; | ||
| 252 | |||
| 253 | struct acpi_device_wakeup { | 246 | struct acpi_device_wakeup { |
| 254 | acpi_handle gpe_device; | 247 | acpi_handle gpe_device; |
| 255 | u64 gpe_number; | 248 | u64 gpe_number; |
| 256 | u64 sleep_state; | 249 | u64 sleep_state; |
| 257 | struct acpi_handle_list resources; | 250 | struct acpi_handle_list resources; |
| 258 | struct acpi_device_wakeup_state state; | ||
| 259 | struct acpi_device_wakeup_flags flags; | 251 | struct acpi_device_wakeup_flags flags; |
| 260 | int prepare_count; | 252 | int prepare_count; |
| 261 | int run_wake_count; | 253 | int run_wake_count; |
| @@ -328,8 +320,8 @@ void acpi_bus_data_handler(acpi_handle handle, void *context); | |||
| 328 | acpi_status acpi_bus_get_status_handle(acpi_handle handle, | 320 | acpi_status acpi_bus_get_status_handle(acpi_handle handle, |
| 329 | unsigned long long *sta); | 321 | unsigned long long *sta); |
| 330 | int acpi_bus_get_status(struct acpi_device *device); | 322 | int acpi_bus_get_status(struct acpi_device *device); |
| 331 | int acpi_bus_get_power(acpi_handle handle, int *state); | ||
| 332 | int acpi_bus_set_power(acpi_handle handle, int state); | 323 | int acpi_bus_set_power(acpi_handle handle, int state); |
| 324 | int acpi_bus_update_power(acpi_handle handle, int *state_p); | ||
| 333 | bool acpi_bus_power_manageable(acpi_handle handle); | 325 | bool acpi_bus_power_manageable(acpi_handle handle); |
| 334 | bool acpi_bus_can_wakeup(acpi_handle handle); | 326 | bool acpi_bus_can_wakeup(acpi_handle handle); |
| 335 | #ifdef CONFIG_ACPI_PROC_EVENT | 327 | #ifdef CONFIG_ACPI_PROC_EVENT |
diff --git a/include/acpi/acpixf.h b/include/acpi/acpixf.h index 53b7cfd924a3..241b8a04c83c 100644 --- a/include/acpi/acpixf.h +++ b/include/acpi/acpixf.h | |||
| @@ -47,7 +47,7 @@ | |||
| 47 | 47 | ||
| 48 | /* Current ACPICA subsystem version in YYYYMMDD format */ | 48 | /* Current ACPICA subsystem version in YYYYMMDD format */ |
| 49 | 49 | ||
| 50 | #define ACPI_CA_VERSION 0x20101013 | 50 | #define ACPI_CA_VERSION 0x20101209 |
| 51 | 51 | ||
| 52 | #include "actypes.h" | 52 | #include "actypes.h" |
| 53 | #include "actbl.h" | 53 | #include "actbl.h" |
| @@ -229,6 +229,10 @@ acpi_status | |||
| 229 | acpi_install_initialization_handler(acpi_init_handler handler, u32 function); | 229 | acpi_install_initialization_handler(acpi_init_handler handler, u32 function); |
| 230 | 230 | ||
| 231 | acpi_status | 231 | acpi_status |
| 232 | acpi_install_global_event_handler(ACPI_GBL_EVENT_HANDLER handler, | ||
| 233 | void *context); | ||
| 234 | |||
| 235 | acpi_status | ||
| 232 | acpi_install_fixed_event_handler(u32 acpi_event, | 236 | acpi_install_fixed_event_handler(u32 acpi_event, |
| 233 | acpi_event_handler handler, void *context); | 237 | acpi_event_handler handler, void *context); |
| 234 | 238 | ||
| @@ -258,11 +262,11 @@ acpi_remove_address_space_handler(acpi_handle device, | |||
| 258 | acpi_status | 262 | acpi_status |
| 259 | acpi_install_gpe_handler(acpi_handle gpe_device, | 263 | acpi_install_gpe_handler(acpi_handle gpe_device, |
| 260 | u32 gpe_number, | 264 | u32 gpe_number, |
| 261 | u32 type, acpi_event_handler address, void *context); | 265 | u32 type, acpi_gpe_handler address, void *context); |
| 262 | 266 | ||
| 263 | acpi_status | 267 | acpi_status |
| 264 | acpi_remove_gpe_handler(acpi_handle gpe_device, | 268 | acpi_remove_gpe_handler(acpi_handle gpe_device, |
| 265 | u32 gpe_number, acpi_event_handler address); | 269 | u32 gpe_number, acpi_gpe_handler address); |
| 266 | 270 | ||
| 267 | #ifdef ACPI_FUTURE_USAGE | 271 | #ifdef ACPI_FUTURE_USAGE |
| 268 | acpi_status acpi_install_exception_handler(acpi_exception_handler handler); | 272 | acpi_status acpi_install_exception_handler(acpi_exception_handler handler); |
| @@ -292,11 +296,13 @@ acpi_status acpi_enable_gpe(acpi_handle gpe_device, u32 gpe_number); | |||
| 292 | 296 | ||
| 293 | acpi_status acpi_disable_gpe(acpi_handle gpe_device, u32 gpe_number); | 297 | acpi_status acpi_disable_gpe(acpi_handle gpe_device, u32 gpe_number); |
| 294 | 298 | ||
| 295 | acpi_status acpi_gpe_can_wake(acpi_handle gpe_device, u32 gpe_number); | ||
| 296 | |||
| 297 | acpi_status acpi_clear_gpe(acpi_handle gpe_device, u32 gpe_number); | 299 | acpi_status acpi_clear_gpe(acpi_handle gpe_device, u32 gpe_number); |
| 298 | 300 | ||
| 299 | acpi_status acpi_gpe_wakeup(acpi_handle gpe_device, u32 gpe_number, u8 action); | 301 | acpi_status |
| 302 | acpi_setup_gpe_for_wake(acpi_handle parent_device, | ||
| 303 | acpi_handle gpe_device, u32 gpe_number); | ||
| 304 | |||
| 305 | acpi_status acpi_set_gpe_wake_mask(acpi_handle gpe_device, u32 gpe_number, u8 action); | ||
| 300 | 306 | ||
| 301 | acpi_status | 307 | acpi_status |
| 302 | acpi_get_gpe_status(acpi_handle gpe_device, | 308 | acpi_get_gpe_status(acpi_handle gpe_device, |
| @@ -315,7 +321,7 @@ acpi_install_gpe_block(acpi_handle gpe_device, | |||
| 315 | 321 | ||
| 316 | acpi_status acpi_remove_gpe_block(acpi_handle gpe_device); | 322 | acpi_status acpi_remove_gpe_block(acpi_handle gpe_device); |
| 317 | 323 | ||
| 318 | acpi_status acpi_update_gpes(void); | 324 | acpi_status acpi_update_all_gpes(void); |
| 319 | 325 | ||
| 320 | /* | 326 | /* |
| 321 | * Resource interfaces | 327 | * Resource interfaces |
diff --git a/include/acpi/actypes.h b/include/acpi/actypes.h index 2b134b691e34..939a431a6ab6 100644 --- a/include/acpi/actypes.h +++ b/include/acpi/actypes.h | |||
| @@ -656,33 +656,34 @@ typedef u32 acpi_event_status; | |||
| 656 | #define ACPI_GPE_MAX 0xFF | 656 | #define ACPI_GPE_MAX 0xFF |
| 657 | #define ACPI_NUM_GPE 256 | 657 | #define ACPI_NUM_GPE 256 |
| 658 | 658 | ||
| 659 | /* Actions for acpi_gpe_wakeup, acpi_hw_low_set_gpe */ | 659 | /* Actions for acpi_set_gpe_wake_mask, acpi_hw_low_set_gpe */ |
| 660 | 660 | ||
| 661 | #define ACPI_GPE_ENABLE 0 | 661 | #define ACPI_GPE_ENABLE 0 |
| 662 | #define ACPI_GPE_DISABLE 1 | 662 | #define ACPI_GPE_DISABLE 1 |
| 663 | #define ACPI_GPE_COND_ENABLE 2 | 663 | #define ACPI_GPE_CONDITIONAL_ENABLE 2 |
| 664 | 664 | ||
| 665 | /* | 665 | /* |
| 666 | * GPE info flags - Per GPE | 666 | * GPE info flags - Per GPE |
| 667 | * +-------+---+-+-+ | 667 | * +-------+-+-+---+ |
| 668 | * | 7:4 |3:2|1|0| | 668 | * | 7:4 |3|2|1:0| |
| 669 | * +-------+---+-+-+ | 669 | * +-------+-+-+---+ |
| 670 | * | | | | | 670 | * | | | | |
| 671 | * | | | +--- Interrupt type: edge or level triggered | 671 | * | | | +-- Type of dispatch:to method, handler, notify, or none |
| 672 | * | | +----- GPE can wake the system | 672 | * | | +----- Interrupt type: edge or level triggered |
| 673 | * | +-------- Type of dispatch:to method, handler, or none | 673 | * | +------- Is a Wake GPE |
| 674 | * +-------------- <Reserved> | 674 | * +------------ <Reserved> |
| 675 | */ | 675 | */ |
| 676 | #define ACPI_GPE_XRUPT_TYPE_MASK (u8) 0x01 | 676 | #define ACPI_GPE_DISPATCH_NONE (u8) 0x00 |
| 677 | #define ACPI_GPE_LEVEL_TRIGGERED (u8) 0x01 | 677 | #define ACPI_GPE_DISPATCH_METHOD (u8) 0x01 |
| 678 | #define ACPI_GPE_EDGE_TRIGGERED (u8) 0x00 | 678 | #define ACPI_GPE_DISPATCH_HANDLER (u8) 0x02 |
| 679 | #define ACPI_GPE_DISPATCH_NOTIFY (u8) 0x03 | ||
| 680 | #define ACPI_GPE_DISPATCH_MASK (u8) 0x03 | ||
| 679 | 681 | ||
| 680 | #define ACPI_GPE_CAN_WAKE (u8) 0x02 | 682 | #define ACPI_GPE_LEVEL_TRIGGERED (u8) 0x04 |
| 683 | #define ACPI_GPE_EDGE_TRIGGERED (u8) 0x00 | ||
| 684 | #define ACPI_GPE_XRUPT_TYPE_MASK (u8) 0x04 | ||
| 681 | 685 | ||
| 682 | #define ACPI_GPE_DISPATCH_MASK (u8) 0x0C | 686 | #define ACPI_GPE_CAN_WAKE (u8) 0x08 |
| 683 | #define ACPI_GPE_DISPATCH_HANDLER (u8) 0x04 | ||
| 684 | #define ACPI_GPE_DISPATCH_METHOD (u8) 0x08 | ||
| 685 | #define ACPI_GPE_DISPATCH_NOT_USED (u8) 0x00 | ||
| 686 | 687 | ||
| 687 | /* | 688 | /* |
| 688 | * Flags for GPE and Lock interfaces | 689 | * Flags for GPE and Lock interfaces |
| @@ -894,9 +895,20 @@ typedef void | |||
| 894 | /* | 895 | /* |
| 895 | * Various handlers and callback procedures | 896 | * Various handlers and callback procedures |
| 896 | */ | 897 | */ |
| 898 | typedef | ||
| 899 | void (*ACPI_GBL_EVENT_HANDLER) (u32 event_type, | ||
| 900 | acpi_handle device, | ||
| 901 | u32 event_number, void *context); | ||
| 902 | |||
| 903 | #define ACPI_EVENT_TYPE_GPE 0 | ||
| 904 | #define ACPI_EVENT_TYPE_FIXED 1 | ||
| 905 | |||
| 897 | typedef u32(*acpi_event_handler) (void *context); | 906 | typedef u32(*acpi_event_handler) (void *context); |
| 898 | 907 | ||
| 899 | typedef | 908 | typedef |
| 909 | u32 (*acpi_gpe_handler) (acpi_handle gpe_device, u32 gpe_number, void *context); | ||
| 910 | |||
| 911 | typedef | ||
| 900 | void (*acpi_notify_handler) (acpi_handle device, u32 value, void *context); | 912 | void (*acpi_notify_handler) (acpi_handle device, u32 value, void *context); |
| 901 | 913 | ||
| 902 | typedef | 914 | typedef |
| @@ -951,6 +963,10 @@ u32 (*acpi_interface_handler) (acpi_string interface_name, u32 supported); | |||
| 951 | #define ACPI_INTERRUPT_NOT_HANDLED 0x00 | 963 | #define ACPI_INTERRUPT_NOT_HANDLED 0x00 |
| 952 | #define ACPI_INTERRUPT_HANDLED 0x01 | 964 | #define ACPI_INTERRUPT_HANDLED 0x01 |
| 953 | 965 | ||
| 966 | /* GPE handler return values */ | ||
| 967 | |||
| 968 | #define ACPI_REENABLE_GPE 0x80 | ||
| 969 | |||
| 954 | /* Length of 32-bit EISAID values when converted back to a string */ | 970 | /* Length of 32-bit EISAID values when converted back to a string */ |
| 955 | 971 | ||
| 956 | #define ACPI_EISAID_STRING_SIZE 8 /* Includes null terminator */ | 972 | #define ACPI_EISAID_STRING_SIZE 8 /* Includes null terminator */ |
diff --git a/include/acpi/processor.h b/include/acpi/processor.h index 1b62102fbb67..55192ac0cede 100644 --- a/include/acpi/processor.h +++ b/include/acpi/processor.h | |||
| @@ -324,6 +324,12 @@ int acpi_processor_tstate_has_changed(struct acpi_processor *pr); | |||
| 324 | int acpi_processor_get_throttling_info(struct acpi_processor *pr); | 324 | int acpi_processor_get_throttling_info(struct acpi_processor *pr); |
| 325 | extern int acpi_processor_set_throttling(struct acpi_processor *pr, | 325 | extern int acpi_processor_set_throttling(struct acpi_processor *pr, |
| 326 | int state, bool force); | 326 | int state, bool force); |
| 327 | /* | ||
| 328 | * Reevaluate whether the T-state is invalid after one cpu is | ||
| 329 | * onlined/offlined. In such case the flags.throttling will be updated. | ||
| 330 | */ | ||
| 331 | extern void acpi_processor_reevaluate_tstate(struct acpi_processor *pr, | ||
| 332 | unsigned long action); | ||
| 327 | extern const struct file_operations acpi_processor_throttling_fops; | 333 | extern const struct file_operations acpi_processor_throttling_fops; |
| 328 | extern void acpi_processor_throttling_init(void); | 334 | extern void acpi_processor_throttling_init(void); |
| 329 | /* in processor_idle.c */ | 335 | /* in processor_idle.c */ |
