diff options
Diffstat (limited to 'include')
-rw-r--r-- | include/acpi/acexcep.h | 6 | ||||
-rw-r--r-- | include/acpi/acpi_bus.h | 16 | ||||
-rw-r--r-- | include/acpi/acpi_drivers.h | 23 | ||||
-rw-r--r-- | include/acpi/acpiosxf.h | 4 | ||||
-rw-r--r-- | include/acpi/acpixf.h | 16 | ||||
-rw-r--r-- | include/acpi/actbl.h | 74 | ||||
-rw-r--r-- | include/acpi/actypes.h | 18 | ||||
-rw-r--r-- | include/acpi/video.h | 11 | ||||
-rw-r--r-- | include/linux/power_supply.h | 2 | ||||
-rw-r--r-- | include/linux/thermal.h | 48 |
10 files changed, 113 insertions, 105 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 | ||
230 | char const *acpi_gbl_exception_names_tbl[] = { | 232 | char const *acpi_gbl_exception_names_tbl[] = { |
diff --git a/include/acpi/acpi_bus.h b/include/acpi/acpi_bus.h index e9f6574930ef..08ec60c8366a 100644 --- a/include/acpi/acpi_bus.h +++ b/include/acpi/acpi_bus.h | |||
@@ -88,44 +88,28 @@ struct acpi_device; | |||
88 | 88 | ||
89 | typedef int (*acpi_op_add) (struct acpi_device * device); | 89 | typedef int (*acpi_op_add) (struct acpi_device * device); |
90 | typedef int (*acpi_op_remove) (struct acpi_device * device, int type); | 90 | typedef int (*acpi_op_remove) (struct acpi_device * device, int type); |
91 | typedef int (*acpi_op_lock) (struct acpi_device * device, int type); | ||
92 | typedef int (*acpi_op_start) (struct acpi_device * device); | 91 | typedef int (*acpi_op_start) (struct acpi_device * device); |
93 | typedef int (*acpi_op_stop) (struct acpi_device * device, int type); | 92 | typedef int (*acpi_op_stop) (struct acpi_device * device, int type); |
94 | typedef int (*acpi_op_suspend) (struct acpi_device * device, | 93 | typedef int (*acpi_op_suspend) (struct acpi_device * device, |
95 | pm_message_t state); | 94 | pm_message_t state); |
96 | typedef int (*acpi_op_resume) (struct acpi_device * device); | 95 | typedef int (*acpi_op_resume) (struct acpi_device * device); |
97 | typedef int (*acpi_op_scan) (struct acpi_device * device); | ||
98 | typedef int (*acpi_op_bind) (struct acpi_device * device); | 96 | typedef int (*acpi_op_bind) (struct acpi_device * device); |
99 | typedef int (*acpi_op_unbind) (struct acpi_device * device); | 97 | typedef int (*acpi_op_unbind) (struct acpi_device * device); |
100 | typedef int (*acpi_op_shutdown) (struct acpi_device * device); | ||
101 | 98 | ||
102 | struct acpi_bus_ops { | 99 | struct acpi_bus_ops { |
103 | u32 acpi_op_add:1; | 100 | u32 acpi_op_add:1; |
104 | u32 acpi_op_remove:1; | ||
105 | u32 acpi_op_lock:1; | ||
106 | u32 acpi_op_start:1; | 101 | 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 | }; | 102 | }; |
116 | 103 | ||
117 | struct acpi_device_ops { | 104 | struct acpi_device_ops { |
118 | acpi_op_add add; | 105 | acpi_op_add add; |
119 | acpi_op_remove remove; | 106 | acpi_op_remove remove; |
120 | acpi_op_lock lock; | ||
121 | acpi_op_start start; | 107 | acpi_op_start start; |
122 | acpi_op_stop stop; | 108 | acpi_op_stop stop; |
123 | acpi_op_suspend suspend; | 109 | acpi_op_suspend suspend; |
124 | acpi_op_resume resume; | 110 | acpi_op_resume resume; |
125 | acpi_op_scan scan; | ||
126 | acpi_op_bind bind; | 111 | acpi_op_bind bind; |
127 | acpi_op_unbind unbind; | 112 | acpi_op_unbind unbind; |
128 | acpi_op_shutdown shutdown; | ||
129 | }; | 113 | }; |
130 | 114 | ||
131 | struct acpi_driver { | 115 | struct acpi_driver { |
diff --git a/include/acpi/acpi_drivers.h b/include/acpi/acpi_drivers.h index 5fc1bb0f4a90..241d227de6c0 100644 --- a/include/acpi/acpi_drivers.h +++ b/include/acpi/acpi_drivers.h | |||
@@ -99,24 +99,6 @@ struct pci_bus *pci_acpi_scan_root(struct acpi_device *device, int domain, | |||
99 | int bus); | 99 | int bus); |
100 | 100 | ||
101 | /* -------------------------------------------------------------------------- | 101 | /* -------------------------------------------------------------------------- |
102 | Power Resource | ||
103 | -------------------------------------------------------------------------- */ | ||
104 | |||
105 | int acpi_device_sleep_wake(struct acpi_device *dev, | ||
106 | int enable, int sleep_state, int dev_state); | ||
107 | int acpi_enable_wakeup_device_power(struct acpi_device *dev, int sleep_state); | ||
108 | int acpi_disable_wakeup_device_power(struct acpi_device *dev); | ||
109 | int acpi_power_get_inferred_state(struct acpi_device *device); | ||
110 | int acpi_power_transition(struct acpi_device *device, int state); | ||
111 | extern int acpi_power_nocheck; | ||
112 | |||
113 | /* -------------------------------------------------------------------------- | ||
114 | Embedded Controller | ||
115 | -------------------------------------------------------------------------- */ | ||
116 | int acpi_ec_ecdt_probe(void); | ||
117 | int acpi_boot_ec_enable(void); | ||
118 | |||
119 | /* -------------------------------------------------------------------------- | ||
120 | Processor | 102 | Processor |
121 | -------------------------------------------------------------------------- */ | 103 | -------------------------------------------------------------------------- */ |
122 | 104 | ||
@@ -165,9 +147,4 @@ static inline void unregister_hotplug_dock_device(acpi_handle handle) | |||
165 | } | 147 | } |
166 | #endif | 148 | #endif |
167 | 149 | ||
168 | /*-------------------------------------------------------------------------- | ||
169 | Suspend/Resume | ||
170 | -------------------------------------------------------------------------- */ | ||
171 | extern int acpi_sleep_init(void); | ||
172 | |||
173 | #endif /*__ACPI_DRIVERS_H__*/ | 150 | #endif /*__ACPI_DRIVERS_H__*/ |
diff --git a/include/acpi/acpiosxf.h b/include/acpi/acpiosxf.h index a62720a7edc0..178adfb80237 100644 --- a/include/acpi/acpiosxf.h +++ b/include/acpi/acpiosxf.h | |||
@@ -241,10 +241,6 @@ acpi_os_derive_pci_id(acpi_handle rhandle, | |||
241 | acpi_status acpi_os_validate_interface(char *interface); | 241 | acpi_status acpi_os_validate_interface(char *interface); |
242 | acpi_status acpi_osi_invalidate(char* interface); | 242 | acpi_status acpi_osi_invalidate(char* interface); |
243 | 243 | ||
244 | acpi_status | ||
245 | acpi_os_validate_address(u8 space_id, acpi_physical_address address, | ||
246 | acpi_size length, char *name); | ||
247 | |||
248 | u64 acpi_os_get_timer(void); | 244 | u64 acpi_os_get_timer(void); |
249 | 245 | ||
250 | acpi_status acpi_os_signal(u32 function, void *info); | 246 | acpi_status acpi_os_signal(u32 function, void *info); |
diff --git a/include/acpi/acpixf.h b/include/acpi/acpixf.h index c8e8cf45830f..16826f15f01f 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" |
@@ -345,17 +345,15 @@ acpi_resource_to_address64(struct acpi_resource *resource, | |||
345 | */ | 345 | */ |
346 | acpi_status acpi_reset(void); | 346 | acpi_status acpi_reset(void); |
347 | 347 | ||
348 | acpi_status acpi_get_register(u32 register_id, u32 * return_value); | 348 | acpi_status acpi_read_bit_register(u32 register_id, u32 *return_value); |
349 | 349 | ||
350 | acpi_status acpi_get_register_unlocked(u32 register_id, u32 *return_value); | 350 | acpi_status acpi_write_bit_register(u32 register_id, u32 value); |
351 | 351 | ||
352 | acpi_status acpi_set_register(u32 register_id, u32 value); | 352 | acpi_status acpi_set_firmware_waking_vector(u32 physical_address); |
353 | 353 | ||
354 | acpi_status | 354 | #if ACPI_MACHINE_WIDTH == 64 |
355 | acpi_set_firmware_waking_vector(u32 physical_address); | 355 | acpi_status acpi_set_firmware_waking_vector64(u64 physical_address); |
356 | 356 | #endif | |
357 | acpi_status | ||
358 | acpi_set_firmware_waking_vector64(u64 physical_address); | ||
359 | 357 | ||
360 | acpi_status acpi_read(u32 *value, struct acpi_generic_address *reg); | 358 | acpi_status acpi_read(u32 *value, struct acpi_generic_address *reg); |
361 | 359 | ||
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 | */ | ||
265 | enum acpi_prefered_pm_profiles { | 274 | enum 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/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/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) | ||
5 | extern int acpi_video_register(void); | ||
6 | #else | ||
7 | static inline int acpi_video_register(void) { return 0; } | ||
8 | #endif | ||
9 | |||
10 | #endif | ||
11 | |||
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/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 | ||
31 | struct thermal_zone_device; | 32 | struct thermal_zone_device; |
32 | struct thermal_cooling_device; | 33 | struct thermal_cooling_device; |
33 | 34 | ||
35 | enum thermal_device_mode { | ||
36 | THERMAL_DEVICE_DISABLED = 0, | ||
37 | THERMAL_DEVICE_ENABLED, | ||
38 | }; | ||
39 | |||
40 | enum thermal_trip_type { | ||
41 | THERMAL_TRIP_ACTIVE = 0, | ||
42 | THERMAL_TRIP_PASSIVE, | ||
43 | THERMAL_TRIP_HOT, | ||
44 | THERMAL_TRIP_CRITICAL, | ||
45 | }; | ||
46 | |||
34 | struct thermal_zone_device_ops { | 47 | struct 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 | ||
47 | struct thermal_cooling_device_ops { | 66 | struct 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 { | |||
104 | struct thermal_zone_device *thermal_zone_device_register(char *, int, void *, | 131 | struct 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); | ||
108 | void thermal_zone_device_unregister(struct thermal_zone_device *); | 137 | void thermal_zone_device_unregister(struct thermal_zone_device *); |
109 | 138 | ||
110 | int thermal_zone_bind_cooling_device(struct thermal_zone_device *, int, | 139 | int thermal_zone_bind_cooling_device(struct thermal_zone_device *, int, |
111 | struct thermal_cooling_device *); | 140 | struct thermal_cooling_device *); |
112 | int thermal_zone_unbind_cooling_device(struct thermal_zone_device *, int, | 141 | int thermal_zone_unbind_cooling_device(struct thermal_zone_device *, int, |
113 | struct thermal_cooling_device *); | 142 | struct thermal_cooling_device *); |
143 | void thermal_zone_device_update(struct thermal_zone_device *); | ||
114 | struct thermal_cooling_device *thermal_cooling_device_register(char *, void *, | 144 | struct thermal_cooling_device *thermal_cooling_device_register(char *, void *, |
115 | struct | 145 | struct |
116 | thermal_cooling_device_ops | 146 | thermal_cooling_device_ops |