aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2009-04-05 14:16:25 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2009-04-05 14:16:25 -0400
commit32fb6c17566ec66de87324a834c7776f40e35e78 (patch)
tree87b8ed5d66495536fbb452255c3eacd1cfb0c43a /include
parent45e36c1666aa6c8b0c538abcf984b336184d8c3f (diff)
parent7ec0a7290797f57b780f792d12f4bcc19c83aa4f (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: (140 commits) ACPI: processor: use .notify method instead of installing handler directly ACPI: button: use .notify method instead of installing handler directly ACPI: support acpi_device_ops .notify methods toshiba-acpi: remove MAINTAINERS entry ACPI: battery: asynchronous init acer-wmi: Update copyright notice & documentation acer-wmi: Cleanup the failure cleanup handling acer-wmi: Blacklist Acer Aspire One video: build fix thinkpad-acpi: rework brightness support thinkpad-acpi: enhanced debugging messages for the fan subdriver thinkpad-acpi: enhanced debugging messages for the hotkey subdriver thinkpad-acpi: enhanced debugging messages for rfkill subdrivers thinkpad-acpi: restrict access to some firmware LEDs thinkpad-acpi: remove HKEY disable functionality thinkpad-acpi: add new debug helpers and warn of deprecated atts thinkpad-acpi: add missing log levels thinkpad-acpi: cleanup debug helpers thinkpad-acpi: documentation cleanup thinkpad-acpi: drop ibm-acpi alias ...
Diffstat (limited to 'include')
-rw-r--r--include/acpi/acexcep.h6
-rw-r--r--include/acpi/acpi_bus.h18
-rw-r--r--include/acpi/acpi_drivers.h33
-rw-r--r--include/acpi/acpiosxf.h4
-rw-r--r--include/acpi/acpixf.h16
-rw-r--r--include/acpi/actbl.h74
-rw-r--r--include/acpi/actbl1.h6
-rw-r--r--include/acpi/actypes.h18
-rw-r--r--include/acpi/processor.h4
-rw-r--r--include/acpi/video.h11
-rw-r--r--include/linux/acpi.h1
-rw-r--r--include/linux/power_supply.h2
-rw-r--r--include/linux/sonypi.h8
-rw-r--r--include/linux/thermal.h48
14 files changed, 139 insertions, 110 deletions
diff --git a/include/acpi/acexcep.h b/include/acpi/acexcep.h
index eda04546cdf6..473d584b1d31 100644
--- a/include/acpi/acexcep.h
+++ b/include/acpi/acexcep.h
@@ -103,8 +103,9 @@
103#define AE_BAD_OCTAL_CONSTANT (acpi_status) (0x0006 | AE_CODE_PROGRAMMER) 103#define AE_BAD_OCTAL_CONSTANT (acpi_status) (0x0006 | AE_CODE_PROGRAMMER)
104#define AE_BAD_DECIMAL_CONSTANT (acpi_status) (0x0007 | AE_CODE_PROGRAMMER) 104#define AE_BAD_DECIMAL_CONSTANT (acpi_status) (0x0007 | AE_CODE_PROGRAMMER)
105#define AE_MISSING_ARGUMENTS (acpi_status) (0x0008 | AE_CODE_PROGRAMMER) 105#define AE_MISSING_ARGUMENTS (acpi_status) (0x0008 | AE_CODE_PROGRAMMER)
106#define AE_BAD_ADDRESS (acpi_status) (0x0009 | AE_CODE_PROGRAMMER)
106 107
107#define AE_CODE_PGM_MAX 0x0008 108#define AE_CODE_PGM_MAX 0x0009
108 109
109/* 110/*
110 * Acpi table exceptions 111 * Acpi table exceptions
@@ -224,7 +225,8 @@ char const *acpi_gbl_exception_names_pgm[] = {
224 "AE_BAD_HEX_CONSTANT", 225 "AE_BAD_HEX_CONSTANT",
225 "AE_BAD_OCTAL_CONSTANT", 226 "AE_BAD_OCTAL_CONSTANT",
226 "AE_BAD_DECIMAL_CONSTANT", 227 "AE_BAD_DECIMAL_CONSTANT",
227 "AE_MISSING_ARGUMENTS" 228 "AE_MISSING_ARGUMENTS",
229 "AE_BAD_ADDRESS"
228}; 230};
229 231
230char const *acpi_gbl_exception_names_tbl[] = { 232char const *acpi_gbl_exception_names_tbl[] = {
diff --git a/include/acpi/acpi_bus.h b/include/acpi/acpi_bus.h
index e9f6574930ef..a2228511d4be 100644
--- a/include/acpi/acpi_bus.h
+++ b/include/acpi/acpi_bus.h
@@ -88,44 +88,30 @@ struct acpi_device;
88 88
89typedef int (*acpi_op_add) (struct acpi_device * device); 89typedef int (*acpi_op_add) (struct acpi_device * device);
90typedef int (*acpi_op_remove) (struct acpi_device * device, int type); 90typedef int (*acpi_op_remove) (struct acpi_device * device, int type);
91typedef int (*acpi_op_lock) (struct acpi_device * device, int type);
92typedef int (*acpi_op_start) (struct acpi_device * device); 91typedef int (*acpi_op_start) (struct acpi_device * device);
93typedef int (*acpi_op_stop) (struct acpi_device * device, int type); 92typedef int (*acpi_op_stop) (struct acpi_device * device, int type);
94typedef int (*acpi_op_suspend) (struct acpi_device * device, 93typedef int (*acpi_op_suspend) (struct acpi_device * device,
95 pm_message_t state); 94 pm_message_t state);
96typedef int (*acpi_op_resume) (struct acpi_device * device); 95typedef int (*acpi_op_resume) (struct acpi_device * device);
97typedef int (*acpi_op_scan) (struct acpi_device * device);
98typedef int (*acpi_op_bind) (struct acpi_device * device); 96typedef int (*acpi_op_bind) (struct acpi_device * device);
99typedef int (*acpi_op_unbind) (struct acpi_device * device); 97typedef int (*acpi_op_unbind) (struct acpi_device * device);
100typedef int (*acpi_op_shutdown) (struct acpi_device * device); 98typedef void (*acpi_op_notify) (struct acpi_device * device, u32 event);
101 99
102struct acpi_bus_ops { 100struct acpi_bus_ops {
103 u32 acpi_op_add:1; 101 u32 acpi_op_add:1;
104 u32 acpi_op_remove:1;
105 u32 acpi_op_lock:1;
106 u32 acpi_op_start:1; 102 u32 acpi_op_start:1;
107 u32 acpi_op_stop:1;
108 u32 acpi_op_suspend:1;
109 u32 acpi_op_resume:1;
110 u32 acpi_op_scan:1;
111 u32 acpi_op_bind:1;
112 u32 acpi_op_unbind:1;
113 u32 acpi_op_shutdown:1;
114 u32 reserved:21;
115}; 103};
116 104
117struct acpi_device_ops { 105struct acpi_device_ops {
118 acpi_op_add add; 106 acpi_op_add add;
119 acpi_op_remove remove; 107 acpi_op_remove remove;
120 acpi_op_lock lock;
121 acpi_op_start start; 108 acpi_op_start start;
122 acpi_op_stop stop; 109 acpi_op_stop stop;
123 acpi_op_suspend suspend; 110 acpi_op_suspend suspend;
124 acpi_op_resume resume; 111 acpi_op_resume resume;
125 acpi_op_scan scan;
126 acpi_op_bind bind; 112 acpi_op_bind bind;
127 acpi_op_unbind unbind; 113 acpi_op_unbind unbind;
128 acpi_op_shutdown shutdown; 114 acpi_op_notify notify;
129}; 115};
130 116
131struct acpi_driver { 117struct acpi_driver {
diff --git a/include/acpi/acpi_drivers.h b/include/acpi/acpi_drivers.h
index 5fc1bb0f4a90..0352c8f0b05b 100644
--- a/include/acpi/acpi_drivers.h
+++ b/include/acpi/acpi_drivers.h
@@ -67,6 +67,16 @@
67#define ACPI_BAY_HID "LNXIOBAY" 67#define ACPI_BAY_HID "LNXIOBAY"
68#define ACPI_DOCK_HID "LNXDOCK" 68#define ACPI_DOCK_HID "LNXDOCK"
69 69
70/*
71 * For fixed hardware buttons, we fabricate acpi_devices with HID
72 * ACPI_BUTTON_HID_POWERF or ACPI_BUTTON_HID_SLEEPF. Fixed hardware
73 * signals only an event; it doesn't supply a notification value.
74 * To allow drivers to treat notifications from fixed hardware the
75 * same as those from real devices, we turn the events into this
76 * notification value.
77 */
78#define ACPI_FIXED_HARDWARE_EVENT 0x100
79
70/* -------------------------------------------------------------------------- 80/* --------------------------------------------------------------------------
71 PCI 81 PCI
72 -------------------------------------------------------------------------- */ 82 -------------------------------------------------------------------------- */
@@ -99,24 +109,6 @@ struct pci_bus *pci_acpi_scan_root(struct acpi_device *device, int domain,
99 int bus); 109 int bus);
100 110
101/* -------------------------------------------------------------------------- 111/* --------------------------------------------------------------------------
102 Power Resource
103 -------------------------------------------------------------------------- */
104
105int acpi_device_sleep_wake(struct acpi_device *dev,
106 int enable, int sleep_state, int dev_state);
107int acpi_enable_wakeup_device_power(struct acpi_device *dev, int sleep_state);
108int acpi_disable_wakeup_device_power(struct acpi_device *dev);
109int acpi_power_get_inferred_state(struct acpi_device *device);
110int acpi_power_transition(struct acpi_device *device, int state);
111extern int acpi_power_nocheck;
112
113/* --------------------------------------------------------------------------
114 Embedded Controller
115 -------------------------------------------------------------------------- */
116int acpi_ec_ecdt_probe(void);
117int acpi_boot_ec_enable(void);
118
119/* --------------------------------------------------------------------------
120 Processor 112 Processor
121 -------------------------------------------------------------------------- */ 113 -------------------------------------------------------------------------- */
122 114
@@ -165,9 +157,4 @@ static inline void unregister_hotplug_dock_device(acpi_handle handle)
165} 157}
166#endif 158#endif
167 159
168/*--------------------------------------------------------------------------
169 Suspend/Resume
170 -------------------------------------------------------------------------- */
171extern int acpi_sleep_init(void);
172
173#endif /*__ACPI_DRIVERS_H__*/ 160#endif /*__ACPI_DRIVERS_H__*/
diff --git a/include/acpi/acpiosxf.h b/include/acpi/acpiosxf.h
index ab0b85cf21f3..3e798593b17b 100644
--- a/include/acpi/acpiosxf.h
+++ b/include/acpi/acpiosxf.h
@@ -242,10 +242,6 @@ acpi_os_derive_pci_id(acpi_handle rhandle,
242acpi_status acpi_os_validate_interface(char *interface); 242acpi_status acpi_os_validate_interface(char *interface);
243acpi_status acpi_osi_invalidate(char* interface); 243acpi_status acpi_osi_invalidate(char* interface);
244 244
245acpi_status
246acpi_os_validate_address(u8 space_id, acpi_physical_address address,
247 acpi_size length, char *name);
248
249u64 acpi_os_get_timer(void); 245u64 acpi_os_get_timer(void);
250 246
251acpi_status acpi_os_signal(u32 function, void *info); 247acpi_status acpi_os_signal(u32 function, void *info);
diff --git a/include/acpi/acpixf.h b/include/acpi/acpixf.h
index cc40102fe2f3..aeaf7cd41dc7 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 0x20081204 50#define ACPI_CA_VERSION 0x20090320
51 51
52#include "actypes.h" 52#include "actypes.h"
53#include "actbl.h" 53#include "actbl.h"
@@ -349,17 +349,15 @@ acpi_resource_to_address64(struct acpi_resource *resource,
349 */ 349 */
350acpi_status acpi_reset(void); 350acpi_status acpi_reset(void);
351 351
352acpi_status acpi_get_register(u32 register_id, u32 * return_value); 352acpi_status acpi_read_bit_register(u32 register_id, u32 *return_value);
353 353
354acpi_status acpi_get_register_unlocked(u32 register_id, u32 *return_value); 354acpi_status acpi_write_bit_register(u32 register_id, u32 value);
355 355
356acpi_status acpi_set_register(u32 register_id, u32 value); 356acpi_status acpi_set_firmware_waking_vector(u32 physical_address);
357 357
358acpi_status 358#if ACPI_MACHINE_WIDTH == 64
359acpi_set_firmware_waking_vector(u32 physical_address); 359acpi_status acpi_set_firmware_waking_vector64(u64 physical_address);
360 360#endif
361acpi_status
362acpi_set_firmware_waking_vector64(u64 physical_address);
363 361
364acpi_status acpi_read(u32 *value, struct acpi_generic_address *reg); 362acpi_status acpi_read(u32 *value, struct acpi_generic_address *reg);
365 363
diff --git a/include/acpi/actbl.h b/include/acpi/actbl.h
index bf8d4cfd8cf5..222733d01f36 100644
--- a/include/acpi/actbl.h
+++ b/include/acpi/actbl.h
@@ -214,11 +214,11 @@ struct acpi_table_fadt {
214 u16 flush_size; /* Processor's memory cache line width, in bytes */ 214 u16 flush_size; /* Processor's memory cache line width, in bytes */
215 u16 flush_stride; /* Number of flush strides that need to be read */ 215 u16 flush_stride; /* Number of flush strides that need to be read */
216 u8 duty_offset; /* Processor duty cycle index in processor's P_CNT reg */ 216 u8 duty_offset; /* Processor duty cycle index in processor's P_CNT reg */
217 u8 duty_width; /* Processor duty cycle value bit width in P_CNT register. */ 217 u8 duty_width; /* Processor duty cycle value bit width in P_CNT register */
218 u8 day_alarm; /* Index to day-of-month alarm in RTC CMOS RAM */ 218 u8 day_alarm; /* Index to day-of-month alarm in RTC CMOS RAM */
219 u8 month_alarm; /* Index to month-of-year alarm in RTC CMOS RAM */ 219 u8 month_alarm; /* Index to month-of-year alarm in RTC CMOS RAM */
220 u8 century; /* Index to century in RTC CMOS RAM */ 220 u8 century; /* Index to century in RTC CMOS RAM */
221 u16 boot_flags; /* IA-PC Boot Architecture Flags. See Table 5-10 for description */ 221 u16 boot_flags; /* IA-PC Boot Architecture Flags (see below for individual flags) */
222 u8 reserved; /* Reserved, must be zero */ 222 u8 reserved; /* Reserved, must be zero */
223 u32 flags; /* Miscellaneous flag bits (see below for individual flags) */ 223 u32 flags; /* Miscellaneous flag bits (see below for individual flags) */
224 struct acpi_generic_address reset_register; /* 64-bit address of the Reset register */ 224 struct acpi_generic_address reset_register; /* 64-bit address of the Reset register */
@@ -236,32 +236,41 @@ struct acpi_table_fadt {
236 struct acpi_generic_address xgpe1_block; /* 64-bit Extended General Purpose Event 1 Reg Blk address */ 236 struct acpi_generic_address xgpe1_block; /* 64-bit Extended General Purpose Event 1 Reg Blk address */
237}; 237};
238 238
239/* FADT Boot Architecture Flags (boot_flags) */
240
241#define ACPI_FADT_LEGACY_DEVICES (1) /* 00: [V2] System has LPC or ISA bus devices */
242#define ACPI_FADT_8042 (1<<1) /* 01: [V3] System has an 8042 controller on port 60/64 */
243#define ACPI_FADT_NO_VGA (1<<2) /* 02: [V4] It is not safe to probe for VGA hardware */
244#define ACPI_FADT_NO_MSI (1<<3) /* 03: [V4] Message Signaled Interrupts (MSI) must not be enabled */
245#define ACPI_FADT_NO_ASPM (1<<4) /* 04: [V4] PCIe ASPM control must not be enabled */
246
247#define FADT2_REVISION_ID 3
248
239/* FADT flags */ 249/* FADT flags */
240 250
241#define ACPI_FADT_WBINVD (1) /* 00: The wbinvd instruction works properly */ 251#define ACPI_FADT_WBINVD (1) /* 00: [V1] The wbinvd instruction works properly */
242#define ACPI_FADT_WBINVD_FLUSH (1<<1) /* 01: The wbinvd flushes but does not invalidate */ 252#define ACPI_FADT_WBINVD_FLUSH (1<<1) /* 01: [V1] wbinvd flushes but does not invalidate caches */
243#define ACPI_FADT_C1_SUPPORTED (1<<2) /* 02: All processors support C1 state */ 253#define ACPI_FADT_C1_SUPPORTED (1<<2) /* 02: [V1] All processors support C1 state */
244#define ACPI_FADT_C2_MP_SUPPORTED (1<<3) /* 03: C2 state works on MP system */ 254#define ACPI_FADT_C2_MP_SUPPORTED (1<<3) /* 03: [V1] C2 state works on MP system */
245#define ACPI_FADT_POWER_BUTTON (1<<4) /* 04: Power button is handled as a generic feature */ 255#define ACPI_FADT_POWER_BUTTON (1<<4) /* 04: [V1] Power button is handled as a control method device */
246#define ACPI_FADT_SLEEP_BUTTON (1<<5) /* 05: Sleep button is handled as a generic feature, or not present */ 256#define ACPI_FADT_SLEEP_BUTTON (1<<5) /* 05: [V1] Sleep button is handled as a control method device */
247#define ACPI_FADT_FIXED_RTC (1<<6) /* 06: RTC wakeup stat not in fixed register space */ 257#define ACPI_FADT_FIXED_RTC (1<<6) /* 06: [V1] RTC wakeup status not in fixed register space */
248#define ACPI_FADT_S4_RTC_WAKE (1<<7) /* 07: RTC wakeup possible from S4 */ 258#define ACPI_FADT_S4_RTC_WAKE (1<<7) /* 07: [V1] RTC alarm can wake system from S4 */
249#define ACPI_FADT_32BIT_TIMER (1<<8) /* 08: tmr_val is 32 bits 0=24-bits */ 259#define ACPI_FADT_32BIT_TIMER (1<<8) /* 08: [V1] ACPI timer width is 32-bit (0=24-bit) */
250#define ACPI_FADT_DOCKING_SUPPORTED (1<<9) /* 09: Docking supported */ 260#define ACPI_FADT_DOCKING_SUPPORTED (1<<9) /* 09: [V1] Docking supported */
251#define ACPI_FADT_RESET_REGISTER (1<<10) /* 10: System reset via the FADT RESET_REG supported */ 261#define ACPI_FADT_RESET_REGISTER (1<<10) /* 10: [V2] System reset via the FADT RESET_REG supported */
252#define ACPI_FADT_SEALED_CASE (1<<11) /* 11: No internal expansion capabilities and case is sealed */ 262#define ACPI_FADT_SEALED_CASE (1<<11) /* 11: [V3] No internal expansion capabilities and case is sealed */
253#define ACPI_FADT_HEADLESS (1<<12) /* 12: No local video capabilities or local input devices */ 263#define ACPI_FADT_HEADLESS (1<<12) /* 12: [V3] No local video capabilities or local input devices */
254#define ACPI_FADT_SLEEP_TYPE (1<<13) /* 13: Must execute native instruction after writing SLP_TYPx register */ 264#define ACPI_FADT_SLEEP_TYPE (1<<13) /* 13: [V3] Must execute native instruction after writing SLP_TYPx register */
255#define ACPI_FADT_PCI_EXPRESS_WAKE (1<<14) /* 14: System supports PCIEXP_WAKE (STS/EN) bits (ACPI 3.0) */ 265#define ACPI_FADT_PCI_EXPRESS_WAKE (1<<14) /* 14: [V4] System supports PCIEXP_WAKE (STS/EN) bits (ACPI 3.0) */
256#define ACPI_FADT_PLATFORM_CLOCK (1<<15) /* 15: OSPM should use platform-provided timer (ACPI 3.0) */ 266#define ACPI_FADT_PLATFORM_CLOCK (1<<15) /* 15: [V4] OSPM should use platform-provided timer (ACPI 3.0) */
257#define ACPI_FADT_S4_RTC_VALID (1<<16) /* 16: Contents of RTC_STS valid after S4 wake (ACPI 3.0) */ 267#define ACPI_FADT_S4_RTC_VALID (1<<16) /* 16: [V4] Contents of RTC_STS valid after S4 wake (ACPI 3.0) */
258#define ACPI_FADT_REMOTE_POWER_ON (1<<17) /* 17: System is compatible with remote power on (ACPI 3.0) */ 268#define ACPI_FADT_REMOTE_POWER_ON (1<<17) /* 17: [V4] System is compatible with remote power on (ACPI 3.0) */
259#define ACPI_FADT_APIC_CLUSTER (1<<18) /* 18: All local APICs must use cluster model (ACPI 3.0) */ 269#define ACPI_FADT_APIC_CLUSTER (1<<18) /* 18: [V4] All local APICs must use cluster model (ACPI 3.0) */
260#define ACPI_FADT_APIC_PHYSICAL (1<<19) /* 19: All local x_aPICs must use physical dest mode (ACPI 3.0) */ 270#define ACPI_FADT_APIC_PHYSICAL (1<<19) /* 19: [V4] All local x_aPICs must use physical dest mode (ACPI 3.0) */
271
272/* FADT Prefered Power Management Profiles */
261 273
262/*
263 * FADT Prefered Power Management Profiles
264 */
265enum acpi_prefered_pm_profiles { 274enum acpi_prefered_pm_profiles {
266 PM_UNSPECIFIED = 0, 275 PM_UNSPECIFIED = 0,
267 PM_DESKTOP = 1, 276 PM_DESKTOP = 1,
@@ -272,16 +281,6 @@ enum acpi_prefered_pm_profiles {
272 PM_APPLIANCE_PC = 6 281 PM_APPLIANCE_PC = 6
273}; 282};
274 283
275/* FADT Boot Arch Flags */
276
277#define BAF_LEGACY_DEVICES 0x0001
278#define BAF_8042_KEYBOARD_CONTROLLER 0x0002
279#define BAF_MSI_NOT_SUPPORTED 0x0008
280#define BAF_PCIE_ASPM_CONTROL 0x0010
281
282#define FADT2_REVISION_ID 3
283#define FADT2_MINUS_REVISION_ID 2
284
285/* Reset to default packing */ 284/* Reset to default packing */
286 285
287#pragma pack() 286#pragma pack()
@@ -310,8 +309,9 @@ struct acpi_table_desc {
310#define ACPI_TABLE_ORIGIN_UNKNOWN (0) 309#define ACPI_TABLE_ORIGIN_UNKNOWN (0)
311#define ACPI_TABLE_ORIGIN_MAPPED (1) 310#define ACPI_TABLE_ORIGIN_MAPPED (1)
312#define ACPI_TABLE_ORIGIN_ALLOCATED (2) 311#define ACPI_TABLE_ORIGIN_ALLOCATED (2)
313#define ACPI_TABLE_ORIGIN_MASK (3) 312#define ACPI_TABLE_ORIGIN_OVERRIDE (4)
314#define ACPI_TABLE_IS_LOADED (4) 313#define ACPI_TABLE_ORIGIN_MASK (7)
314#define ACPI_TABLE_IS_LOADED (8)
315 315
316/* 316/*
317 * Get the remaining ACPI tables 317 * Get the remaining ACPI tables
diff --git a/include/acpi/actbl1.h b/include/acpi/actbl1.h
index 18963b968114..59ade0752473 100644
--- a/include/acpi/actbl1.h
+++ b/include/acpi/actbl1.h
@@ -1016,9 +1016,9 @@ struct acpi_madt_interrupt_source {
1016struct acpi_madt_local_x2apic { 1016struct acpi_madt_local_x2apic {
1017 struct acpi_subtable_header header; 1017 struct acpi_subtable_header header;
1018 u16 reserved; /* Reserved - must be zero */ 1018 u16 reserved; /* Reserved - must be zero */
1019 u32 local_apic_id; /* Processor X2_APIC ID */ 1019 u32 local_apic_id; /* Processor x2APIC ID */
1020 u32 lapic_flags; 1020 u32 lapic_flags;
1021 u32 uid; /* Extended X2_APIC processor ID */ 1021 u32 uid; /* ACPI processor UID */
1022}; 1022};
1023 1023
1024/* 10: Local X2APIC NMI (07/2008) */ 1024/* 10: Local X2APIC NMI (07/2008) */
@@ -1026,7 +1026,7 @@ struct acpi_madt_local_x2apic {
1026struct acpi_madt_local_x2apic_nmi { 1026struct acpi_madt_local_x2apic_nmi {
1027 struct acpi_subtable_header header; 1027 struct acpi_subtable_header header;
1028 u16 inti_flags; 1028 u16 inti_flags;
1029 u32 uid; /* Processor X2_APIC ID */ 1029 u32 uid; /* ACPI processor UID */
1030 u8 lint; /* LINTn to which NMI is connected */ 1030 u8 lint; /* LINTn to which NMI is connected */
1031 u8 reserved[3]; 1031 u8 reserved[3];
1032}; 1032};
diff --git a/include/acpi/actypes.h b/include/acpi/actypes.h
index a20aab510173..f555d927f7c0 100644
--- a/include/acpi/actypes.h
+++ b/include/acpi/actypes.h
@@ -777,17 +777,25 @@ typedef u8 acpi_adr_space_type;
777#define ACPI_BITREG_SCI_ENABLE 0x0E 777#define ACPI_BITREG_SCI_ENABLE 0x0E
778#define ACPI_BITREG_BUS_MASTER_RLD 0x0F 778#define ACPI_BITREG_BUS_MASTER_RLD 0x0F
779#define ACPI_BITREG_GLOBAL_LOCK_RELEASE 0x10 779#define ACPI_BITREG_GLOBAL_LOCK_RELEASE 0x10
780#define ACPI_BITREG_SLEEP_TYPE_A 0x11 780#define ACPI_BITREG_SLEEP_TYPE 0x11
781#define ACPI_BITREG_SLEEP_TYPE_B 0x12 781#define ACPI_BITREG_SLEEP_ENABLE 0x12
782#define ACPI_BITREG_SLEEP_ENABLE 0x13
783 782
784/* PM2 Control register */ 783/* PM2 Control register */
785 784
786#define ACPI_BITREG_ARB_DISABLE 0x14 785#define ACPI_BITREG_ARB_DISABLE 0x13
787 786
788#define ACPI_BITREG_MAX 0x14 787#define ACPI_BITREG_MAX 0x13
789#define ACPI_NUM_BITREG ACPI_BITREG_MAX + 1 788#define ACPI_NUM_BITREG ACPI_BITREG_MAX + 1
790 789
790/* Status register values. A 1 clears a status bit. 0 = no effect */
791
792#define ACPI_CLEAR_STATUS 1
793
794/* Enable and Control register values */
795
796#define ACPI_ENABLE_EVENT 1
797#define ACPI_DISABLE_EVENT 0
798
791/* 799/*
792 * External ACPI object definition 800 * External ACPI object definition
793 */ 801 */
diff --git a/include/acpi/processor.h b/include/acpi/processor.h
index 0574add2a1e3..b09c4fde9725 100644
--- a/include/acpi/processor.h
+++ b/include/acpi/processor.h
@@ -322,7 +322,7 @@ static inline int acpi_processor_ppc_has_changed(struct acpi_processor *pr)
322int acpi_processor_tstate_has_changed(struct acpi_processor *pr); 322int acpi_processor_tstate_has_changed(struct acpi_processor *pr);
323int acpi_processor_get_throttling_info(struct acpi_processor *pr); 323int acpi_processor_get_throttling_info(struct acpi_processor *pr);
324extern int acpi_processor_set_throttling(struct acpi_processor *pr, int state); 324extern int acpi_processor_set_throttling(struct acpi_processor *pr, int state);
325extern struct file_operations acpi_processor_throttling_fops; 325extern const struct file_operations acpi_processor_throttling_fops;
326extern void acpi_processor_throttling_init(void); 326extern void acpi_processor_throttling_init(void);
327/* in processor_idle.c */ 327/* in processor_idle.c */
328int acpi_processor_power_init(struct acpi_processor *pr, 328int acpi_processor_power_init(struct acpi_processor *pr,
@@ -336,7 +336,7 @@ extern struct cpuidle_driver acpi_idle_driver;
336 336
337/* in processor_thermal.c */ 337/* in processor_thermal.c */
338int acpi_processor_get_limit_info(struct acpi_processor *pr); 338int acpi_processor_get_limit_info(struct acpi_processor *pr);
339extern struct file_operations acpi_processor_limit_fops; 339extern const struct file_operations acpi_processor_limit_fops;
340extern struct thermal_cooling_device_ops processor_cooling_ops; 340extern struct thermal_cooling_device_ops processor_cooling_ops;
341#ifdef CONFIG_CPU_FREQ 341#ifdef CONFIG_CPU_FREQ
342void acpi_thermal_cpufreq_init(void); 342void acpi_thermal_cpufreq_init(void);
diff --git a/include/acpi/video.h b/include/acpi/video.h
new file mode 100644
index 000000000000..f0275bb79ce4
--- /dev/null
+++ b/include/acpi/video.h
@@ -0,0 +1,11 @@
1#ifndef __ACPI_VIDEO_H
2#define __ACPI_VIDEO_H
3
4#if (defined CONFIG_ACPI_VIDEO || defined CONFIG_ACPI_VIDEO_MODULE)
5extern int acpi_video_register(void);
6#else
7static inline int acpi_video_register(void) { return 0; }
8#endif
9
10#endif
11
diff --git a/include/linux/acpi.h b/include/linux/acpi.h
index d047f846c3ed..6586cbd0d4af 100644
--- a/include/linux/acpi.h
+++ b/include/linux/acpi.h
@@ -97,6 +97,7 @@ void acpi_table_print_madt_entry (struct acpi_subtable_header *madt);
97/* the following four functions are architecture-dependent */ 97/* the following four functions are architecture-dependent */
98void acpi_numa_slit_init (struct acpi_table_slit *slit); 98void acpi_numa_slit_init (struct acpi_table_slit *slit);
99void acpi_numa_processor_affinity_init (struct acpi_srat_cpu_affinity *pa); 99void acpi_numa_processor_affinity_init (struct acpi_srat_cpu_affinity *pa);
100void acpi_numa_x2apic_affinity_init(struct acpi_srat_x2apic_cpu_affinity *pa);
100void acpi_numa_memory_affinity_init (struct acpi_srat_mem_affinity *ma); 101void acpi_numa_memory_affinity_init (struct acpi_srat_mem_affinity *ma);
101void acpi_numa_arch_fixup(void); 102void acpi_numa_arch_fixup(void);
102 103
diff --git a/include/linux/power_supply.h b/include/linux/power_supply.h
index 8ff25e0e7f7a..594c494ac3f0 100644
--- a/include/linux/power_supply.h
+++ b/include/linux/power_supply.h
@@ -73,6 +73,8 @@ enum power_supply_property {
73 POWER_SUPPLY_PROP_VOLTAGE_AVG, 73 POWER_SUPPLY_PROP_VOLTAGE_AVG,
74 POWER_SUPPLY_PROP_CURRENT_NOW, 74 POWER_SUPPLY_PROP_CURRENT_NOW,
75 POWER_SUPPLY_PROP_CURRENT_AVG, 75 POWER_SUPPLY_PROP_CURRENT_AVG,
76 POWER_SUPPLY_PROP_POWER_NOW,
77 POWER_SUPPLY_PROP_POWER_AVG,
76 POWER_SUPPLY_PROP_CHARGE_FULL_DESIGN, 78 POWER_SUPPLY_PROP_CHARGE_FULL_DESIGN,
77 POWER_SUPPLY_PROP_CHARGE_EMPTY_DESIGN, 79 POWER_SUPPLY_PROP_CHARGE_EMPTY_DESIGN,
78 POWER_SUPPLY_PROP_CHARGE_FULL, 80 POWER_SUPPLY_PROP_CHARGE_FULL,
diff --git a/include/linux/sonypi.h b/include/linux/sonypi.h
index f41ffd7c2dd9..34c4475ac4a2 100644
--- a/include/linux/sonypi.h
+++ b/include/linux/sonypi.h
@@ -103,6 +103,14 @@
103#define SONYPI_EVENT_WIRELESS_OFF 61 103#define SONYPI_EVENT_WIRELESS_OFF 61
104#define SONYPI_EVENT_ZOOM_IN_PRESSED 62 104#define SONYPI_EVENT_ZOOM_IN_PRESSED 62
105#define SONYPI_EVENT_ZOOM_OUT_PRESSED 63 105#define SONYPI_EVENT_ZOOM_OUT_PRESSED 63
106#define SONYPI_EVENT_CD_EJECT_PRESSED 64
107#define SONYPI_EVENT_MODEKEY_PRESSED 65
108#define SONYPI_EVENT_PKEY_P4 66
109#define SONYPI_EVENT_PKEY_P5 67
110#define SONYPI_EVENT_SETTINGKEY_PRESSED 68
111#define SONYPI_EVENT_VOLUME_INC_PRESSED 69
112#define SONYPI_EVENT_VOLUME_DEC_PRESSED 70
113#define SONYPI_EVENT_BRIGHTNESS_PRESSED 71
106 114
107/* get/set brightness */ 115/* get/set brightness */
108#define SONYPI_IOCGBRT _IOR('v', 0, __u8) 116#define SONYPI_IOCGBRT _IOR('v', 0, __u8)
diff --git a/include/linux/thermal.h b/include/linux/thermal.h
index 917707e6151d..1de8b9eb841b 100644
--- a/include/linux/thermal.h
+++ b/include/linux/thermal.h
@@ -27,27 +27,46 @@
27 27
28#include <linux/idr.h> 28#include <linux/idr.h>
29#include <linux/device.h> 29#include <linux/device.h>
30#include <linux/workqueue.h>
30 31
31struct thermal_zone_device; 32struct thermal_zone_device;
32struct thermal_cooling_device; 33struct thermal_cooling_device;
33 34
35enum thermal_device_mode {
36 THERMAL_DEVICE_DISABLED = 0,
37 THERMAL_DEVICE_ENABLED,
38};
39
40enum thermal_trip_type {
41 THERMAL_TRIP_ACTIVE = 0,
42 THERMAL_TRIP_PASSIVE,
43 THERMAL_TRIP_HOT,
44 THERMAL_TRIP_CRITICAL,
45};
46
34struct thermal_zone_device_ops { 47struct thermal_zone_device_ops {
35 int (*bind) (struct thermal_zone_device *, 48 int (*bind) (struct thermal_zone_device *,
36 struct thermal_cooling_device *); 49 struct thermal_cooling_device *);
37 int (*unbind) (struct thermal_zone_device *, 50 int (*unbind) (struct thermal_zone_device *,
38 struct thermal_cooling_device *); 51 struct thermal_cooling_device *);
39 int (*get_temp) (struct thermal_zone_device *, char *); 52 int (*get_temp) (struct thermal_zone_device *, unsigned long *);
40 int (*get_mode) (struct thermal_zone_device *, char *); 53 int (*get_mode) (struct thermal_zone_device *,
41 int (*set_mode) (struct thermal_zone_device *, const char *); 54 enum thermal_device_mode *);
42 int (*get_trip_type) (struct thermal_zone_device *, int, char *); 55 int (*set_mode) (struct thermal_zone_device *,
43 int (*get_trip_temp) (struct thermal_zone_device *, int, char *); 56 enum thermal_device_mode);
57 int (*get_trip_type) (struct thermal_zone_device *, int,
58 enum thermal_trip_type *);
59 int (*get_trip_temp) (struct thermal_zone_device *, int,
60 unsigned long *);
44 int (*get_crit_temp) (struct thermal_zone_device *, unsigned long *); 61 int (*get_crit_temp) (struct thermal_zone_device *, unsigned long *);
62 int (*notify) (struct thermal_zone_device *, int,
63 enum thermal_trip_type);
45}; 64};
46 65
47struct thermal_cooling_device_ops { 66struct thermal_cooling_device_ops {
48 int (*get_max_state) (struct thermal_cooling_device *, char *); 67 int (*get_max_state) (struct thermal_cooling_device *, unsigned long *);
49 int (*get_cur_state) (struct thermal_cooling_device *, char *); 68 int (*get_cur_state) (struct thermal_cooling_device *, unsigned long *);
50 int (*set_cur_state) (struct thermal_cooling_device *, unsigned int); 69 int (*set_cur_state) (struct thermal_cooling_device *, unsigned long);
51}; 70};
52 71
53#define THERMAL_TRIPS_NONE -1 72#define THERMAL_TRIPS_NONE -1
@@ -88,11 +107,19 @@ struct thermal_zone_device {
88 struct device device; 107 struct device device;
89 void *devdata; 108 void *devdata;
90 int trips; 109 int trips;
110 int tc1;
111 int tc2;
112 int passive_delay;
113 int polling_delay;
114 int last_temperature;
115 bool passive;
116 unsigned int forced_passive;
91 struct thermal_zone_device_ops *ops; 117 struct thermal_zone_device_ops *ops;
92 struct list_head cooling_devices; 118 struct list_head cooling_devices;
93 struct idr idr; 119 struct idr idr;
94 struct mutex lock; /* protect cooling devices list */ 120 struct mutex lock; /* protect cooling devices list */
95 struct list_head node; 121 struct list_head node;
122 struct delayed_work poll_queue;
96#if defined(CONFIG_THERMAL_HWMON) 123#if defined(CONFIG_THERMAL_HWMON)
97 struct list_head hwmon_node; 124 struct list_head hwmon_node;
98 struct thermal_hwmon_device *hwmon; 125 struct thermal_hwmon_device *hwmon;
@@ -104,13 +131,16 @@ struct thermal_zone_device {
104struct thermal_zone_device *thermal_zone_device_register(char *, int, void *, 131struct thermal_zone_device *thermal_zone_device_register(char *, int, void *,
105 struct 132 struct
106 thermal_zone_device_ops 133 thermal_zone_device_ops
107 *); 134 *, int tc1, int tc2,
135 int passive_freq,
136 int polling_freq);
108void thermal_zone_device_unregister(struct thermal_zone_device *); 137void thermal_zone_device_unregister(struct thermal_zone_device *);
109 138
110int thermal_zone_bind_cooling_device(struct thermal_zone_device *, int, 139int thermal_zone_bind_cooling_device(struct thermal_zone_device *, int,
111 struct thermal_cooling_device *); 140 struct thermal_cooling_device *);
112int thermal_zone_unbind_cooling_device(struct thermal_zone_device *, int, 141int thermal_zone_unbind_cooling_device(struct thermal_zone_device *, int,
113 struct thermal_cooling_device *); 142 struct thermal_cooling_device *);
143void thermal_zone_device_update(struct thermal_zone_device *);
114struct thermal_cooling_device *thermal_cooling_device_register(char *, void *, 144struct thermal_cooling_device *thermal_cooling_device_register(char *, void *,
115 struct 145 struct
116 thermal_cooling_device_ops 146 thermal_cooling_device_ops