aboutsummaryrefslogtreecommitdiffstats
path: root/include/acpi
diff options
context:
space:
mode:
Diffstat (limited to 'include/acpi')
-rw-r--r--include/acpi/acconfig.h4
-rw-r--r--include/acpi/acoutput.h8
-rw-r--r--include/acpi/acpi_bus.h70
-rw-r--r--include/acpi/acpi_drivers.h8
-rw-r--r--include/acpi/acpiosxf.h2
-rw-r--r--include/acpi/acpixf.h3
-rw-r--r--include/acpi/processor.h15
7 files changed, 35 insertions, 75 deletions
diff --git a/include/acpi/acconfig.h b/include/acpi/acconfig.h
index 14ceff788c40..1c16f821434f 100644
--- a/include/acpi/acconfig.h
+++ b/include/acpi/acconfig.h
@@ -219,8 +219,8 @@
219 * 219 *
220 *****************************************************************************/ 220 *****************************************************************************/
221 221
222#define ACPI_DEBUGGER_MAX_ARGS 8 /* Must be max method args + 1 */ 222#define ACPI_DEBUGGER_MAX_ARGS ACPI_METHOD_NUM_ARGS + 4 /* Max command line arguments */
223#define ACPI_DB_LINE_BUFFER_SIZE 512 223#define ACPI_DB_LINE_BUFFER_SIZE 512
224 224
225#define ACPI_DEBUGGER_COMMAND_PROMPT '-' 225#define ACPI_DEBUGGER_COMMAND_PROMPT '-'
226#define ACPI_DEBUGGER_EXECUTE_PROMPT '%' 226#define ACPI_DEBUGGER_EXECUTE_PROMPT '%'
diff --git a/include/acpi/acoutput.h b/include/acpi/acoutput.h
index 4f52ea795c7a..4607b027a657 100644
--- a/include/acpi/acoutput.h
+++ b/include/acpi/acoutput.h
@@ -428,27 +428,21 @@
428 * This is the non-debug case -- make everything go away, 428 * This is the non-debug case -- make everything go away,
429 * leaving no executable debug code! 429 * leaving no executable debug code!
430 */ 430 */
431#define ACPI_FUNCTION_NAME(a)
432#define ACPI_DEBUG_PRINT(pl) 431#define ACPI_DEBUG_PRINT(pl)
433#define ACPI_DEBUG_PRINT_RAW(pl) 432#define ACPI_DEBUG_PRINT_RAW(pl)
434#define ACPI_DEBUG_EXEC(a) 433#define ACPI_DEBUG_EXEC(a)
435#define ACPI_DEBUG_ONLY_MEMBERS(a) 434#define ACPI_DEBUG_ONLY_MEMBERS(a)
435#define ACPI_FUNCTION_NAME(a)
436#define ACPI_FUNCTION_TRACE(a) 436#define ACPI_FUNCTION_TRACE(a)
437#define ACPI_FUNCTION_TRACE_PTR(a, b) 437#define ACPI_FUNCTION_TRACE_PTR(a, b)
438#define ACPI_FUNCTION_TRACE_U32(a, b) 438#define ACPI_FUNCTION_TRACE_U32(a, b)
439#define ACPI_FUNCTION_TRACE_STR(a, b) 439#define ACPI_FUNCTION_TRACE_STR(a, b)
440#define ACPI_FUNCTION_EXIT
441#define ACPI_FUNCTION_STATUS_EXIT(s)
442#define ACPI_FUNCTION_VALUE_EXIT(s)
443#define ACPI_FUNCTION_ENTRY() 440#define ACPI_FUNCTION_ENTRY()
444#define ACPI_DUMP_STACK_ENTRY(a) 441#define ACPI_DUMP_STACK_ENTRY(a)
445#define ACPI_DUMP_OPERANDS(a, b, c) 442#define ACPI_DUMP_OPERANDS(a, b, c)
446#define ACPI_DUMP_ENTRY(a, b) 443#define ACPI_DUMP_ENTRY(a, b)
447#define ACPI_DUMP_TABLES(a, b)
448#define ACPI_DUMP_PATHNAME(a, b, c, d) 444#define ACPI_DUMP_PATHNAME(a, b, c, d)
449#define ACPI_DUMP_BUFFER(a, b) 445#define ACPI_DUMP_BUFFER(a, b)
450#define ACPI_DEBUG_PRINT(pl)
451#define ACPI_DEBUG_PRINT_RAW(pl)
452#define ACPI_IS_DEBUG_ENABLED(level, component) 0 446#define ACPI_IS_DEBUG_ENABLED(level, component) 0
453 447
454/* Return macros must have a return statement at the minimum */ 448/* Return macros must have a return statement at the minimum */
diff --git a/include/acpi/acpi_bus.h b/include/acpi/acpi_bus.h
index af0f840f77c8..56e6b68c8d2f 100644
--- a/include/acpi/acpi_bus.h
+++ b/include/acpi/acpi_bus.h
@@ -63,13 +63,6 @@ acpi_get_physical_device_location(acpi_handle handle, struct acpi_pld_info **pld
63#define ACPI_BUS_FILE_ROOT "acpi" 63#define ACPI_BUS_FILE_ROOT "acpi"
64extern struct proc_dir_entry *acpi_root_dir; 64extern struct proc_dir_entry *acpi_root_dir;
65 65
66enum acpi_bus_removal_type {
67 ACPI_BUS_REMOVAL_NORMAL = 0,
68 ACPI_BUS_REMOVAL_EJECT,
69 ACPI_BUS_REMOVAL_SUPRISE,
70 ACPI_BUS_REMOVAL_TYPE_COUNT
71};
72
73enum acpi_bus_device_type { 66enum acpi_bus_device_type {
74 ACPI_BUS_TYPE_DEVICE = 0, 67 ACPI_BUS_TYPE_DEVICE = 0,
75 ACPI_BUS_TYPE_POWER, 68 ACPI_BUS_TYPE_POWER,
@@ -163,12 +156,10 @@ struct acpi_device_flags {
163 u32 dynamic_status:1; 156 u32 dynamic_status:1;
164 u32 removable:1; 157 u32 removable:1;
165 u32 ejectable:1; 158 u32 ejectable:1;
166 u32 suprise_removal_ok:1;
167 u32 power_manageable:1; 159 u32 power_manageable:1;
168 u32 performance_manageable:1;
169 u32 eject_pending:1; 160 u32 eject_pending:1;
170 u32 match_driver:1; 161 u32 match_driver:1;
171 u32 reserved:24; 162 u32 reserved:26;
172}; 163};
173 164
174/* File System */ 165/* File System */
@@ -286,6 +277,7 @@ struct acpi_device_physical_node {
286 u8 node_id; 277 u8 node_id;
287 struct list_head node; 278 struct list_head node;
288 struct device *dev; 279 struct device *dev;
280 bool put_online:1;
289}; 281};
290 282
291/* set maximum of physical nodes to 32 for expansibility */ 283/* set maximum of physical nodes to 32 for expansibility */
@@ -310,7 +302,6 @@ struct acpi_device {
310 struct acpi_driver *driver; 302 struct acpi_driver *driver;
311 void *driver_data; 303 void *driver_data;
312 struct device dev; 304 struct device dev;
313 enum acpi_bus_removal_type removal_type; /* indicate for different removal type */
314 u8 physical_node_count; 305 u8 physical_node_count;
315 struct list_head physical_node_list; 306 struct list_head physical_node_list;
316 struct mutex physical_node_lock; 307 struct mutex physical_node_lock;
@@ -377,49 +368,20 @@ acpi_status acpi_bus_get_status_handle(acpi_handle handle,
377 unsigned long long *sta); 368 unsigned long long *sta);
378int acpi_bus_get_status(struct acpi_device *device); 369int acpi_bus_get_status(struct acpi_device *device);
379 370
380#ifdef CONFIG_PM
381int acpi_bus_set_power(acpi_handle handle, int state); 371int acpi_bus_set_power(acpi_handle handle, int state);
382const char *acpi_power_state_string(int state); 372const char *acpi_power_state_string(int state);
383int acpi_device_get_power(struct acpi_device *device, int *state); 373int acpi_device_get_power(struct acpi_device *device, int *state);
384int acpi_device_set_power(struct acpi_device *device, int state); 374int acpi_device_set_power(struct acpi_device *device, int state);
385int acpi_bus_init_power(struct acpi_device *device); 375int acpi_bus_init_power(struct acpi_device *device);
376int acpi_device_fix_up_power(struct acpi_device *device);
386int acpi_bus_update_power(acpi_handle handle, int *state_p); 377int acpi_bus_update_power(acpi_handle handle, int *state_p);
387bool acpi_bus_power_manageable(acpi_handle handle); 378bool acpi_bus_power_manageable(acpi_handle handle);
379
380#ifdef CONFIG_PM
388bool acpi_bus_can_wakeup(acpi_handle handle); 381bool acpi_bus_can_wakeup(acpi_handle handle);
389#else /* !CONFIG_PM */ 382#else
390static inline int acpi_bus_set_power(acpi_handle handle, int state) 383static inline bool acpi_bus_can_wakeup(acpi_handle handle) { return false; }
391{ 384#endif
392 return 0;
393}
394static inline const char *acpi_power_state_string(int state)
395{
396 return "D0";
397}
398static inline int acpi_device_get_power(struct acpi_device *device, int *state)
399{
400 return 0;
401}
402static inline int acpi_device_set_power(struct acpi_device *device, int state)
403{
404 return 0;
405}
406static inline int acpi_bus_init_power(struct acpi_device *device)
407{
408 return 0;
409}
410static inline int acpi_bus_update_power(acpi_handle handle, int *state_p)
411{
412 return 0;
413}
414static inline bool acpi_bus_power_manageable(acpi_handle handle)
415{
416 return false;
417}
418static inline bool acpi_bus_can_wakeup(acpi_handle handle)
419{
420 return false;
421}
422#endif /* !CONFIG_PM */
423 385
424#ifdef CONFIG_ACPI_PROC_EVENT 386#ifdef CONFIG_ACPI_PROC_EVENT
425int acpi_bus_generate_proc_event(struct acpi_device *device, u8 type, int data); 387int acpi_bus_generate_proc_event(struct acpi_device *device, u8 type, int data);
@@ -496,8 +458,6 @@ acpi_status acpi_add_pm_notifier(struct acpi_device *adev,
496 acpi_notify_handler handler, void *context); 458 acpi_notify_handler handler, void *context);
497acpi_status acpi_remove_pm_notifier(struct acpi_device *adev, 459acpi_status acpi_remove_pm_notifier(struct acpi_device *adev,
498 acpi_notify_handler handler); 460 acpi_notify_handler handler);
499int acpi_device_power_state(struct device *dev, struct acpi_device *adev,
500 u32 target_state, int d_max_in, int *d_min_p);
501int acpi_pm_device_sleep_state(struct device *, int *, int); 461int acpi_pm_device_sleep_state(struct device *, int *, int);
502void acpi_dev_pm_add_dependent(acpi_handle handle, struct device *depdev); 462void acpi_dev_pm_add_dependent(acpi_handle handle, struct device *depdev);
503void acpi_dev_pm_remove_dependent(acpi_handle handle, struct device *depdev); 463void acpi_dev_pm_remove_dependent(acpi_handle handle, struct device *depdev);
@@ -513,23 +473,13 @@ static inline acpi_status acpi_remove_pm_notifier(struct acpi_device *adev,
513{ 473{
514 return AE_SUPPORT; 474 return AE_SUPPORT;
515} 475}
516static inline int __acpi_device_power_state(int m, int *p) 476static inline int acpi_pm_device_sleep_state(struct device *d, int *p, int m)
517{ 477{
518 if (p) 478 if (p)
519 *p = ACPI_STATE_D0; 479 *p = ACPI_STATE_D0;
480
520 return (m >= ACPI_STATE_D0 && m <= ACPI_STATE_D3) ? m : ACPI_STATE_D0; 481 return (m >= ACPI_STATE_D0 && m <= ACPI_STATE_D3) ? m : ACPI_STATE_D0;
521} 482}
522static inline int acpi_device_power_state(struct device *dev,
523 struct acpi_device *adev,
524 u32 target_state, int d_max_in,
525 int *d_min_p)
526{
527 return __acpi_device_power_state(d_max_in, d_min_p);
528}
529static inline int acpi_pm_device_sleep_state(struct device *d, int *p, int m)
530{
531 return __acpi_device_power_state(m, p);
532}
533static inline void acpi_dev_pm_add_dependent(acpi_handle handle, 483static inline void acpi_dev_pm_add_dependent(acpi_handle handle,
534 struct device *depdev) {} 484 struct device *depdev) {}
535static inline void acpi_dev_pm_remove_dependent(acpi_handle handle, 485static inline void acpi_dev_pm_remove_dependent(acpi_handle handle,
diff --git a/include/acpi/acpi_drivers.h b/include/acpi/acpi_drivers.h
index e6168a24b9f0..b420939f5eb5 100644
--- a/include/acpi/acpi_drivers.h
+++ b/include/acpi/acpi_drivers.h
@@ -123,7 +123,9 @@ extern int register_dock_notifier(struct notifier_block *nb);
123extern void unregister_dock_notifier(struct notifier_block *nb); 123extern void unregister_dock_notifier(struct notifier_block *nb);
124extern int register_hotplug_dock_device(acpi_handle handle, 124extern int register_hotplug_dock_device(acpi_handle handle,
125 const struct acpi_dock_ops *ops, 125 const struct acpi_dock_ops *ops,
126 void *context); 126 void *context,
127 void (*init)(void *),
128 void (*release)(void *));
127extern void unregister_hotplug_dock_device(acpi_handle handle); 129extern void unregister_hotplug_dock_device(acpi_handle handle);
128#else 130#else
129static inline int is_dock_device(acpi_handle handle) 131static inline int is_dock_device(acpi_handle handle)
@@ -139,7 +141,9 @@ static inline void unregister_dock_notifier(struct notifier_block *nb)
139} 141}
140static inline int register_hotplug_dock_device(acpi_handle handle, 142static inline int register_hotplug_dock_device(acpi_handle handle,
141 const struct acpi_dock_ops *ops, 143 const struct acpi_dock_ops *ops,
142 void *context) 144 void *context,
145 void (*init)(void *),
146 void (*release)(void *))
143{ 147{
144 return -ENODEV; 148 return -ENODEV;
145} 149}
diff --git a/include/acpi/acpiosxf.h b/include/acpi/acpiosxf.h
index 5b3d2bd4813a..64b8c7639520 100644
--- a/include/acpi/acpiosxf.h
+++ b/include/acpi/acpiosxf.h
@@ -77,7 +77,7 @@ struct acpi_signal_fatal_info {
77/* 77/*
78 * OSL Initialization and shutdown primitives 78 * OSL Initialization and shutdown primitives
79 */ 79 */
80acpi_status __initdata acpi_os_initialize(void); 80acpi_status __init acpi_os_initialize(void);
81 81
82acpi_status acpi_os_terminate(void); 82acpi_status acpi_os_terminate(void);
83 83
diff --git a/include/acpi/acpixf.h b/include/acpi/acpixf.h
index 454881e6450a..1b09300810e6 100644
--- a/include/acpi/acpixf.h
+++ b/include/acpi/acpixf.h
@@ -46,7 +46,7 @@
46 46
47/* Current ACPICA subsystem version in YYYYMMDD format */ 47/* Current ACPICA subsystem version in YYYYMMDD format */
48 48
49#define ACPI_CA_VERSION 0x20130328 49#define ACPI_CA_VERSION 0x20130517
50 50
51#include <acpi/acconfig.h> 51#include <acpi/acconfig.h>
52#include <acpi/actypes.h> 52#include <acpi/actypes.h>
@@ -80,6 +80,7 @@ extern bool acpi_gbl_enable_aml_debug_object;
80extern u8 acpi_gbl_copy_dsdt_locally; 80extern u8 acpi_gbl_copy_dsdt_locally;
81extern u8 acpi_gbl_truncate_io_addresses; 81extern u8 acpi_gbl_truncate_io_addresses;
82extern u8 acpi_gbl_disable_auto_repair; 82extern u8 acpi_gbl_disable_auto_repair;
83extern u8 acpi_gbl_disable_ssdt_table_load;
83 84
84/* 85/*
85 * Hardware-reduced prototypes. All interfaces that use these macros will 86 * Hardware-reduced prototypes. All interfaces that use these macros will
diff --git a/include/acpi/processor.h b/include/acpi/processor.h
index b327b5a9296d..66096d06925e 100644
--- a/include/acpi/processor.h
+++ b/include/acpi/processor.h
@@ -6,6 +6,10 @@
6#include <linux/thermal.h> 6#include <linux/thermal.h>
7#include <asm/acpi.h> 7#include <asm/acpi.h>
8 8
9#define ACPI_PROCESSOR_CLASS "processor"
10#define ACPI_PROCESSOR_DEVICE_NAME "Processor"
11#define ACPI_PROCESSOR_DEVICE_HID "ACPI0007"
12
9#define ACPI_PROCESSOR_BUSY_METRIC 10 13#define ACPI_PROCESSOR_BUSY_METRIC 10
10 14
11#define ACPI_PROCESSOR_MAX_POWER 8 15#define ACPI_PROCESSOR_MAX_POWER 8
@@ -207,6 +211,7 @@ struct acpi_processor {
207 struct acpi_processor_throttling throttling; 211 struct acpi_processor_throttling throttling;
208 struct acpi_processor_limit limit; 212 struct acpi_processor_limit limit;
209 struct thermal_cooling_device *cdev; 213 struct thermal_cooling_device *cdev;
214 struct device *dev; /* Processor device. */
210}; 215};
211 216
212struct acpi_processor_errata { 217struct acpi_processor_errata {
@@ -329,10 +334,16 @@ int acpi_processor_power_init(struct acpi_processor *pr);
329int acpi_processor_power_exit(struct acpi_processor *pr); 334int acpi_processor_power_exit(struct acpi_processor *pr);
330int acpi_processor_cst_has_changed(struct acpi_processor *pr); 335int acpi_processor_cst_has_changed(struct acpi_processor *pr);
331int acpi_processor_hotplug(struct acpi_processor *pr); 336int acpi_processor_hotplug(struct acpi_processor *pr);
332int acpi_processor_suspend(struct device *dev);
333int acpi_processor_resume(struct device *dev);
334extern struct cpuidle_driver acpi_idle_driver; 337extern struct cpuidle_driver acpi_idle_driver;
335 338
339#ifdef CONFIG_PM_SLEEP
340void acpi_processor_syscore_init(void);
341void acpi_processor_syscore_exit(void);
342#else
343static inline void acpi_processor_syscore_init(void) {}
344static inline void acpi_processor_syscore_exit(void) {}
345#endif
346
336/* in processor_thermal.c */ 347/* in processor_thermal.c */
337int acpi_processor_get_limit_info(struct acpi_processor *pr); 348int acpi_processor_get_limit_info(struct acpi_processor *pr);
338extern const struct thermal_cooling_device_ops processor_cooling_ops; 349extern const struct thermal_cooling_device_ops processor_cooling_ops;