aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
Diffstat (limited to 'include')
-rw-r--r--include/acpi/acbuffer.h2
-rw-r--r--include/acpi/acconfig.h2
-rw-r--r--include/acpi/acexcep.h2
-rw-r--r--include/acpi/acnames.h2
-rw-r--r--include/acpi/acoutput.h2
-rw-r--r--include/acpi/acpi.h5
-rw-r--r--include/acpi/acpi_bus.h49
-rw-r--r--include/acpi/acpi_drivers.h26
-rw-r--r--include/acpi/acpiosxf.h2
-rw-r--r--include/acpi/acpixf.h8
-rw-r--r--include/acpi/acrestyp.h2
-rw-r--r--include/acpi/actbl.h2
-rw-r--r--include/acpi/actbl1.h2
-rw-r--r--include/acpi/actbl2.h2
-rw-r--r--include/acpi/actbl3.h2
-rw-r--r--include/acpi/actypes.h66
-rw-r--r--include/acpi/platform/acenv.h2
-rw-r--r--include/acpi/platform/acgcc.h2
-rw-r--r--include/acpi/platform/aclinux.h20
-rw-r--r--include/linux/acpi.h4
-rw-r--r--include/linux/cpufreq.h25
-rw-r--r--include/linux/pci-acpi.h4
-rw-r--r--include/linux/pm.h71
-rw-r--r--include/linux/pm_qos.h34
-rw-r--r--include/linux/pm_runtime.h4
-rw-r--r--include/linux/video_output.h57
-rw-r--r--include/trace/events/power.h4
27 files changed, 212 insertions, 191 deletions
diff --git a/include/acpi/acbuffer.h b/include/acpi/acbuffer.h
index c927a0b1de78..88cb477524a6 100644
--- a/include/acpi/acbuffer.h
+++ b/include/acpi/acbuffer.h
@@ -5,7 +5,7 @@
5 *****************************************************************************/ 5 *****************************************************************************/
6 6
7/* 7/*
8 * Copyright (C) 2000 - 2013, Intel Corp. 8 * Copyright (C) 2000 - 2014, Intel Corp.
9 * All rights reserved. 9 * All rights reserved.
10 * 10 *
11 * Redistribution and use in source and binary forms, with or without 11 * Redistribution and use in source and binary forms, with or without
diff --git a/include/acpi/acconfig.h b/include/acpi/acconfig.h
index 3ea214cff349..932a60d6ed82 100644
--- a/include/acpi/acconfig.h
+++ b/include/acpi/acconfig.h
@@ -5,7 +5,7 @@
5 *****************************************************************************/ 5 *****************************************************************************/
6 6
7/* 7/*
8 * Copyright (C) 2000 - 2013, Intel Corp. 8 * Copyright (C) 2000 - 2014, Intel Corp.
9 * All rights reserved. 9 * All rights reserved.
10 * 10 *
11 * Redistribution and use in source and binary forms, with or without 11 * Redistribution and use in source and binary forms, with or without
diff --git a/include/acpi/acexcep.h b/include/acpi/acexcep.h
index 4e280bd226dd..8b06e4c1dd5d 100644
--- a/include/acpi/acexcep.h
+++ b/include/acpi/acexcep.h
@@ -5,7 +5,7 @@
5 *****************************************************************************/ 5 *****************************************************************************/
6 6
7/* 7/*
8 * Copyright (C) 2000 - 2013, Intel Corp. 8 * Copyright (C) 2000 - 2014, Intel Corp.
9 * All rights reserved. 9 * All rights reserved.
10 * 10 *
11 * Redistribution and use in source and binary forms, with or without 11 * Redistribution and use in source and binary forms, with or without
diff --git a/include/acpi/acnames.h b/include/acpi/acnames.h
index 1f36777e26fe..3dd6e838dc30 100644
--- a/include/acpi/acnames.h
+++ b/include/acpi/acnames.h
@@ -5,7 +5,7 @@
5 *****************************************************************************/ 5 *****************************************************************************/
6 6
7/* 7/*
8 * Copyright (C) 2000 - 2013, Intel Corp. 8 * Copyright (C) 2000 - 2014, Intel Corp.
9 * All rights reserved. 9 * All rights reserved.
10 * 10 *
11 * Redistribution and use in source and binary forms, with or without 11 * Redistribution and use in source and binary forms, with or without
diff --git a/include/acpi/acoutput.h b/include/acpi/acoutput.h
index 4607b027a657..1baae6edda89 100644
--- a/include/acpi/acoutput.h
+++ b/include/acpi/acoutput.h
@@ -5,7 +5,7 @@
5 *****************************************************************************/ 5 *****************************************************************************/
6 6
7/* 7/*
8 * Copyright (C) 2000 - 2013, Intel Corp. 8 * Copyright (C) 2000 - 2014, Intel Corp.
9 * All rights reserved. 9 * All rights reserved.
10 * 10 *
11 * Redistribution and use in source and binary forms, with or without 11 * Redistribution and use in source and binary forms, with or without
diff --git a/include/acpi/acpi.h b/include/acpi/acpi.h
index 618787715d56..ca0cb603b171 100644
--- a/include/acpi/acpi.h
+++ b/include/acpi/acpi.h
@@ -5,7 +5,7 @@
5 *****************************************************************************/ 5 *****************************************************************************/
6 6
7/* 7/*
8 * Copyright (C) 2000 - 2013, Intel Corp. 8 * Copyright (C) 2000 - 2014, Intel Corp.
9 * All rights reserved. 9 * All rights reserved.
10 * 10 *
11 * Redistribution and use in source and binary forms, with or without 11 * Redistribution and use in source and binary forms, with or without
@@ -62,5 +62,8 @@
62#include <acpi/acrestyp.h> /* Resource Descriptor structs */ 62#include <acpi/acrestyp.h> /* Resource Descriptor structs */
63#include <acpi/acpiosxf.h> /* OSL interfaces (ACPICA-to-OS) */ 63#include <acpi/acpiosxf.h> /* OSL interfaces (ACPICA-to-OS) */
64#include <acpi/acpixf.h> /* ACPI core subsystem external interfaces */ 64#include <acpi/acpixf.h> /* ACPI core subsystem external interfaces */
65#ifdef ACPI_NATIVE_INTERFACE_HEADER
66#include ACPI_NATIVE_INTERFACE_HEADER
67#endif
65 68
66#endif /* __ACPI_H__ */ 69#endif /* __ACPI_H__ */
diff --git a/include/acpi/acpi_bus.h b/include/acpi/acpi_bus.h
index 8256eb4ad057..84a2e29a2314 100644
--- a/include/acpi/acpi_bus.h
+++ b/include/acpi/acpi_bus.h
@@ -49,8 +49,8 @@ acpi_evaluate_reference(acpi_handle handle,
49 struct acpi_object_list *arguments, 49 struct acpi_object_list *arguments,
50 struct acpi_handle_list *list); 50 struct acpi_handle_list *list);
51acpi_status 51acpi_status
52acpi_evaluate_hotplug_ost(acpi_handle handle, u32 source_event, 52acpi_evaluate_ost(acpi_handle handle, u32 source_event, u32 status_code,
53 u32 status_code, struct acpi_buffer *status_buf); 53 struct acpi_buffer *status_buf);
54 54
55acpi_status 55acpi_status
56acpi_get_physical_device_location(acpi_handle handle, struct acpi_pld_info **pld); 56acpi_get_physical_device_location(acpi_handle handle, struct acpi_pld_info **pld);
@@ -133,10 +133,24 @@ struct acpi_scan_handler {
133 struct list_head list_node; 133 struct list_head list_node;
134 int (*attach)(struct acpi_device *dev, const struct acpi_device_id *id); 134 int (*attach)(struct acpi_device *dev, const struct acpi_device_id *id);
135 void (*detach)(struct acpi_device *dev); 135 void (*detach)(struct acpi_device *dev);
136 void (*bind)(struct device *phys_dev);
137 void (*unbind)(struct device *phys_dev);
136 struct acpi_hotplug_profile hotplug; 138 struct acpi_hotplug_profile hotplug;
137}; 139};
138 140
139/* 141/*
142 * ACPI Hotplug Context
143 * --------------------
144 */
145
146struct acpi_hotplug_context {
147 struct acpi_device *self;
148 int (*notify)(struct acpi_device *, u32);
149 void (*uevent)(struct acpi_device *, u32);
150 void (*fixup)(struct acpi_device *);
151};
152
153/*
140 * ACPI Driver 154 * ACPI Driver
141 * ----------- 155 * -----------
142 */ 156 */
@@ -190,7 +204,9 @@ struct acpi_device_flags {
190 u32 initialized:1; 204 u32 initialized:1;
191 u32 visited:1; 205 u32 visited:1;
192 u32 no_hotplug:1; 206 u32 no_hotplug:1;
193 u32 reserved:24; 207 u32 hotplug_notify:1;
208 u32 is_dock_station:1;
209 u32 reserved:22;
194}; 210};
195 211
196/* File System */ 212/* File System */
@@ -329,6 +345,7 @@ struct acpi_device {
329 struct acpi_device_perf performance; 345 struct acpi_device_perf performance;
330 struct acpi_device_dir dir; 346 struct acpi_device_dir dir;
331 struct acpi_scan_handler *handler; 347 struct acpi_scan_handler *handler;
348 struct acpi_hotplug_context *hp;
332 struct acpi_driver *driver; 349 struct acpi_driver *driver;
333 void *driver_data; 350 void *driver_data;
334 struct device dev; 351 struct device dev;
@@ -351,6 +368,24 @@ static inline void acpi_set_device_status(struct acpi_device *adev, u32 sta)
351 *((u32 *)&adev->status) = sta; 368 *((u32 *)&adev->status) = sta;
352} 369}
353 370
371static inline void acpi_set_hp_context(struct acpi_device *adev,
372 struct acpi_hotplug_context *hp,
373 int (*notify)(struct acpi_device *, u32),
374 void (*uevent)(struct acpi_device *, u32),
375 void (*fixup)(struct acpi_device *))
376{
377 hp->self = adev;
378 hp->notify = notify;
379 hp->uevent = uevent;
380 hp->fixup = fixup;
381 adev->hp = hp;
382}
383
384void acpi_initialize_hp_context(struct acpi_device *adev,
385 struct acpi_hotplug_context *hp,
386 int (*notify)(struct acpi_device *, u32),
387 void (*uevent)(struct acpi_device *, u32));
388
354/* acpi_device.dev.bus == &acpi_bus_type */ 389/* acpi_device.dev.bus == &acpi_bus_type */
355extern struct bus_type acpi_bus_type; 390extern struct bus_type acpi_bus_type;
356 391
@@ -381,6 +416,8 @@ extern int unregister_acpi_notifier(struct notifier_block *);
381 */ 416 */
382 417
383int acpi_bus_get_device(acpi_handle handle, struct acpi_device **device); 418int acpi_bus_get_device(acpi_handle handle, struct acpi_device **device);
419struct acpi_device *acpi_bus_get_acpi_device(acpi_handle handle);
420void acpi_bus_put_acpi_device(struct acpi_device *adev);
384acpi_status acpi_bus_get_status_handle(acpi_handle handle, 421acpi_status acpi_bus_get_status_handle(acpi_handle handle,
385 unsigned long long *sta); 422 unsigned long long *sta);
386int acpi_bus_get_status(struct acpi_device *device); 423int acpi_bus_get_status(struct acpi_device *device);
@@ -402,6 +439,8 @@ static inline bool acpi_bus_can_wakeup(acpi_handle handle) { return false; }
402 439
403void acpi_scan_lock_acquire(void); 440void acpi_scan_lock_acquire(void);
404void acpi_scan_lock_release(void); 441void acpi_scan_lock_release(void);
442void acpi_lock_hp_context(void);
443void acpi_unlock_hp_context(void);
405int acpi_scan_add_handler(struct acpi_scan_handler *handler); 444int acpi_scan_add_handler(struct acpi_scan_handler *handler);
406int acpi_bus_register_driver(struct acpi_driver *driver); 445int acpi_bus_register_driver(struct acpi_driver *driver);
407void acpi_bus_unregister_driver(struct acpi_driver *driver); 446void acpi_bus_unregister_driver(struct acpi_driver *driver);
@@ -418,10 +457,6 @@ static inline bool acpi_device_enumerated(struct acpi_device *adev)
418 return adev && adev->flags.initialized && adev->flags.visited; 457 return adev && adev->flags.initialized && adev->flags.visited;
419} 458}
420 459
421typedef void (*acpi_hp_callback)(void *data, u32 src);
422
423acpi_status acpi_hotplug_execute(acpi_hp_callback func, void *data, u32 src);
424
425/** 460/**
426 * module_acpi_driver(acpi_driver) - Helper macro for registering an ACPI driver 461 * module_acpi_driver(acpi_driver) - Helper macro for registering an ACPI driver
427 * @__acpi_driver: acpi_driver struct 462 * @__acpi_driver: acpi_driver struct
diff --git a/include/acpi/acpi_drivers.h b/include/acpi/acpi_drivers.h
index b124fdb26046..d504613bbf80 100644
--- a/include/acpi/acpi_drivers.h
+++ b/include/acpi/acpi_drivers.h
@@ -109,36 +109,14 @@ void pci_acpi_crs_quirks(void);
109/*-------------------------------------------------------------------------- 109/*--------------------------------------------------------------------------
110 Dock Station 110 Dock Station
111 -------------------------------------------------------------------------- */ 111 -------------------------------------------------------------------------- */
112struct acpi_dock_ops {
113 acpi_notify_handler fixup;
114 acpi_notify_handler handler;
115 acpi_notify_handler uevent;
116};
117 112
118#ifdef CONFIG_ACPI_DOCK 113#ifdef CONFIG_ACPI_DOCK
119extern int is_dock_device(acpi_handle handle); 114extern int is_dock_device(struct acpi_device *adev);
120extern int register_hotplug_dock_device(acpi_handle handle,
121 const struct acpi_dock_ops *ops,
122 void *context,
123 void (*init)(void *),
124 void (*release)(void *));
125extern void unregister_hotplug_dock_device(acpi_handle handle);
126#else 115#else
127static inline int is_dock_device(acpi_handle handle) 116static inline int is_dock_device(struct acpi_device *adev)
128{ 117{
129 return 0; 118 return 0;
130} 119}
131static inline int register_hotplug_dock_device(acpi_handle handle,
132 const struct acpi_dock_ops *ops,
133 void *context,
134 void (*init)(void *),
135 void (*release)(void *))
136{
137 return -ENODEV;
138}
139static inline void unregister_hotplug_dock_device(acpi_handle handle)
140{
141}
142#endif /* CONFIG_ACPI_DOCK */ 120#endif /* CONFIG_ACPI_DOCK */
143 121
144#endif /*__ACPI_DRIVERS_H__*/ 122#endif /*__ACPI_DRIVERS_H__*/
diff --git a/include/acpi/acpiosxf.h b/include/acpi/acpiosxf.h
index 01e6c6d8b7e1..f6f5f8af2112 100644
--- a/include/acpi/acpiosxf.h
+++ b/include/acpi/acpiosxf.h
@@ -7,7 +7,7 @@
7 *****************************************************************************/ 7 *****************************************************************************/
8 8
9/* 9/*
10 * Copyright (C) 2000 - 2013, Intel Corp. 10 * Copyright (C) 2000 - 2014, Intel Corp.
11 * All rights reserved. 11 * All rights reserved.
12 * 12 *
13 * Redistribution and use in source and binary forms, with or without 13 * Redistribution and use in source and binary forms, with or without
diff --git a/include/acpi/acpixf.h b/include/acpi/acpixf.h
index fea6773f87fc..b0b01b13ea99 100644
--- a/include/acpi/acpixf.h
+++ b/include/acpi/acpixf.h
@@ -5,7 +5,7 @@
5 *****************************************************************************/ 5 *****************************************************************************/
6 6
7/* 7/*
8 * Copyright (C) 2000 - 2013, Intel Corp. 8 * Copyright (C) 2000 - 2014, Intel Corp.
9 * All rights reserved. 9 * All rights reserved.
10 * 10 *
11 * Redistribution and use in source and binary forms, with or without 11 * Redistribution and use in source and binary forms, with or without
@@ -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 0x20131218 49#define ACPI_CA_VERSION 0x20140214
50 50
51#include <acpi/acconfig.h> 51#include <acpi/acconfig.h>
52#include <acpi/actypes.h> 52#include <acpi/actypes.h>
@@ -230,6 +230,10 @@ acpi_attach_data(acpi_handle object, acpi_object_handler handler, void *data);
230acpi_status acpi_detach_data(acpi_handle object, acpi_object_handler handler); 230acpi_status acpi_detach_data(acpi_handle object, acpi_object_handler handler);
231 231
232acpi_status 232acpi_status
233acpi_get_data_full(acpi_handle object, acpi_object_handler handler, void **data,
234 void (*callback)(void *));
235
236acpi_status
233acpi_get_data(acpi_handle object, acpi_object_handler handler, void **data); 237acpi_get_data(acpi_handle object, acpi_object_handler handler, void **data);
234 238
235acpi_status 239acpi_status
diff --git a/include/acpi/acrestyp.h b/include/acpi/acrestyp.h
index cbf4bf977f75..eb760ca0b2e0 100644
--- a/include/acpi/acrestyp.h
+++ b/include/acpi/acrestyp.h
@@ -5,7 +5,7 @@
5 *****************************************************************************/ 5 *****************************************************************************/
6 6
7/* 7/*
8 * Copyright (C) 2000 - 2013, Intel Corp. 8 * Copyright (C) 2000 - 2014, Intel Corp.
9 * All rights reserved. 9 * All rights reserved.
10 * 10 *
11 * Redistribution and use in source and binary forms, with or without 11 * Redistribution and use in source and binary forms, with or without
diff --git a/include/acpi/actbl.h b/include/acpi/actbl.h
index 325aeae1fa99..3b30e36b53b5 100644
--- a/include/acpi/actbl.h
+++ b/include/acpi/actbl.h
@@ -5,7 +5,7 @@
5 *****************************************************************************/ 5 *****************************************************************************/
6 6
7/* 7/*
8 * Copyright (C) 2000 - 2013, Intel Corp. 8 * Copyright (C) 2000 - 2014, Intel Corp.
9 * All rights reserved. 9 * All rights reserved.
10 * 10 *
11 * Redistribution and use in source and binary forms, with or without 11 * Redistribution and use in source and binary forms, with or without
diff --git a/include/acpi/actbl1.h b/include/acpi/actbl1.h
index 4ec8c194bfe5..212c65de75df 100644
--- a/include/acpi/actbl1.h
+++ b/include/acpi/actbl1.h
@@ -5,7 +5,7 @@
5 *****************************************************************************/ 5 *****************************************************************************/
6 6
7/* 7/*
8 * Copyright (C) 2000 - 2013, Intel Corp. 8 * Copyright (C) 2000 - 2014, Intel Corp.
9 * All rights reserved. 9 * All rights reserved.
10 * 10 *
11 * Redistribution and use in source and binary forms, with or without 11 * Redistribution and use in source and binary forms, with or without
diff --git a/include/acpi/actbl2.h b/include/acpi/actbl2.h
index 094a906a0e98..f3372441e3a5 100644
--- a/include/acpi/actbl2.h
+++ b/include/acpi/actbl2.h
@@ -5,7 +5,7 @@
5 *****************************************************************************/ 5 *****************************************************************************/
6 6
7/* 7/*
8 * Copyright (C) 2000 - 2013, Intel Corp. 8 * Copyright (C) 2000 - 2014, Intel Corp.
9 * All rights reserved. 9 * All rights reserved.
10 * 10 *
11 * Redistribution and use in source and binary forms, with or without 11 * Redistribution and use in source and binary forms, with or without
diff --git a/include/acpi/actbl3.h b/include/acpi/actbl3.h
index 01c2a9013e40..c2295cc4a5c0 100644
--- a/include/acpi/actbl3.h
+++ b/include/acpi/actbl3.h
@@ -5,7 +5,7 @@
5 *****************************************************************************/ 5 *****************************************************************************/
6 6
7/* 7/*
8 * Copyright (C) 2000 - 2013, Intel Corp. 8 * Copyright (C) 2000 - 2014, Intel Corp.
9 * All rights reserved. 9 * All rights reserved.
10 * 10 *
11 * Redistribution and use in source and binary forms, with or without 11 * Redistribution and use in source and binary forms, with or without
diff --git a/include/acpi/actypes.h b/include/acpi/actypes.h
index 68a3ada689c9..e76356574374 100644
--- a/include/acpi/actypes.h
+++ b/include/acpi/actypes.h
@@ -5,7 +5,7 @@
5 *****************************************************************************/ 5 *****************************************************************************/
6 6
7/* 7/*
8 * Copyright (C) 2000 - 2013, Intel Corp. 8 * Copyright (C) 2000 - 2014, Intel Corp.
9 * All rights reserved. 9 * All rights reserved.
10 * 10 *
11 * Redistribution and use in source and binary forms, with or without 11 * Redistribution and use in source and binary forms, with or without
@@ -55,18 +55,16 @@
55#error ACPI_MACHINE_WIDTH not defined 55#error ACPI_MACHINE_WIDTH not defined
56#endif 56#endif
57 57
58/*! [Begin] no source code translation */
59
60/* 58/*
61 * Data type ranges 59 * Data type ranges
62 * Note: These macros are designed to be compiler independent as well as 60 * Note: These macros are designed to be compiler independent as well as
63 * working around problems that some 32-bit compilers have with 64-bit 61 * working around problems that some 32-bit compilers have with 64-bit
64 * constants. 62 * constants.
65 */ 63 */
66#define ACPI_UINT8_MAX (UINT8) (~((UINT8) 0)) /* 0xFF */ 64#define ACPI_UINT8_MAX (u8) (~((u8) 0)) /* 0xFF */
67#define ACPI_UINT16_MAX (UINT16)(~((UINT16) 0)) /* 0xFFFF */ 65#define ACPI_UINT16_MAX (u16)(~((u16) 0)) /* 0xFFFF */
68#define ACPI_UINT32_MAX (UINT32)(~((UINT32) 0)) /* 0xFFFFFFFF */ 66#define ACPI_UINT32_MAX (u32)(~((u32) 0)) /* 0xFFFFFFFF */
69#define ACPI_UINT64_MAX (UINT64)(~((UINT64) 0)) /* 0xFFFFFFFFFFFFFFFF */ 67#define ACPI_UINT64_MAX (u64)(~((u64) 0)) /* 0xFFFFFFFFFFFFFFFF */
70#define ACPI_ASCII_MAX 0x7F 68#define ACPI_ASCII_MAX 0x7F
71 69
72/* 70/*
@@ -77,18 +75,18 @@
77 * 75 *
78 * 1) The following types are of fixed size for all targets (16/32/64): 76 * 1) The following types are of fixed size for all targets (16/32/64):
79 * 77 *
80 * BOOLEAN Logical boolean 78 * u8 Logical boolean
81 * 79 *
82 * UINT8 8-bit (1 byte) unsigned value 80 * u8 8-bit (1 byte) unsigned value
83 * UINT16 16-bit (2 byte) unsigned value 81 * u16 16-bit (2 byte) unsigned value
84 * UINT32 32-bit (4 byte) unsigned value 82 * u32 32-bit (4 byte) unsigned value
85 * UINT64 64-bit (8 byte) unsigned value 83 * u64 64-bit (8 byte) unsigned value
86 * 84 *
87 * INT16 16-bit (2 byte) signed value 85 * s16 16-bit (2 byte) signed value
88 * INT32 32-bit (4 byte) signed value 86 * s32 32-bit (4 byte) signed value
89 * INT64 64-bit (8 byte) signed value 87 * s64 64-bit (8 byte) signed value
90 * 88 *
91 * COMPILER_DEPENDENT_UINT64/INT64 - These types are defined in the 89 * COMPILER_DEPENDENT_UINT64/s64 - These types are defined in the
92 * compiler-dependent header(s) and were introduced because there is no common 90 * compiler-dependent header(s) and were introduced because there is no common
93 * 64-bit integer type across the various compilation models, as shown in 91 * 64-bit integer type across the various compilation models, as shown in
94 * the table below. 92 * the table below.
@@ -110,11 +108,11 @@
110 * usually used for memory allocation, efficient loop counters, and array 108 * usually used for memory allocation, efficient loop counters, and array
111 * indexes. The types are similar to the size_t type in the C library and are 109 * indexes. The types are similar to the size_t type in the C library and are
112 * required because there is no C type that consistently represents the native 110 * required because there is no C type that consistently represents the native
113 * data width. ACPI_SIZE is needed because there is no guarantee that a 111 * data width. acpi_size is needed because there is no guarantee that a
114 * kernel-level C library is present. 112 * kernel-level C library is present.
115 * 113 *
116 * ACPI_SIZE 16/32/64-bit unsigned value 114 * acpi_size 16/32/64-bit unsigned value
117 * ACPI_NATIVE_INT 16/32/64-bit signed value 115 * acpi_native_int 16/32/64-bit signed value
118 */ 116 */
119 117
120/******************************************************************************* 118/*******************************************************************************
@@ -123,13 +121,15 @@
123 * 121 *
124 ******************************************************************************/ 122 ******************************************************************************/
125 123
126typedef unsigned char BOOLEAN; 124#ifndef ACPI_USE_SYSTEM_INTTYPES
127typedef unsigned char UINT8; 125
128typedef unsigned short UINT16; 126typedef unsigned char u8;
129typedef COMPILER_DEPENDENT_UINT64 UINT64; 127typedef unsigned char u8;
130typedef COMPILER_DEPENDENT_INT64 INT64; 128typedef unsigned short u16;
129typedef COMPILER_DEPENDENT_UINT64 u64;
130typedef COMPILER_DEPENDENT_INT64 s64;
131 131
132/*! [End] no source code translation !*/ 132#endif /* ACPI_USE_SYSTEM_INTTYPES */
133 133
134/* 134/*
135 * Value returned by acpi_os_get_thread_id. There is no standard "thread_id" 135 * Value returned by acpi_os_get_thread_id. There is no standard "thread_id"
@@ -149,12 +149,12 @@ typedef COMPILER_DEPENDENT_INT64 INT64;
149 149
150#if ACPI_MACHINE_WIDTH == 64 150#if ACPI_MACHINE_WIDTH == 64
151 151
152/*! [Begin] no source code translation (keep the typedefs as-is) */ 152#ifndef ACPI_USE_SYSTEM_INTTYPES
153 153
154typedef unsigned int UINT32; 154typedef unsigned int u32;
155typedef int INT32; 155typedef int s32;
156 156
157/*! [End] no source code translation !*/ 157#endif /* ACPI_USE_SYSTEM_INTTYPES */
158 158
159typedef s64 acpi_native_int; 159typedef s64 acpi_native_int;
160 160
@@ -188,12 +188,12 @@ typedef u64 acpi_physical_address;
188 188
189#elif ACPI_MACHINE_WIDTH == 32 189#elif ACPI_MACHINE_WIDTH == 32
190 190
191/*! [Begin] no source code translation (keep the typedefs as-is) */ 191#ifndef ACPI_USE_SYSTEM_INTTYPES
192 192
193typedef unsigned int UINT32; 193typedef unsigned int u32;
194typedef int INT32; 194typedef int s32;
195 195
196/*! [End] no source code translation !*/ 196#endif /* ACPI_USE_SYSTEM_INTTYPES */
197 197
198typedef s32 acpi_native_int; 198typedef s32 acpi_native_int;
199 199
diff --git a/include/acpi/platform/acenv.h b/include/acpi/platform/acenv.h
index b402eb67af83..e863dd5c4e04 100644
--- a/include/acpi/platform/acenv.h
+++ b/include/acpi/platform/acenv.h
@@ -5,7 +5,7 @@
5 *****************************************************************************/ 5 *****************************************************************************/
6 6
7/* 7/*
8 * Copyright (C) 2000 - 2013, Intel Corp. 8 * Copyright (C) 2000 - 2014, Intel Corp.
9 * All rights reserved. 9 * All rights reserved.
10 * 10 *
11 * Redistribution and use in source and binary forms, with or without 11 * Redistribution and use in source and binary forms, with or without
diff --git a/include/acpi/platform/acgcc.h b/include/acpi/platform/acgcc.h
index e077ce6c38ca..a476b9118b49 100644
--- a/include/acpi/platform/acgcc.h
+++ b/include/acpi/platform/acgcc.h
@@ -5,7 +5,7 @@
5 *****************************************************************************/ 5 *****************************************************************************/
6 6
7/* 7/*
8 * Copyright (C) 2000 - 2013, Intel Corp. 8 * Copyright (C) 2000 - 2014, Intel Corp.
9 * All rights reserved. 9 * All rights reserved.
10 * 10 *
11 * Redistribution and use in source and binary forms, with or without 11 * Redistribution and use in source and binary forms, with or without
diff --git a/include/acpi/platform/aclinux.h b/include/acpi/platform/aclinux.h
index 008aa287c7a9..93c55ed7c53d 100644
--- a/include/acpi/platform/aclinux.h
+++ b/include/acpi/platform/aclinux.h
@@ -5,7 +5,7 @@
5 *****************************************************************************/ 5 *****************************************************************************/
6 6
7/* 7/*
8 * Copyright (C) 2000 - 2013, Intel Corp. 8 * Copyright (C) 2000 - 2014, Intel Corp.
9 * All rights reserved. 9 * All rights reserved.
10 * 10 *
11 * Redistribution and use in source and binary forms, with or without 11 * Redistribution and use in source and binary forms, with or without
@@ -52,6 +52,14 @@
52 52
53#ifdef __KERNEL__ 53#ifdef __KERNEL__
54 54
55#define ACPI_USE_SYSTEM_INTTYPES
56
57/* Compile for reduced hardware mode only with this kernel config */
58
59#ifdef CONFIG_ACPI_REDUCED_HARDWARE_ONLY
60#define ACPI_REDUCED_HARDWARE 1
61#endif
62
55#include <linux/string.h> 63#include <linux/string.h>
56#include <linux/kernel.h> 64#include <linux/kernel.h>
57#include <linux/ctype.h> 65#include <linux/ctype.h>
@@ -83,6 +91,16 @@
83#include <ctype.h> 91#include <ctype.h>
84#include <unistd.h> 92#include <unistd.h>
85 93
94/* Disable kernel specific declarators */
95
96#ifndef __init
97#define __init
98#endif
99
100#ifndef __iomem
101#define __iomem
102#endif
103
86/* Host-dependent types and defines for user-space ACPICA */ 104/* Host-dependent types and defines for user-space ACPICA */
87 105
88#define ACPI_FLUSH_CPU_CACHE() 106#define ACPI_FLUSH_CPU_CACHE()
diff --git a/include/linux/acpi.h b/include/linux/acpi.h
index 1151a1dcfe41..6a15dddbaa09 100644
--- a/include/linux/acpi.h
+++ b/include/linux/acpi.h
@@ -108,6 +108,10 @@ static inline void acpi_initrd_override(void *data, size_t size)
108} 108}
109#endif 109#endif
110 110
111#define BAD_MADT_ENTRY(entry, end) ( \
112 (!entry) || (unsigned long)entry + sizeof(*entry) > end || \
113 ((struct acpi_subtable_header *)entry)->length < sizeof(*entry))
114
111char * __acpi_map_table (unsigned long phys_addr, unsigned long size); 115char * __acpi_map_table (unsigned long phys_addr, unsigned long size);
112void __acpi_unmap_table(char *map, unsigned long size); 116void __acpi_unmap_table(char *map, unsigned long size);
113int early_acpi_boot_init(void); 117int early_acpi_boot_init(void);
diff --git a/include/linux/cpufreq.h b/include/linux/cpufreq.h
index 4d89e0e6f9cc..2d2e62c8666a 100644
--- a/include/linux/cpufreq.h
+++ b/include/linux/cpufreq.h
@@ -74,6 +74,8 @@ struct cpufreq_policy {
74 unsigned int max; /* in kHz */ 74 unsigned int max; /* in kHz */
75 unsigned int cur; /* in kHz, only needed if cpufreq 75 unsigned int cur; /* in kHz, only needed if cpufreq
76 * governors are used */ 76 * governors are used */
77 unsigned int suspend_freq; /* freq to set during suspend */
78
77 unsigned int policy; /* see above */ 79 unsigned int policy; /* see above */
78 struct cpufreq_governor *governor; /* see below */ 80 struct cpufreq_governor *governor; /* see below */
79 void *governor_data; 81 void *governor_data;
@@ -83,6 +85,7 @@ struct cpufreq_policy {
83 * called, but you're in IRQ context */ 85 * called, but you're in IRQ context */
84 86
85 struct cpufreq_real_policy user_policy; 87 struct cpufreq_real_policy user_policy;
88 struct cpufreq_frequency_table *freq_table;
86 89
87 struct list_head policy_list; 90 struct list_head policy_list;
88 struct kobject kobj; 91 struct kobject kobj;
@@ -224,6 +227,7 @@ struct cpufreq_driver {
224 int (*bios_limit) (int cpu, unsigned int *limit); 227 int (*bios_limit) (int cpu, unsigned int *limit);
225 228
226 int (*exit) (struct cpufreq_policy *policy); 229 int (*exit) (struct cpufreq_policy *policy);
230 void (*stop_cpu) (struct cpufreq_policy *policy);
227 int (*suspend) (struct cpufreq_policy *policy); 231 int (*suspend) (struct cpufreq_policy *policy);
228 int (*resume) (struct cpufreq_policy *policy); 232 int (*resume) (struct cpufreq_policy *policy);
229 struct freq_attr **attr; 233 struct freq_attr **attr;
@@ -296,6 +300,15 @@ cpufreq_verify_within_cpu_limits(struct cpufreq_policy *policy)
296 policy->cpuinfo.max_freq); 300 policy->cpuinfo.max_freq);
297} 301}
298 302
303#ifdef CONFIG_CPU_FREQ
304void cpufreq_suspend(void);
305void cpufreq_resume(void);
306int cpufreq_generic_suspend(struct cpufreq_policy *policy);
307#else
308static inline void cpufreq_suspend(void) {}
309static inline void cpufreq_resume(void) {}
310#endif
311
299/********************************************************************* 312/*********************************************************************
300 * CPUFREQ NOTIFIER INTERFACE * 313 * CPUFREQ NOTIFIER INTERFACE *
301 *********************************************************************/ 314 *********************************************************************/
@@ -306,8 +319,6 @@ cpufreq_verify_within_cpu_limits(struct cpufreq_policy *policy)
306/* Transition notifiers */ 319/* Transition notifiers */
307#define CPUFREQ_PRECHANGE (0) 320#define CPUFREQ_PRECHANGE (0)
308#define CPUFREQ_POSTCHANGE (1) 321#define CPUFREQ_POSTCHANGE (1)
309#define CPUFREQ_RESUMECHANGE (8)
310#define CPUFREQ_SUSPENDCHANGE (9)
311 322
312/* Policy Notifiers */ 323/* Policy Notifiers */
313#define CPUFREQ_ADJUST (0) 324#define CPUFREQ_ADJUST (0)
@@ -463,7 +474,6 @@ int cpufreq_frequency_table_target(struct cpufreq_policy *policy,
463int cpufreq_frequency_table_get_index(struct cpufreq_policy *policy, 474int cpufreq_frequency_table_get_index(struct cpufreq_policy *policy,
464 unsigned int freq); 475 unsigned int freq);
465 476
466void cpufreq_frequency_table_update_policy_cpu(struct cpufreq_policy *policy);
467ssize_t cpufreq_show_cpus(const struct cpumask *mask, char *buf); 477ssize_t cpufreq_show_cpus(const struct cpumask *mask, char *buf);
468 478
469#ifdef CONFIG_CPU_FREQ 479#ifdef CONFIG_CPU_FREQ
@@ -490,9 +500,6 @@ struct cpufreq_frequency_table *cpufreq_frequency_get_table(unsigned int cpu);
490/* the following are really really optional */ 500/* the following are really really optional */
491extern struct freq_attr cpufreq_freq_attr_scaling_available_freqs; 501extern struct freq_attr cpufreq_freq_attr_scaling_available_freqs;
492extern struct freq_attr *cpufreq_generic_attr[]; 502extern struct freq_attr *cpufreq_generic_attr[];
493void cpufreq_frequency_table_get_attr(struct cpufreq_frequency_table *table,
494 unsigned int cpu);
495void cpufreq_frequency_table_put_attr(unsigned int cpu);
496int cpufreq_table_validate_and_show(struct cpufreq_policy *policy, 503int cpufreq_table_validate_and_show(struct cpufreq_policy *policy,
497 struct cpufreq_frequency_table *table); 504 struct cpufreq_frequency_table *table);
498 505
@@ -500,10 +507,4 @@ unsigned int cpufreq_generic_get(unsigned int cpu);
500int cpufreq_generic_init(struct cpufreq_policy *policy, 507int cpufreq_generic_init(struct cpufreq_policy *policy,
501 struct cpufreq_frequency_table *table, 508 struct cpufreq_frequency_table *table,
502 unsigned int transition_latency); 509 unsigned int transition_latency);
503static inline int cpufreq_generic_exit(struct cpufreq_policy *policy)
504{
505 cpufreq_frequency_table_put_attr(policy->cpu);
506 return 0;
507}
508
509#endif /* _LINUX_CPUFREQ_H */ 510#endif /* _LINUX_CPUFREQ_H */
diff --git a/include/linux/pci-acpi.h b/include/linux/pci-acpi.h
index 5a462c4e5009..637a608ded0b 100644
--- a/include/linux/pci-acpi.h
+++ b/include/linux/pci-acpi.h
@@ -59,12 +59,12 @@ static inline void acpi_pci_slot_remove(struct pci_bus *bus) { }
59void acpiphp_init(void); 59void acpiphp_init(void);
60void acpiphp_enumerate_slots(struct pci_bus *bus); 60void acpiphp_enumerate_slots(struct pci_bus *bus);
61void acpiphp_remove_slots(struct pci_bus *bus); 61void acpiphp_remove_slots(struct pci_bus *bus);
62void acpiphp_check_host_bridge(acpi_handle handle); 62void acpiphp_check_host_bridge(struct acpi_device *adev);
63#else 63#else
64static inline void acpiphp_init(void) { } 64static inline void acpiphp_init(void) { }
65static inline void acpiphp_enumerate_slots(struct pci_bus *bus) { } 65static inline void acpiphp_enumerate_slots(struct pci_bus *bus) { }
66static inline void acpiphp_remove_slots(struct pci_bus *bus) { } 66static inline void acpiphp_remove_slots(struct pci_bus *bus) { }
67static inline void acpiphp_check_host_bridge(acpi_handle handle) { } 67static inline void acpiphp_check_host_bridge(struct acpi_device *adev) { }
68#endif 68#endif
69 69
70#else /* CONFIG_ACPI */ 70#else /* CONFIG_ACPI */
diff --git a/include/linux/pm.h b/include/linux/pm.h
index 8c6583a53a06..d915d0345fa1 100644
--- a/include/linux/pm.h
+++ b/include/linux/pm.h
@@ -264,9 +264,9 @@ typedef struct pm_message {
264 * registers, so that it is fully operational. 264 * registers, so that it is fully operational.
265 * 265 *
266 * @runtime_idle: Device appears to be inactive and it might be put into a 266 * @runtime_idle: Device appears to be inactive and it might be put into a
267 * low-power state if all of the necessary conditions are satisfied. Check 267 * low-power state if all of the necessary conditions are satisfied.
268 * these conditions and handle the device as appropriate, possibly queueing 268 * Check these conditions, and return 0 if it's appropriate to let the PM
269 * a suspend request for it. The return value is ignored by the PM core. 269 * core queue a suspend request for the device.
270 * 270 *
271 * Refer to Documentation/power/runtime_pm.txt for more information about the 271 * Refer to Documentation/power/runtime_pm.txt for more information about the
272 * role of the above callbacks in device runtime power management. 272 * role of the above callbacks in device runtime power management.
@@ -352,7 +352,7 @@ const struct dev_pm_ops name = { \
352 352
353/* 353/*
354 * Use this for defining a set of PM operations to be used in all situations 354 * Use this for defining a set of PM operations to be used in all situations
355 * (sustem suspend, hibernation or runtime PM). 355 * (system suspend, hibernation or runtime PM).
356 * NOTE: In general, system suspend callbacks, .suspend() and .resume(), should 356 * NOTE: In general, system suspend callbacks, .suspend() and .resume(), should
357 * be different from the corresponding runtime PM callbacks, .runtime_suspend(), 357 * be different from the corresponding runtime PM callbacks, .runtime_suspend(),
358 * and .runtime_resume(), because .runtime_suspend() always works on an already 358 * and .runtime_resume(), because .runtime_suspend() always works on an already
@@ -379,7 +379,7 @@ const struct dev_pm_ops name = { \
379 * 379 *
380 * ON No transition. 380 * ON No transition.
381 * 381 *
382 * FREEZE System is going to hibernate, call ->prepare() and ->freeze() 382 * FREEZE System is going to hibernate, call ->prepare() and ->freeze()
383 * for all devices. 383 * for all devices.
384 * 384 *
385 * SUSPEND System is going to suspend, call ->prepare() and ->suspend() 385 * SUSPEND System is going to suspend, call ->prepare() and ->suspend()
@@ -423,7 +423,7 @@ const struct dev_pm_ops name = { \
423 423
424#define PM_EVENT_INVALID (-1) 424#define PM_EVENT_INVALID (-1)
425#define PM_EVENT_ON 0x0000 425#define PM_EVENT_ON 0x0000
426#define PM_EVENT_FREEZE 0x0001 426#define PM_EVENT_FREEZE 0x0001
427#define PM_EVENT_SUSPEND 0x0002 427#define PM_EVENT_SUSPEND 0x0002
428#define PM_EVENT_HIBERNATE 0x0004 428#define PM_EVENT_HIBERNATE 0x0004
429#define PM_EVENT_QUIESCE 0x0008 429#define PM_EVENT_QUIESCE 0x0008
@@ -542,6 +542,8 @@ struct dev_pm_info {
542 unsigned int async_suspend:1; 542 unsigned int async_suspend:1;
543 bool is_prepared:1; /* Owned by the PM core */ 543 bool is_prepared:1; /* Owned by the PM core */
544 bool is_suspended:1; /* Ditto */ 544 bool is_suspended:1; /* Ditto */
545 bool is_noirq_suspended:1;
546 bool is_late_suspended:1;
545 bool ignore_children:1; 547 bool ignore_children:1;
546 bool early_init:1; /* Owned by the PM core */ 548 bool early_init:1; /* Owned by the PM core */
547 spinlock_t lock; 549 spinlock_t lock;
@@ -582,6 +584,7 @@ struct dev_pm_info {
582 unsigned long accounting_timestamp; 584 unsigned long accounting_timestamp;
583#endif 585#endif
584 struct pm_subsys_data *subsys_data; /* Owned by the subsystem. */ 586 struct pm_subsys_data *subsys_data; /* Owned by the subsystem. */
587 void (*set_latency_tolerance)(struct device *, s32);
585 struct dev_pm_qos *qos; 588 struct dev_pm_qos *qos;
586}; 589};
587 590
@@ -612,11 +615,11 @@ struct dev_pm_domain {
612 * message is implicit: 615 * message is implicit:
613 * 616 *
614 * ON Driver starts working again, responding to hardware events 617 * ON Driver starts working again, responding to hardware events
615 * and software requests. The hardware may have gone through 618 * and software requests. The hardware may have gone through
616 * a power-off reset, or it may have maintained state from the 619 * a power-off reset, or it may have maintained state from the
617 * previous suspend() which the driver will rely on while 620 * previous suspend() which the driver will rely on while
618 * resuming. On most platforms, there are no restrictions on 621 * resuming. On most platforms, there are no restrictions on
619 * availability of resources like clocks during resume(). 622 * availability of resources like clocks during resume().
620 * 623 *
621 * Other transitions are triggered by messages sent using suspend(). All 624 * Other transitions are triggered by messages sent using suspend(). All
622 * these transitions quiesce the driver, so that I/O queues are inactive. 625 * these transitions quiesce the driver, so that I/O queues are inactive.
@@ -626,21 +629,21 @@ struct dev_pm_domain {
626 * differ according to the message: 629 * differ according to the message:
627 * 630 *
628 * SUSPEND Quiesce, enter a low power device state appropriate for 631 * SUSPEND Quiesce, enter a low power device state appropriate for
629 * the upcoming system state (such as PCI_D3hot), and enable 632 * the upcoming system state (such as PCI_D3hot), and enable
630 * wakeup events as appropriate. 633 * wakeup events as appropriate.
631 * 634 *
632 * HIBERNATE Enter a low power device state appropriate for the hibernation 635 * HIBERNATE Enter a low power device state appropriate for the hibernation
633 * state (eg. ACPI S4) and enable wakeup events as appropriate. 636 * state (eg. ACPI S4) and enable wakeup events as appropriate.
634 * 637 *
635 * FREEZE Quiesce operations so that a consistent image can be saved; 638 * FREEZE Quiesce operations so that a consistent image can be saved;
636 * but do NOT otherwise enter a low power device state, and do 639 * but do NOT otherwise enter a low power device state, and do
637 * NOT emit system wakeup events. 640 * NOT emit system wakeup events.
638 * 641 *
639 * PRETHAW Quiesce as if for FREEZE; additionally, prepare for restoring 642 * PRETHAW Quiesce as if for FREEZE; additionally, prepare for restoring
640 * the system from a snapshot taken after an earlier FREEZE. 643 * the system from a snapshot taken after an earlier FREEZE.
641 * Some drivers will need to reset their hardware state instead 644 * Some drivers will need to reset their hardware state instead
642 * of preserving it, to ensure that it's never mistaken for the 645 * of preserving it, to ensure that it's never mistaken for the
643 * state which that earlier snapshot had set up. 646 * state which that earlier snapshot had set up.
644 * 647 *
645 * A minimally power-aware driver treats all messages as SUSPEND, fully 648 * A minimally power-aware driver treats all messages as SUSPEND, fully
646 * reinitializes its device during resume() -- whether or not it was reset 649 * reinitializes its device during resume() -- whether or not it was reset
@@ -717,14 +720,26 @@ static inline void dpm_for_each_dev(void *data, void (*fn)(struct device *, void
717{ 720{
718} 721}
719 722
720#define pm_generic_prepare NULL 723#define pm_generic_prepare NULL
721#define pm_generic_suspend NULL 724#define pm_generic_suspend_late NULL
722#define pm_generic_resume NULL 725#define pm_generic_suspend_noirq NULL
723#define pm_generic_freeze NULL 726#define pm_generic_suspend NULL
724#define pm_generic_thaw NULL 727#define pm_generic_resume_early NULL
725#define pm_generic_restore NULL 728#define pm_generic_resume_noirq NULL
726#define pm_generic_poweroff NULL 729#define pm_generic_resume NULL
727#define pm_generic_complete NULL 730#define pm_generic_freeze_noirq NULL
731#define pm_generic_freeze_late NULL
732#define pm_generic_freeze NULL
733#define pm_generic_thaw_noirq NULL
734#define pm_generic_thaw_early NULL
735#define pm_generic_thaw NULL
736#define pm_generic_restore_noirq NULL
737#define pm_generic_restore_early NULL
738#define pm_generic_restore NULL
739#define pm_generic_poweroff_noirq NULL
740#define pm_generic_poweroff_late NULL
741#define pm_generic_poweroff NULL
742#define pm_generic_complete NULL
728#endif /* !CONFIG_PM_SLEEP */ 743#endif /* !CONFIG_PM_SLEEP */
729 744
730/* How to reorder dpm_list after device_move() */ 745/* How to reorder dpm_list after device_move() */
diff --git a/include/linux/pm_qos.h b/include/linux/pm_qos.h
index 5a95013905c8..9ab4bf7c4646 100644
--- a/include/linux/pm_qos.h
+++ b/include/linux/pm_qos.h
@@ -32,7 +32,10 @@ enum pm_qos_flags_status {
32#define PM_QOS_CPU_DMA_LAT_DEFAULT_VALUE (2000 * USEC_PER_SEC) 32#define PM_QOS_CPU_DMA_LAT_DEFAULT_VALUE (2000 * USEC_PER_SEC)
33#define PM_QOS_NETWORK_LAT_DEFAULT_VALUE (2000 * USEC_PER_SEC) 33#define PM_QOS_NETWORK_LAT_DEFAULT_VALUE (2000 * USEC_PER_SEC)
34#define PM_QOS_NETWORK_THROUGHPUT_DEFAULT_VALUE 0 34#define PM_QOS_NETWORK_THROUGHPUT_DEFAULT_VALUE 0
35#define PM_QOS_DEV_LAT_DEFAULT_VALUE 0 35#define PM_QOS_RESUME_LATENCY_DEFAULT_VALUE 0
36#define PM_QOS_LATENCY_TOLERANCE_DEFAULT_VALUE 0
37#define PM_QOS_LATENCY_TOLERANCE_NO_CONSTRAINT (-1)
38#define PM_QOS_LATENCY_ANY ((s32)(~(__u32)0 >> 1))
36 39
37#define PM_QOS_FLAG_NO_POWER_OFF (1 << 0) 40#define PM_QOS_FLAG_NO_POWER_OFF (1 << 0)
38#define PM_QOS_FLAG_REMOTE_WAKEUP (1 << 1) 41#define PM_QOS_FLAG_REMOTE_WAKEUP (1 << 1)
@@ -49,7 +52,8 @@ struct pm_qos_flags_request {
49}; 52};
50 53
51enum dev_pm_qos_req_type { 54enum dev_pm_qos_req_type {
52 DEV_PM_QOS_LATENCY = 1, 55 DEV_PM_QOS_RESUME_LATENCY = 1,
56 DEV_PM_QOS_LATENCY_TOLERANCE,
53 DEV_PM_QOS_FLAGS, 57 DEV_PM_QOS_FLAGS,
54}; 58};
55 59
@@ -77,6 +81,7 @@ struct pm_qos_constraints {
77 struct plist_head list; 81 struct plist_head list;
78 s32 target_value; /* Do not change to 64 bit */ 82 s32 target_value; /* Do not change to 64 bit */
79 s32 default_value; 83 s32 default_value;
84 s32 no_constraint_value;
80 enum pm_qos_type type; 85 enum pm_qos_type type;
81 struct blocking_notifier_head *notifiers; 86 struct blocking_notifier_head *notifiers;
82}; 87};
@@ -87,9 +92,11 @@ struct pm_qos_flags {
87}; 92};
88 93
89struct dev_pm_qos { 94struct dev_pm_qos {
90 struct pm_qos_constraints latency; 95 struct pm_qos_constraints resume_latency;
96 struct pm_qos_constraints latency_tolerance;
91 struct pm_qos_flags flags; 97 struct pm_qos_flags flags;
92 struct dev_pm_qos_request *latency_req; 98 struct dev_pm_qos_request *resume_latency_req;
99 struct dev_pm_qos_request *latency_tolerance_req;
93 struct dev_pm_qos_request *flags_req; 100 struct dev_pm_qos_request *flags_req;
94}; 101};
95 102
@@ -142,7 +149,8 @@ int dev_pm_qos_remove_global_notifier(struct notifier_block *notifier);
142void dev_pm_qos_constraints_init(struct device *dev); 149void dev_pm_qos_constraints_init(struct device *dev);
143void dev_pm_qos_constraints_destroy(struct device *dev); 150void dev_pm_qos_constraints_destroy(struct device *dev);
144int dev_pm_qos_add_ancestor_request(struct device *dev, 151int dev_pm_qos_add_ancestor_request(struct device *dev,
145 struct dev_pm_qos_request *req, s32 value); 152 struct dev_pm_qos_request *req,
153 enum dev_pm_qos_req_type type, s32 value);
146#else 154#else
147static inline enum pm_qos_flags_status __dev_pm_qos_flags(struct device *dev, 155static inline enum pm_qos_flags_status __dev_pm_qos_flags(struct device *dev,
148 s32 mask) 156 s32 mask)
@@ -185,7 +193,9 @@ static inline void dev_pm_qos_constraints_destroy(struct device *dev)
185 dev->power.power_state = PMSG_INVALID; 193 dev->power.power_state = PMSG_INVALID;
186} 194}
187static inline int dev_pm_qos_add_ancestor_request(struct device *dev, 195static inline int dev_pm_qos_add_ancestor_request(struct device *dev,
188 struct dev_pm_qos_request *req, s32 value) 196 struct dev_pm_qos_request *req,
197 enum dev_pm_qos_req_type type,
198 s32 value)
189 { return 0; } 199 { return 0; }
190#endif 200#endif
191 201
@@ -195,10 +205,12 @@ void dev_pm_qos_hide_latency_limit(struct device *dev);
195int dev_pm_qos_expose_flags(struct device *dev, s32 value); 205int dev_pm_qos_expose_flags(struct device *dev, s32 value);
196void dev_pm_qos_hide_flags(struct device *dev); 206void dev_pm_qos_hide_flags(struct device *dev);
197int dev_pm_qos_update_flags(struct device *dev, s32 mask, bool set); 207int dev_pm_qos_update_flags(struct device *dev, s32 mask, bool set);
208s32 dev_pm_qos_get_user_latency_tolerance(struct device *dev);
209int dev_pm_qos_update_user_latency_tolerance(struct device *dev, s32 val);
198 210
199static inline s32 dev_pm_qos_requested_latency(struct device *dev) 211static inline s32 dev_pm_qos_requested_resume_latency(struct device *dev)
200{ 212{
201 return dev->power.qos->latency_req->data.pnode.prio; 213 return dev->power.qos->resume_latency_req->data.pnode.prio;
202} 214}
203 215
204static inline s32 dev_pm_qos_requested_flags(struct device *dev) 216static inline s32 dev_pm_qos_requested_flags(struct device *dev)
@@ -214,8 +226,12 @@ static inline int dev_pm_qos_expose_flags(struct device *dev, s32 value)
214static inline void dev_pm_qos_hide_flags(struct device *dev) {} 226static inline void dev_pm_qos_hide_flags(struct device *dev) {}
215static inline int dev_pm_qos_update_flags(struct device *dev, s32 m, bool set) 227static inline int dev_pm_qos_update_flags(struct device *dev, s32 m, bool set)
216 { return 0; } 228 { return 0; }
229static inline s32 dev_pm_qos_get_user_latency_tolerance(struct device *dev)
230 { return PM_QOS_LATENCY_TOLERANCE_NO_CONSTRAINT; }
231static inline int dev_pm_qos_update_user_latency_tolerance(struct device *dev, s32 val)
232 { return 0; }
217 233
218static inline s32 dev_pm_qos_requested_latency(struct device *dev) { return 0; } 234static inline s32 dev_pm_qos_requested_resume_latency(struct device *dev) { return 0; }
219static inline s32 dev_pm_qos_requested_flags(struct device *dev) { return 0; } 235static inline s32 dev_pm_qos_requested_flags(struct device *dev) { return 0; }
220#endif 236#endif
221 237
diff --git a/include/linux/pm_runtime.h b/include/linux/pm_runtime.h
index 16c9a62fa1c0..2a5897a4afbc 100644
--- a/include/linux/pm_runtime.h
+++ b/include/linux/pm_runtime.h
@@ -26,9 +26,13 @@
26#ifdef CONFIG_PM 26#ifdef CONFIG_PM
27extern int pm_generic_runtime_suspend(struct device *dev); 27extern int pm_generic_runtime_suspend(struct device *dev);
28extern int pm_generic_runtime_resume(struct device *dev); 28extern int pm_generic_runtime_resume(struct device *dev);
29extern int pm_runtime_force_suspend(struct device *dev);
30extern int pm_runtime_force_resume(struct device *dev);
29#else 31#else
30static inline int pm_generic_runtime_suspend(struct device *dev) { return 0; } 32static inline int pm_generic_runtime_suspend(struct device *dev) { return 0; }
31static inline int pm_generic_runtime_resume(struct device *dev) { return 0; } 33static inline int pm_generic_runtime_resume(struct device *dev) { return 0; }
34static inline int pm_runtime_force_suspend(struct device *dev) { return 0; }
35static inline int pm_runtime_force_resume(struct device *dev) { return 0; }
32#endif 36#endif
33 37
34#ifdef CONFIG_PM_RUNTIME 38#ifdef CONFIG_PM_RUNTIME
diff --git a/include/linux/video_output.h b/include/linux/video_output.h
deleted file mode 100644
index ed5cdeb3604d..000000000000
--- a/include/linux/video_output.h
+++ /dev/null
@@ -1,57 +0,0 @@
1/*
2 *
3 * Copyright (C) 2006 Luming Yu <luming.yu@intel.com>
4 *
5 * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
6 *
7 * This program is free software; you can redistribute it and/or modify
8 * it under the terms of the GNU General Public License as published by
9 * the Free Software Foundation; either version 2 of the License, or (at
10 * your option) any later version.
11 *
12 * This program is distributed in the hope that it will be useful, but
13 * WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
15 * General Public License for more details.
16 *
17 * You should have received a copy of the GNU General Public License along
18 * with this program; if not, write to the Free Software Foundation, Inc.,
19 * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
20 *
21 * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
22 */
23#ifndef _LINUX_VIDEO_OUTPUT_H
24#define _LINUX_VIDEO_OUTPUT_H
25#include <linux/device.h>
26#include <linux/err.h>
27struct output_device;
28struct output_properties {
29 int (*set_state)(struct output_device *);
30 int (*get_status)(struct output_device *);
31};
32struct output_device {
33 int request_state;
34 struct output_properties *props;
35 struct device dev;
36};
37#define to_output_device(obj) container_of(obj, struct output_device, dev)
38#if defined(CONFIG_VIDEO_OUTPUT_CONTROL) || defined(CONFIG_VIDEO_OUTPUT_CONTROL_MODULE)
39struct output_device *video_output_register(const char *name,
40 struct device *dev,
41 void *devdata,
42 struct output_properties *op);
43void video_output_unregister(struct output_device *dev);
44#else
45static struct output_device *video_output_register(const char *name,
46 struct device *dev,
47 void *devdata,
48 struct output_properties *op)
49{
50 return ERR_PTR(-ENODEV);
51}
52static void video_output_unregister(struct output_device *dev)
53{
54 return;
55}
56#endif
57#endif
diff --git a/include/trace/events/power.h b/include/trace/events/power.h
index e5bf9a76f169..9a7e08d61258 100644
--- a/include/trace/events/power.h
+++ b/include/trace/events/power.h
@@ -407,8 +407,8 @@ DECLARE_EVENT_CLASS(dev_pm_qos_request,
407 TP_printk("device=%s type=%s new_value=%d", 407 TP_printk("device=%s type=%s new_value=%d",
408 __get_str(name), 408 __get_str(name),
409 __print_symbolic(__entry->type, 409 __print_symbolic(__entry->type,
410 { DEV_PM_QOS_LATENCY, "DEV_PM_QOS_LATENCY" }, 410 { DEV_PM_QOS_RESUME_LATENCY, "DEV_PM_QOS_RESUME_LATENCY" },
411 { DEV_PM_QOS_FLAGS, "DEV_PM_QOS_FLAGS" }), 411 { DEV_PM_QOS_FLAGS, "DEV_PM_QOS_FLAGS" }),
412 __entry->new_value) 412 __entry->new_value)
413); 413);
414 414