ACPI: register ACPI Processor as generic thermal cooling device
[linux-2.6.git] / include / acpi / processor.h
index 01d2f24..0787635 100644 (file)
@@ -3,7 +3,8 @@
 
 #include <linux/kernel.h>
 #include <linux/cpu.h>
-
+#include <linux/cpuidle.h>
+#include <linux/thermal.h>
 #include <asm/acpi.h>
 
 #define ACPI_PROCESSOR_BUSY_METRIC     10
@@ -75,6 +76,7 @@ struct acpi_processor_cx {
 };
 
 struct acpi_processor_power {
+       struct cpuidle_device dev;
        struct acpi_processor_cx *state;
        unsigned long bm_check_timestamp;
        u32 default_state;
@@ -167,8 +169,9 @@ struct acpi_processor_throttling {
        struct acpi_processor_tx_tss *states_tss;
        struct acpi_tsd_package domain_info;
        cpumask_t shared_cpu_map;
-       int (*acpi_processor_get_throttling) (struct acpi_processor *pr);
-       int (*acpi_processor_set_throttling) (struct acpi_processor *pr, int state);
+       int (*acpi_processor_get_throttling) (struct acpi_processor * pr);
+       int (*acpi_processor_set_throttling) (struct acpi_processor * pr,
+                                             int state);
 
        u32 address;
        u8 duty_offset;
@@ -198,6 +201,7 @@ struct acpi_processor_flags {
        u8 bm_check:1;
        u8 has_cst:1;
        u8 power_setup_done:1;
+       u8 bm_rld_set:1;
 };
 
 struct acpi_processor {
@@ -207,14 +211,14 @@ struct acpi_processor {
        u32 pblk;
        int performance_platform_limit;
        int throttling_platform_limit;
-               /*0 - states 0..n-th satte available*/
+       /* 0 - states 0..n-th state available */
 
        struct acpi_processor_flags flags;
        struct acpi_processor_power power;
        struct acpi_processor_performance *performance;
        struct acpi_processor_throttling throttling;
        struct acpi_processor_limit limit;
-
+       struct thermal_cooling_device *cdev;
        /* the _PDC objects for this processor, if any */
        struct acpi_object_list *pdc;
 };
@@ -231,7 +235,7 @@ struct acpi_processor_errata {
 
 extern int acpi_processor_preregister_performance(struct
                                                  acpi_processor_performance
-                                                 **performance);
+                                                 *performance);
 
 extern int acpi_processor_register_performance(struct acpi_processor_performance
                                               *performance, unsigned int cpu);
@@ -319,11 +323,14 @@ int acpi_processor_power_init(struct acpi_processor *pr,
 int acpi_processor_cst_has_changed(struct acpi_processor *pr);
 int acpi_processor_power_exit(struct acpi_processor *pr,
                              struct acpi_device *device);
+int acpi_processor_suspend(struct acpi_device * device, pm_message_t state);
+int acpi_processor_resume(struct acpi_device * device);
+extern struct cpuidle_driver acpi_idle_driver;
 
 /* in processor_thermal.c */
 int acpi_processor_get_limit_info(struct acpi_processor *pr);
 extern struct file_operations acpi_processor_limit_fops;
-
+extern struct thermal_cooling_device_ops processor_cooling_ops;
 #ifdef CONFIG_CPU_FREQ
 void acpi_thermal_cpufreq_init(void);
 void acpi_thermal_cpufreq_exit(void);