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 ...
This commit is contained in:
+47
-15
@@ -25,6 +25,7 @@
|
||||
#ifndef _LINUX_ACPI_H
|
||||
#define _LINUX_ACPI_H
|
||||
|
||||
#include <linux/ioport.h> /* for struct resource */
|
||||
|
||||
#ifdef CONFIG_ACPI
|
||||
|
||||
@@ -43,8 +44,6 @@
|
||||
#include <linux/dmi.h>
|
||||
|
||||
|
||||
#ifdef CONFIG_ACPI
|
||||
|
||||
enum acpi_irq_model_id {
|
||||
ACPI_IRQ_MODEL_PIC = 0,
|
||||
ACPI_IRQ_MODEL_IOAPIC,
|
||||
@@ -80,7 +79,6 @@ typedef int (*acpi_table_handler) (struct acpi_table_header *table);
|
||||
typedef int (*acpi_table_entry_handler) (struct acpi_subtable_header *header, const unsigned long end);
|
||||
|
||||
char * __acpi_map_table (unsigned long phys_addr, unsigned long size);
|
||||
unsigned long acpi_find_rsdp (void);
|
||||
int acpi_boot_init (void);
|
||||
int acpi_boot_table_init (void);
|
||||
int acpi_numa_init (void);
|
||||
@@ -115,8 +113,8 @@ int acpi_unmap_lsapic(int cpu);
|
||||
|
||||
int acpi_register_ioapic(acpi_handle handle, u64 phys_addr, u32 gsi_base);
|
||||
int acpi_unregister_ioapic(acpi_handle handle, u32 gsi_base);
|
||||
|
||||
extern int acpi_mp_config;
|
||||
void acpi_irq_stats_init(void);
|
||||
extern u32 acpi_irq_handled;
|
||||
|
||||
extern struct acpi_mcfg_allocation *pci_mmcfg_config;
|
||||
extern int pci_mmcfg_config_num;
|
||||
@@ -124,12 +122,6 @@ extern int pci_mmcfg_config_num;
|
||||
extern int sbf_port;
|
||||
extern unsigned long acpi_realmode_flags;
|
||||
|
||||
#else /* !CONFIG_ACPI */
|
||||
|
||||
#define acpi_mp_config 0
|
||||
|
||||
#endif /* !CONFIG_ACPI */
|
||||
|
||||
int acpi_register_gsi (u32 gsi, int triggering, int polarity);
|
||||
int acpi_gsi_to_irq (u32 gsi, unsigned int *irq);
|
||||
|
||||
@@ -145,8 +137,6 @@ extern int acpi_get_override_irq(int bus_irq, int *trigger, int *polarity);
|
||||
*/
|
||||
void acpi_unregister_gsi (u32 gsi);
|
||||
|
||||
#ifdef CONFIG_ACPI
|
||||
|
||||
struct acpi_prt_entry {
|
||||
struct list_head node;
|
||||
struct acpi_pci_id id;
|
||||
@@ -179,8 +169,6 @@ struct acpi_pci_driver {
|
||||
int acpi_pci_register_driver(struct acpi_pci_driver *driver);
|
||||
void acpi_pci_unregister_driver(struct acpi_pci_driver *driver);
|
||||
|
||||
#endif /* CONFIG_ACPI */
|
||||
|
||||
#ifdef CONFIG_ACPI_EC
|
||||
|
||||
extern int ec_read(u8 addr, u8 *val);
|
||||
@@ -192,6 +180,26 @@ extern int ec_transaction(u8 command,
|
||||
|
||||
#endif /*CONFIG_ACPI_EC*/
|
||||
|
||||
#if defined(CONFIG_ACPI_WMI) || defined(CONFIG_ACPI_WMI_MODULE)
|
||||
|
||||
typedef void (*wmi_notify_handler) (u32 value, void *context);
|
||||
|
||||
extern acpi_status wmi_evaluate_method(const char *guid, u8 instance,
|
||||
u32 method_id,
|
||||
const struct acpi_buffer *in,
|
||||
struct acpi_buffer *out);
|
||||
extern acpi_status wmi_query_block(const char *guid, u8 instance,
|
||||
struct acpi_buffer *out);
|
||||
extern acpi_status wmi_set_block(const char *guid, u8 instance,
|
||||
const struct acpi_buffer *in);
|
||||
extern acpi_status wmi_install_notify_handler(const char *guid,
|
||||
wmi_notify_handler handler, void *data);
|
||||
extern acpi_status wmi_remove_notify_handler(const char *guid);
|
||||
extern acpi_status wmi_get_event_data(u32 event, struct acpi_buffer *out);
|
||||
extern bool wmi_has_guid(const char *guid);
|
||||
|
||||
#endif /* CONFIG_ACPI_WMI */
|
||||
|
||||
extern int acpi_blacklisted(void);
|
||||
#ifdef CONFIG_DMI
|
||||
extern void acpi_dmi_osi_linux(int enable, const struct dmi_system_id *d);
|
||||
@@ -217,6 +225,13 @@ extern int pnpacpi_disabled;
|
||||
#define PXM_INVAL (-1)
|
||||
#define NID_INVAL (-1)
|
||||
|
||||
int acpi_check_resource_conflict(struct resource *res);
|
||||
|
||||
int acpi_check_region(resource_size_t start, resource_size_t n,
|
||||
const char *name);
|
||||
int acpi_check_mem_region(resource_size_t start, resource_size_t n,
|
||||
const char *name);
|
||||
|
||||
#else /* CONFIG_ACPI */
|
||||
|
||||
static inline int acpi_boot_init(void)
|
||||
@@ -229,5 +244,22 @@ static inline int acpi_boot_table_init(void)
|
||||
return 0;
|
||||
}
|
||||
|
||||
static inline int acpi_check_resource_conflict(struct resource *res)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
static inline int acpi_check_region(resource_size_t start, resource_size_t n,
|
||||
const char *name)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
static inline int acpi_check_mem_region(resource_size_t start,
|
||||
resource_size_t n, const char *name)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
#endif /* !CONFIG_ACPI */
|
||||
#endif /*_LINUX_ACPI_H*/
|
||||
|
||||
+10
-3
@@ -46,9 +46,10 @@ struct cpuidle_state {
|
||||
/* Idle State Flags */
|
||||
#define CPUIDLE_FLAG_TIME_VALID (0x01) /* is residency time measurable? */
|
||||
#define CPUIDLE_FLAG_CHECK_BM (0x02) /* BM activity will exit state */
|
||||
#define CPUIDLE_FLAG_SHALLOW (0x10) /* low latency, minimal savings */
|
||||
#define CPUIDLE_FLAG_BALANCED (0x20) /* medium latency, moderate savings */
|
||||
#define CPUIDLE_FLAG_DEEP (0x40) /* high latency, large savings */
|
||||
#define CPUIDLE_FLAG_POLL (0x10) /* no latency, no savings */
|
||||
#define CPUIDLE_FLAG_SHALLOW (0x20) /* low latency, minimal savings */
|
||||
#define CPUIDLE_FLAG_BALANCED (0x40) /* medium latency, moderate savings */
|
||||
#define CPUIDLE_FLAG_DEEP (0x80) /* high latency, large savings */
|
||||
|
||||
#define CPUIDLE_DRIVER_FLAGS_MASK (0xFFFF0000)
|
||||
|
||||
@@ -178,4 +179,10 @@ static inline void cpuidle_unregister_governor(struct cpuidle_governor *gov) { }
|
||||
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_ARCH_HAS_CPU_RELAX
|
||||
#define CPUIDLE_DRIVER_STATE_START 1
|
||||
#else
|
||||
#define CPUIDLE_DRIVER_STATE_START 0
|
||||
#endif
|
||||
|
||||
#endif /* _LINUX_CPUIDLE_H */
|
||||
|
||||
@@ -79,7 +79,6 @@ extern void dmi_scan_machine(void);
|
||||
extern int dmi_get_year(int field);
|
||||
extern int dmi_name_in_vendors(const char *str);
|
||||
extern int dmi_available;
|
||||
extern char *dmi_get_slot(int slot);
|
||||
|
||||
#else
|
||||
|
||||
@@ -90,7 +89,6 @@ static inline const struct dmi_device * dmi_find_device(int type, const char *na
|
||||
static inline int dmi_get_year(int year) { return 0; }
|
||||
static inline int dmi_name_in_vendors(const char *s) { return 0; }
|
||||
#define dmi_available 0
|
||||
static inline char *dmi_get_slot(int slot) { return NULL; }
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
@@ -243,6 +243,7 @@ extern enum system_states {
|
||||
#define TAINT_BAD_PAGE (1<<5)
|
||||
#define TAINT_USER (1<<6)
|
||||
#define TAINT_DIE (1<<7)
|
||||
#define TAINT_OVERRIDDEN_ACPI_TABLE (1<<8)
|
||||
|
||||
extern void dump_stack(void) __cold;
|
||||
|
||||
|
||||
@@ -94,6 +94,7 @@ enum power_supply_property {
|
||||
/* Properties of type `const char *' */
|
||||
POWER_SUPPLY_PROP_MODEL_NAME,
|
||||
POWER_SUPPLY_PROP_MANUFACTURER,
|
||||
POWER_SUPPLY_PROP_SERIAL_NUMBER,
|
||||
};
|
||||
|
||||
enum power_supply_type {
|
||||
|
||||
@@ -101,6 +101,8 @@
|
||||
#define SONYPI_EVENT_FNKEY_RELEASED 59
|
||||
#define SONYPI_EVENT_WIRELESS_ON 60
|
||||
#define SONYPI_EVENT_WIRELESS_OFF 61
|
||||
#define SONYPI_EVENT_ZOOM_IN_PRESSED 62
|
||||
#define SONYPI_EVENT_ZOOM_OUT_PRESSED 63
|
||||
|
||||
/* get/set brightness */
|
||||
#define SONYPI_IOCGBRT _IOR('v', 0, __u8)
|
||||
|
||||
@@ -0,0 +1,94 @@
|
||||
/*
|
||||
* thermal.h ($Revision: 0 $)
|
||||
*
|
||||
* Copyright (C) 2008 Intel Corp
|
||||
* Copyright (C) 2008 Zhang Rui <rui.zhang@intel.com>
|
||||
* Copyright (C) 2008 Sujith Thomas <sujith.thomas@intel.com>
|
||||
*
|
||||
* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; version 2 of the License.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful, but
|
||||
* WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License along
|
||||
* with this program; if not, write to the Free Software Foundation, Inc.,
|
||||
* 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
|
||||
*
|
||||
* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
*/
|
||||
|
||||
#ifndef __THERMAL_H__
|
||||
#define __THERMAL_H__
|
||||
|
||||
#include <linux/idr.h>
|
||||
#include <linux/device.h>
|
||||
|
||||
struct thermal_zone_device;
|
||||
struct thermal_cooling_device;
|
||||
|
||||
struct thermal_zone_device_ops {
|
||||
int (*bind) (struct thermal_zone_device *,
|
||||
struct thermal_cooling_device *);
|
||||
int (*unbind) (struct thermal_zone_device *,
|
||||
struct thermal_cooling_device *);
|
||||
int (*get_temp) (struct thermal_zone_device *, char *);
|
||||
int (*get_mode) (struct thermal_zone_device *, char *);
|
||||
int (*set_mode) (struct thermal_zone_device *, const char *);
|
||||
int (*get_trip_type) (struct thermal_zone_device *, int, char *);
|
||||
int (*get_trip_temp) (struct thermal_zone_device *, int, char *);
|
||||
};
|
||||
|
||||
struct thermal_cooling_device_ops {
|
||||
int (*get_max_state) (struct thermal_cooling_device *, char *);
|
||||
int (*get_cur_state) (struct thermal_cooling_device *, char *);
|
||||
int (*set_cur_state) (struct thermal_cooling_device *, unsigned int);
|
||||
};
|
||||
|
||||
#define THERMAL_TRIPS_NONE -1
|
||||
#define THERMAL_MAX_TRIPS 10
|
||||
#define THERMAL_NAME_LENGTH 20
|
||||
struct thermal_cooling_device {
|
||||
int id;
|
||||
char type[THERMAL_NAME_LENGTH];
|
||||
struct device device;
|
||||
void *devdata;
|
||||
struct thermal_cooling_device_ops *ops;
|
||||
struct list_head node;
|
||||
};
|
||||
|
||||
#define KELVIN_TO_CELSIUS(t) (long)(((long)t-2732 >= 0) ? \
|
||||
((long)t-2732+5)/10 : ((long)t-2732-5)/10)
|
||||
#define CELSIUS_TO_KELVIN(t) ((t)*10+2732)
|
||||
|
||||
struct thermal_zone_device {
|
||||
int id;
|
||||
char type[THERMAL_NAME_LENGTH];
|
||||
struct device device;
|
||||
void *devdata;
|
||||
int trips;
|
||||
struct thermal_zone_device_ops *ops;
|
||||
struct list_head cooling_devices;
|
||||
struct idr idr;
|
||||
struct mutex lock; /* protect cooling devices list */
|
||||
struct list_head node;
|
||||
};
|
||||
|
||||
struct thermal_zone_device *thermal_zone_device_register(char *, int, void *,
|
||||
struct thermal_zone_device_ops *);
|
||||
void thermal_zone_device_unregister(struct thermal_zone_device *);
|
||||
|
||||
int thermal_zone_bind_cooling_device(struct thermal_zone_device *, int,
|
||||
struct thermal_cooling_device *);
|
||||
int thermal_zone_unbind_cooling_device(struct thermal_zone_device *, int,
|
||||
struct thermal_cooling_device *);
|
||||
|
||||
struct thermal_cooling_device *thermal_cooling_device_register(char *, void *,
|
||||
struct thermal_cooling_device_ops *);
|
||||
void thermal_cooling_device_unregister(struct thermal_cooling_device *);
|
||||
|
||||
#endif /* __THERMAL_H__ */
|
||||
Reference in New Issue
Block a user