diff options
author | Linus Torvalds <torvalds@woody.linux-foundation.org> | 2008-02-07 12:45:58 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@woody.linux-foundation.org> | 2008-02-07 12:45:58 -0500 |
commit | f0f1b3364ae7f48084bdf2837fb979ff59622523 (patch) | |
tree | e5ef68c0071f44178cc8d1948b64e216d57422aa /include/linux | |
parent | 4383f18b7f94a4d668c5eec68645c75d44556235 (diff) | |
parent | b7143156c9ceee1a072c57aac8729d2dec5b3bf1 (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: (112 commits)
ACPI: fix build warning
Revert "cpuidle: build fix for non-x86"
ACPI: update intrd DSDT override console messages
ACPI: update DSDT override documentation
ACPI: Add "acpi_no_initrd_override" kernel parameter
ACPI: its a directory not a folder....
ACPI: misc cleanups
ACPI: add missing prink prefix strings
ACPI: cleanup acpi.h
ACPICA: fix CONFIG_ACPI_DEBUG_FUNC_TRACE build
ACPI: video: Ignore ACPI video devices that aren't present in hardware
ACPI: video: reset brightness on resume
ACPI: video: call ACPI notifier chain for ACPI video notifications
ACPI: create notifier chain to get hotkey events to graphics driver
ACPI: video: delete unused display switch on hotkey event code
ACPI: video: create "brightness_switch_enabled" modparam
cpuidle: Add a poll_idle method
ACPI: cpuidle: Support C1 idle time accounting
ACPI: enable MWAIT for C1 idle
ACPI: idle: Fix acpi_safe_halt usages and interrupt enabling/disabling
...
Diffstat (limited to 'include/linux')
-rw-r--r-- | include/linux/acpi.h | 62 | ||||
-rw-r--r-- | include/linux/cpuidle.h | 13 | ||||
-rw-r--r-- | include/linux/dmi.h | 2 | ||||
-rw-r--r-- | include/linux/kernel.h | 1 | ||||
-rw-r--r-- | include/linux/power_supply.h | 1 | ||||
-rw-r--r-- | include/linux/sonypi.h | 2 | ||||
-rw-r--r-- | include/linux/thermal.h | 94 |
7 files changed, 155 insertions, 20 deletions
diff --git a/include/linux/acpi.h b/include/linux/acpi.h index 63f2e6ed698f..ddbe7efe590e 100644 --- a/include/linux/acpi.h +++ b/include/linux/acpi.h | |||
@@ -25,6 +25,7 @@ | |||
25 | #ifndef _LINUX_ACPI_H | 25 | #ifndef _LINUX_ACPI_H |
26 | #define _LINUX_ACPI_H | 26 | #define _LINUX_ACPI_H |
27 | 27 | ||
28 | #include <linux/ioport.h> /* for struct resource */ | ||
28 | 29 | ||
29 | #ifdef CONFIG_ACPI | 30 | #ifdef CONFIG_ACPI |
30 | 31 | ||
@@ -43,8 +44,6 @@ | |||
43 | #include <linux/dmi.h> | 44 | #include <linux/dmi.h> |
44 | 45 | ||
45 | 46 | ||
46 | #ifdef CONFIG_ACPI | ||
47 | |||
48 | enum acpi_irq_model_id { | 47 | enum acpi_irq_model_id { |
49 | ACPI_IRQ_MODEL_PIC = 0, | 48 | ACPI_IRQ_MODEL_PIC = 0, |
50 | ACPI_IRQ_MODEL_IOAPIC, | 49 | ACPI_IRQ_MODEL_IOAPIC, |
@@ -80,7 +79,6 @@ typedef int (*acpi_table_handler) (struct acpi_table_header *table); | |||
80 | typedef int (*acpi_table_entry_handler) (struct acpi_subtable_header *header, const unsigned long end); | 79 | typedef int (*acpi_table_entry_handler) (struct acpi_subtable_header *header, const unsigned long end); |
81 | 80 | ||
82 | char * __acpi_map_table (unsigned long phys_addr, unsigned long size); | 81 | char * __acpi_map_table (unsigned long phys_addr, unsigned long size); |
83 | unsigned long acpi_find_rsdp (void); | ||
84 | int acpi_boot_init (void); | 82 | int acpi_boot_init (void); |
85 | int acpi_boot_table_init (void); | 83 | int acpi_boot_table_init (void); |
86 | int acpi_numa_init (void); | 84 | int acpi_numa_init (void); |
@@ -115,8 +113,8 @@ int acpi_unmap_lsapic(int cpu); | |||
115 | 113 | ||
116 | int acpi_register_ioapic(acpi_handle handle, u64 phys_addr, u32 gsi_base); | 114 | int acpi_register_ioapic(acpi_handle handle, u64 phys_addr, u32 gsi_base); |
117 | int acpi_unregister_ioapic(acpi_handle handle, u32 gsi_base); | 115 | int acpi_unregister_ioapic(acpi_handle handle, u32 gsi_base); |
118 | 116 | void acpi_irq_stats_init(void); | |
119 | extern int acpi_mp_config; | 117 | extern u32 acpi_irq_handled; |
120 | 118 | ||
121 | extern struct acpi_mcfg_allocation *pci_mmcfg_config; | 119 | extern struct acpi_mcfg_allocation *pci_mmcfg_config; |
122 | extern int pci_mmcfg_config_num; | 120 | extern int pci_mmcfg_config_num; |
@@ -124,12 +122,6 @@ extern int pci_mmcfg_config_num; | |||
124 | extern int sbf_port; | 122 | extern int sbf_port; |
125 | extern unsigned long acpi_realmode_flags; | 123 | extern unsigned long acpi_realmode_flags; |
126 | 124 | ||
127 | #else /* !CONFIG_ACPI */ | ||
128 | |||
129 | #define acpi_mp_config 0 | ||
130 | |||
131 | #endif /* !CONFIG_ACPI */ | ||
132 | |||
133 | int acpi_register_gsi (u32 gsi, int triggering, int polarity); | 125 | int acpi_register_gsi (u32 gsi, int triggering, int polarity); |
134 | int acpi_gsi_to_irq (u32 gsi, unsigned int *irq); | 126 | int acpi_gsi_to_irq (u32 gsi, unsigned int *irq); |
135 | 127 | ||
@@ -145,8 +137,6 @@ extern int acpi_get_override_irq(int bus_irq, int *trigger, int *polarity); | |||
145 | */ | 137 | */ |
146 | void acpi_unregister_gsi (u32 gsi); | 138 | void acpi_unregister_gsi (u32 gsi); |
147 | 139 | ||
148 | #ifdef CONFIG_ACPI | ||
149 | |||
150 | struct acpi_prt_entry { | 140 | struct acpi_prt_entry { |
151 | struct list_head node; | 141 | struct list_head node; |
152 | struct acpi_pci_id id; | 142 | struct acpi_pci_id id; |
@@ -179,8 +169,6 @@ struct acpi_pci_driver { | |||
179 | int acpi_pci_register_driver(struct acpi_pci_driver *driver); | 169 | int acpi_pci_register_driver(struct acpi_pci_driver *driver); |
180 | void acpi_pci_unregister_driver(struct acpi_pci_driver *driver); | 170 | void acpi_pci_unregister_driver(struct acpi_pci_driver *driver); |
181 | 171 | ||
182 | #endif /* CONFIG_ACPI */ | ||
183 | |||
184 | #ifdef CONFIG_ACPI_EC | 172 | #ifdef CONFIG_ACPI_EC |
185 | 173 | ||
186 | extern int ec_read(u8 addr, u8 *val); | 174 | extern int ec_read(u8 addr, u8 *val); |
@@ -192,6 +180,26 @@ extern int ec_transaction(u8 command, | |||
192 | 180 | ||
193 | #endif /*CONFIG_ACPI_EC*/ | 181 | #endif /*CONFIG_ACPI_EC*/ |
194 | 182 | ||
183 | #if defined(CONFIG_ACPI_WMI) || defined(CONFIG_ACPI_WMI_MODULE) | ||
184 | |||
185 | typedef void (*wmi_notify_handler) (u32 value, void *context); | ||
186 | |||
187 | extern acpi_status wmi_evaluate_method(const char *guid, u8 instance, | ||
188 | u32 method_id, | ||
189 | const struct acpi_buffer *in, | ||
190 | struct acpi_buffer *out); | ||
191 | extern acpi_status wmi_query_block(const char *guid, u8 instance, | ||
192 | struct acpi_buffer *out); | ||
193 | extern acpi_status wmi_set_block(const char *guid, u8 instance, | ||
194 | const struct acpi_buffer *in); | ||
195 | extern acpi_status wmi_install_notify_handler(const char *guid, | ||
196 | wmi_notify_handler handler, void *data); | ||
197 | extern acpi_status wmi_remove_notify_handler(const char *guid); | ||
198 | extern acpi_status wmi_get_event_data(u32 event, struct acpi_buffer *out); | ||
199 | extern bool wmi_has_guid(const char *guid); | ||
200 | |||
201 | #endif /* CONFIG_ACPI_WMI */ | ||
202 | |||
195 | extern int acpi_blacklisted(void); | 203 | extern int acpi_blacklisted(void); |
196 | #ifdef CONFIG_DMI | 204 | #ifdef CONFIG_DMI |
197 | extern void acpi_dmi_osi_linux(int enable, const struct dmi_system_id *d); | 205 | extern void acpi_dmi_osi_linux(int enable, const struct dmi_system_id *d); |
@@ -217,6 +225,13 @@ extern int pnpacpi_disabled; | |||
217 | #define PXM_INVAL (-1) | 225 | #define PXM_INVAL (-1) |
218 | #define NID_INVAL (-1) | 226 | #define NID_INVAL (-1) |
219 | 227 | ||
228 | int acpi_check_resource_conflict(struct resource *res); | ||
229 | |||
230 | int acpi_check_region(resource_size_t start, resource_size_t n, | ||
231 | const char *name); | ||
232 | int acpi_check_mem_region(resource_size_t start, resource_size_t n, | ||
233 | const char *name); | ||
234 | |||
220 | #else /* CONFIG_ACPI */ | 235 | #else /* CONFIG_ACPI */ |
221 | 236 | ||
222 | static inline int acpi_boot_init(void) | 237 | static inline int acpi_boot_init(void) |
@@ -229,5 +244,22 @@ static inline int acpi_boot_table_init(void) | |||
229 | return 0; | 244 | return 0; |
230 | } | 245 | } |
231 | 246 | ||
247 | static inline int acpi_check_resource_conflict(struct resource *res) | ||
248 | { | ||
249 | return 0; | ||
250 | } | ||
251 | |||
252 | static inline int acpi_check_region(resource_size_t start, resource_size_t n, | ||
253 | const char *name) | ||
254 | { | ||
255 | return 0; | ||
256 | } | ||
257 | |||
258 | static inline int acpi_check_mem_region(resource_size_t start, | ||
259 | resource_size_t n, const char *name) | ||
260 | { | ||
261 | return 0; | ||
262 | } | ||
263 | |||
232 | #endif /* !CONFIG_ACPI */ | 264 | #endif /* !CONFIG_ACPI */ |
233 | #endif /*_LINUX_ACPI_H*/ | 265 | #endif /*_LINUX_ACPI_H*/ |
diff --git a/include/linux/cpuidle.h b/include/linux/cpuidle.h index b0fd85ab9efb..385d45b616db 100644 --- a/include/linux/cpuidle.h +++ b/include/linux/cpuidle.h | |||
@@ -46,9 +46,10 @@ struct cpuidle_state { | |||
46 | /* Idle State Flags */ | 46 | /* Idle State Flags */ |
47 | #define CPUIDLE_FLAG_TIME_VALID (0x01) /* is residency time measurable? */ | 47 | #define CPUIDLE_FLAG_TIME_VALID (0x01) /* is residency time measurable? */ |
48 | #define CPUIDLE_FLAG_CHECK_BM (0x02) /* BM activity will exit state */ | 48 | #define CPUIDLE_FLAG_CHECK_BM (0x02) /* BM activity will exit state */ |
49 | #define CPUIDLE_FLAG_SHALLOW (0x10) /* low latency, minimal savings */ | 49 | #define CPUIDLE_FLAG_POLL (0x10) /* no latency, no savings */ |
50 | #define CPUIDLE_FLAG_BALANCED (0x20) /* medium latency, moderate savings */ | 50 | #define CPUIDLE_FLAG_SHALLOW (0x20) /* low latency, minimal savings */ |
51 | #define CPUIDLE_FLAG_DEEP (0x40) /* high latency, large savings */ | 51 | #define CPUIDLE_FLAG_BALANCED (0x40) /* medium latency, moderate savings */ |
52 | #define CPUIDLE_FLAG_DEEP (0x80) /* high latency, large savings */ | ||
52 | 53 | ||
53 | #define CPUIDLE_DRIVER_FLAGS_MASK (0xFFFF0000) | 54 | #define CPUIDLE_DRIVER_FLAGS_MASK (0xFFFF0000) |
54 | 55 | ||
@@ -178,4 +179,10 @@ static inline void cpuidle_unregister_governor(struct cpuidle_governor *gov) { } | |||
178 | 179 | ||
179 | #endif | 180 | #endif |
180 | 181 | ||
182 | #ifdef CONFIG_ARCH_HAS_CPU_RELAX | ||
183 | #define CPUIDLE_DRIVER_STATE_START 1 | ||
184 | #else | ||
185 | #define CPUIDLE_DRIVER_STATE_START 0 | ||
186 | #endif | ||
187 | |||
181 | #endif /* _LINUX_CPUIDLE_H */ | 188 | #endif /* _LINUX_CPUIDLE_H */ |
diff --git a/include/linux/dmi.h b/include/linux/dmi.h index 5b42a659a308..b1251b2af568 100644 --- a/include/linux/dmi.h +++ b/include/linux/dmi.h | |||
@@ -79,7 +79,6 @@ extern void dmi_scan_machine(void); | |||
79 | extern int dmi_get_year(int field); | 79 | extern int dmi_get_year(int field); |
80 | extern int dmi_name_in_vendors(const char *str); | 80 | extern int dmi_name_in_vendors(const char *str); |
81 | extern int dmi_available; | 81 | extern int dmi_available; |
82 | extern char *dmi_get_slot(int slot); | ||
83 | 82 | ||
84 | #else | 83 | #else |
85 | 84 | ||
@@ -90,7 +89,6 @@ static inline const struct dmi_device * dmi_find_device(int type, const char *na | |||
90 | static inline int dmi_get_year(int year) { return 0; } | 89 | static inline int dmi_get_year(int year) { return 0; } |
91 | static inline int dmi_name_in_vendors(const char *s) { return 0; } | 90 | static inline int dmi_name_in_vendors(const char *s) { return 0; } |
92 | #define dmi_available 0 | 91 | #define dmi_available 0 |
93 | static inline char *dmi_get_slot(int slot) { return NULL; } | ||
94 | 92 | ||
95 | #endif | 93 | #endif |
96 | 94 | ||
diff --git a/include/linux/kernel.h b/include/linux/kernel.h index 18222f267bc4..9e01f376840a 100644 --- a/include/linux/kernel.h +++ b/include/linux/kernel.h | |||
@@ -243,6 +243,7 @@ extern enum system_states { | |||
243 | #define TAINT_BAD_PAGE (1<<5) | 243 | #define TAINT_BAD_PAGE (1<<5) |
244 | #define TAINT_USER (1<<6) | 244 | #define TAINT_USER (1<<6) |
245 | #define TAINT_DIE (1<<7) | 245 | #define TAINT_DIE (1<<7) |
246 | #define TAINT_OVERRIDDEN_ACPI_TABLE (1<<8) | ||
246 | 247 | ||
247 | extern void dump_stack(void) __cold; | 248 | extern void dump_stack(void) __cold; |
248 | 249 | ||
diff --git a/include/linux/power_supply.h b/include/linux/power_supply.h index 5cbf3e371012..68ed19ccf1f7 100644 --- a/include/linux/power_supply.h +++ b/include/linux/power_supply.h | |||
@@ -94,6 +94,7 @@ enum power_supply_property { | |||
94 | /* Properties of type `const char *' */ | 94 | /* Properties of type `const char *' */ |
95 | POWER_SUPPLY_PROP_MODEL_NAME, | 95 | POWER_SUPPLY_PROP_MODEL_NAME, |
96 | POWER_SUPPLY_PROP_MANUFACTURER, | 96 | POWER_SUPPLY_PROP_MANUFACTURER, |
97 | POWER_SUPPLY_PROP_SERIAL_NUMBER, | ||
97 | }; | 98 | }; |
98 | 99 | ||
99 | enum power_supply_type { | 100 | enum power_supply_type { |
diff --git a/include/linux/sonypi.h b/include/linux/sonypi.h index 40c7b5d993b9..f41ffd7c2dd9 100644 --- a/include/linux/sonypi.h +++ b/include/linux/sonypi.h | |||
@@ -101,6 +101,8 @@ | |||
101 | #define SONYPI_EVENT_FNKEY_RELEASED 59 | 101 | #define SONYPI_EVENT_FNKEY_RELEASED 59 |
102 | #define SONYPI_EVENT_WIRELESS_ON 60 | 102 | #define SONYPI_EVENT_WIRELESS_ON 60 |
103 | #define SONYPI_EVENT_WIRELESS_OFF 61 | 103 | #define SONYPI_EVENT_WIRELESS_OFF 61 |
104 | #define SONYPI_EVENT_ZOOM_IN_PRESSED 62 | ||
105 | #define SONYPI_EVENT_ZOOM_OUT_PRESSED 63 | ||
104 | 106 | ||
105 | /* get/set brightness */ | 107 | /* get/set brightness */ |
106 | #define SONYPI_IOCGBRT _IOR('v', 0, __u8) | 108 | #define SONYPI_IOCGBRT _IOR('v', 0, __u8) |
diff --git a/include/linux/thermal.h b/include/linux/thermal.h new file mode 100644 index 000000000000..bba7712cadc7 --- /dev/null +++ b/include/linux/thermal.h | |||
@@ -0,0 +1,94 @@ | |||
1 | /* | ||
2 | * thermal.h ($Revision: 0 $) | ||
3 | * | ||
4 | * Copyright (C) 2008 Intel Corp | ||
5 | * Copyright (C) 2008 Zhang Rui <rui.zhang@intel.com> | ||
6 | * Copyright (C) 2008 Sujith Thomas <sujith.thomas@intel.com> | ||
7 | * | ||
8 | * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | ||
9 | * This program is free software; you can redistribute it and/or modify | ||
10 | * it under the terms of the GNU General Public License as published by | ||
11 | * the Free Software Foundation; version 2 of the License. | ||
12 | * | ||
13 | * This program is distributed in the hope that it will be useful, but | ||
14 | * WITHOUT ANY WARRANTY; without even the implied warranty of | ||
15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | ||
16 | * General Public License for more details. | ||
17 | * | ||
18 | * You should have received a copy of the GNU General Public License along | ||
19 | * with this program; if not, write to the Free Software Foundation, Inc., | ||
20 | * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. | ||
21 | * | ||
22 | * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | ||
23 | */ | ||
24 | |||
25 | #ifndef __THERMAL_H__ | ||
26 | #define __THERMAL_H__ | ||
27 | |||
28 | #include <linux/idr.h> | ||
29 | #include <linux/device.h> | ||
30 | |||
31 | struct thermal_zone_device; | ||
32 | struct thermal_cooling_device; | ||
33 | |||
34 | struct thermal_zone_device_ops { | ||
35 | int (*bind) (struct thermal_zone_device *, | ||
36 | struct thermal_cooling_device *); | ||
37 | int (*unbind) (struct thermal_zone_device *, | ||
38 | struct thermal_cooling_device *); | ||
39 | int (*get_temp) (struct thermal_zone_device *, char *); | ||
40 | int (*get_mode) (struct thermal_zone_device *, char *); | ||
41 | int (*set_mode) (struct thermal_zone_device *, const char *); | ||
42 | int (*get_trip_type) (struct thermal_zone_device *, int, char *); | ||
43 | int (*get_trip_temp) (struct thermal_zone_device *, int, char *); | ||
44 | }; | ||
45 | |||
46 | struct thermal_cooling_device_ops { | ||
47 | int (*get_max_state) (struct thermal_cooling_device *, char *); | ||
48 | int (*get_cur_state) (struct thermal_cooling_device *, char *); | ||
49 | int (*set_cur_state) (struct thermal_cooling_device *, unsigned int); | ||
50 | }; | ||
51 | |||
52 | #define THERMAL_TRIPS_NONE -1 | ||
53 | #define THERMAL_MAX_TRIPS 10 | ||
54 | #define THERMAL_NAME_LENGTH 20 | ||
55 | struct thermal_cooling_device { | ||
56 | int id; | ||
57 | char type[THERMAL_NAME_LENGTH]; | ||
58 | struct device device; | ||
59 | void *devdata; | ||
60 | struct thermal_cooling_device_ops *ops; | ||
61 | struct list_head node; | ||
62 | }; | ||
63 | |||
64 | #define KELVIN_TO_CELSIUS(t) (long)(((long)t-2732 >= 0) ? \ | ||
65 | ((long)t-2732+5)/10 : ((long)t-2732-5)/10) | ||
66 | #define CELSIUS_TO_KELVIN(t) ((t)*10+2732) | ||
67 | |||
68 | struct thermal_zone_device { | ||
69 | int id; | ||
70 | char type[THERMAL_NAME_LENGTH]; | ||
71 | struct device device; | ||
72 | void *devdata; | ||
73 | int trips; | ||
74 | struct thermal_zone_device_ops *ops; | ||
75 | struct list_head cooling_devices; | ||
76 | struct idr idr; | ||
77 | struct mutex lock; /* protect cooling devices list */ | ||
78 | struct list_head node; | ||
79 | }; | ||
80 | |||
81 | struct thermal_zone_device *thermal_zone_device_register(char *, int, void *, | ||
82 | struct thermal_zone_device_ops *); | ||
83 | void thermal_zone_device_unregister(struct thermal_zone_device *); | ||
84 | |||
85 | int thermal_zone_bind_cooling_device(struct thermal_zone_device *, int, | ||
86 | struct thermal_cooling_device *); | ||
87 | int thermal_zone_unbind_cooling_device(struct thermal_zone_device *, int, | ||
88 | struct thermal_cooling_device *); | ||
89 | |||
90 | struct thermal_cooling_device *thermal_cooling_device_register(char *, void *, | ||
91 | struct thermal_cooling_device_ops *); | ||
92 | void thermal_cooling_device_unregister(struct thermal_cooling_device *); | ||
93 | |||
94 | #endif /* __THERMAL_H__ */ | ||