diff options
| author | Kai Germaschewski <kai@tp1.ruhr-uni-bochum.de> | 2002-12-30 13:32:59 -0600 |
|---|---|---|
| committer | Kai Germaschewski <kai@tp1.ruhr-uni-bochum.de> | 2002-12-30 13:32:59 -0600 |
| commit | 1836ce84119574e86e8e806f38f479d8a66d482c (patch) | |
| tree | 81f30b92e92570ae624397da99fa903abba4307d /include/linux | |
| parent | 5c8daf122af3ec6ea55204ad58264677fdf425a0 (diff) | |
| parent | 214fd2320f43b49efa5de18d85bc72c48f99e531 (diff) | |
Merge tp1.ruhr-uni-bochum.de:/home/kai/kernel/v2.5/linux-2.5
into tp1.ruhr-uni-bochum.de:/scratch/kai/linux-2.5.make
Diffstat (limited to 'include/linux')
| -rw-r--r-- | include/linux/bcd.h | 20 | ||||
| -rw-r--r-- | include/linux/cache.h | 3 | ||||
| -rw-r--r-- | include/linux/cpufreq.h | 17 | ||||
| -rw-r--r-- | include/linux/fs.h | 10 | ||||
| -rw-r--r-- | include/linux/i2c-algo-bit.h | 7 | ||||
| -rw-r--r-- | include/linux/i2c-dev.h | 177 | ||||
| -rw-r--r-- | include/linux/i2c-elektor.h | 47 | ||||
| -rw-r--r-- | include/linux/i2c-id.h | 12 | ||||
| -rw-r--r-- | include/linux/i2c.h | 65 | ||||
| -rw-r--r-- | include/linux/isapnp.h | 138 | ||||
| -rw-r--r-- | include/linux/kernel.h | 1 | ||||
| -rw-r--r-- | include/linux/mc146818rtc.h | 11 | ||||
| -rw-r--r-- | include/linux/mm.h | 3 | ||||
| -rw-r--r-- | include/linux/module.h | 8 | ||||
| -rw-r--r-- | include/linux/mtd/mtd.h | 5 | ||||
| -rw-r--r-- | include/linux/pci.h | 19 | ||||
| -rw-r--r-- | include/linux/percpu.h | 61 | ||||
| -rw-r--r-- | include/linux/pnp.h | 47 | ||||
| -rw-r--r-- | include/linux/sched.h | 1 | ||||
| -rw-r--r-- | include/linux/sensors.h | 690 | ||||
| -rw-r--r-- | include/linux/smp.h | 10 | ||||
| -rw-r--r-- | include/linux/suspend.h | 3 | ||||
| -rw-r--r-- | include/linux/tty.h | 5 | ||||
| -rw-r--r-- | include/linux/tty_driver.h | 2 |
24 files changed, 184 insertions, 1178 deletions
diff --git a/include/linux/bcd.h b/include/linux/bcd.h new file mode 100644 index 000000000000..c545308125b0 --- /dev/null +++ b/include/linux/bcd.h @@ -0,0 +1,20 @@ +/* Permission is hereby granted to copy, modify and redistribute this code + * in terms of the GNU Library General Public License, Version 2 or later, + * at your option. + */ + +/* macros to translate to/from binary and binary-coded decimal (frequently + * found in RTC chips). + */ + +#ifndef _BCD_H +#define _BCD_H + +#define BCD2BIN(val) (((val) & 0x0f) + ((val)>>4)*10) +#define BIN2BCD(val) ((((val)/10)<<4) + (val)%10) + +/* backwards compat */ +#define BCD_TO_BIN(val) ((val)=BCD2BIN(val)) +#define BIN_TO_BCD(val) ((val)=BIN2BCD(val)) + +#endif /* _BCD_H */ diff --git a/include/linux/cache.h b/include/linux/cache.h index 95faa6ec3aa7..3db3832f35cb 100644 --- a/include/linux/cache.h +++ b/include/linux/cache.h @@ -1,11 +1,10 @@ #ifndef __LINUX_CACHE_H #define __LINUX_CACHE_H +#include <linux/kernel.h> #include <linux/config.h> #include <asm/cache.h> -#define ALIGN(x,a) (((x)+(a)-1)&~((a)-1)) - #ifndef L1_CACHE_ALIGN #define L1_CACHE_ALIGN(x) ALIGN(x, L1_CACHE_BYTES) #endif diff --git a/include/linux/cpufreq.h b/include/linux/cpufreq.h index e93501c7a0b8..ab2890b619d0 100644 --- a/include/linux/cpufreq.h +++ b/include/linux/cpufreq.h @@ -104,27 +104,14 @@ static inline unsigned long cpufreq_scale(unsigned long old, u_int div, u_int mu /********************************************************************* - * DYNAMIC CPUFREQ INTERFACE * - *********************************************************************/ -#ifdef CONFIG_CPU_FREQ_DYNAMIC -/* TBD */ -#endif /* CONFIG_CPU_FREQ_DYNAMIC */ - - -/********************************************************************* * CPUFREQ DRIVER INTERFACE * *********************************************************************/ -typedef int (*cpufreq_policy_t) (struct cpufreq_policy *policy); - struct cpufreq_driver { /* needed by all drivers */ - cpufreq_policy_t verify; - cpufreq_policy_t setpolicy; + int (*verify) (struct cpufreq_policy *policy); + int (*setpolicy) (struct cpufreq_policy *policy); struct cpufreq_policy *policy; -#ifdef CONFIG_CPU_FREQ_DYNAMIC - /* TBD */ -#endif /* 2.4. compatible API */ #ifdef CONFIG_CPU_FREQ_24_API unsigned int cpu_cur_freq[NR_CPUS]; diff --git a/include/linux/fs.h b/include/linux/fs.h index 6c3188b991e6..3fa13b80747d 100644 --- a/include/linux/fs.h +++ b/include/linux/fs.h @@ -982,15 +982,9 @@ struct super_block *get_sb_pseudo(struct file_system_type *, char *, /* Alas, no aliases. Too much hassle with bringing module.h everywhere */ #define fops_get(fops) \ - (((fops) && (fops)->owner) \ - ? (try_inc_mod_count((fops)->owner) ? (fops) : NULL) \ - : (fops)) - + (((fops) && try_module_get((fops)->owner) ? (fops) : NULL)) #define fops_put(fops) \ -do { \ - if ((fops) && (fops)->owner) \ - module_put((fops)->owner); \ -} while(0) + do { if (fops) module_put((fops)->owner); } while(0) extern int register_filesystem(struct file_system_type *); extern int unregister_filesystem(struct file_system_type *); diff --git a/include/linux/i2c-algo-bit.h b/include/linux/i2c-algo-bit.h index 9598d2cbf718..fea550f163d9 100644 --- a/include/linux/i2c-algo-bit.h +++ b/include/linux/i2c-algo-bit.h @@ -42,9 +42,10 @@ struct i2c_algo_bit_data { int (*getscl) (void *data); /* local settings */ - int udelay; - int mdelay; - int timeout; + int udelay; /* half-clock-cycle time in microsecs */ + /* i.e. clock is (500 / udelay) KHz */ + int mdelay; /* in millisecs, unused */ + int timeout; /* in jiffies */ }; #define I2C_BIT_ADAP_MAX 16 diff --git a/include/linux/i2c-dev.h b/include/linux/i2c-dev.h index ee6ddba913bb..84bede1ed6ac 100644 --- a/include/linux/i2c-dev.h +++ b/include/linux/i2c-dev.h @@ -21,9 +21,8 @@ /* $Id: i2c-dev.h,v 1.11 2002/07/07 15:42:47 mds Exp $ */ -#ifndef I2C_DEV_H -#define I2C_DEV_H - +#ifndef _LINUX_I2C_DEV_H +#define _LINUX_I2C_DEV_H #include <linux/types.h> #include <linux/i2c.h> @@ -45,174 +44,4 @@ struct i2c_rdwr_ioctl_data { int nmsgs; /* number of i2c_msgs */ }; -#ifndef __KERNEL__ - -#include <sys/ioctl.h> - -static inline __s32 i2c_smbus_access(int file, char read_write, __u8 command, - int size, union i2c_smbus_data *data) -{ - struct i2c_smbus_ioctl_data args; - - args.read_write = read_write; - args.command = command; - args.size = size; - args.data = data; - return ioctl(file,I2C_SMBUS,&args); -} - - -static inline __s32 i2c_smbus_write_quick(int file, __u8 value) -{ - return i2c_smbus_access(file,value,0,I2C_SMBUS_QUICK,NULL); -} - -static inline __s32 i2c_smbus_read_byte(int file) -{ - union i2c_smbus_data data; - if (i2c_smbus_access(file,I2C_SMBUS_READ,0,I2C_SMBUS_BYTE,&data)) - return -1; - else - return 0x0FF & data.byte; -} - -static inline __s32 i2c_smbus_write_byte(int file, __u8 value) -{ - return i2c_smbus_access(file,I2C_SMBUS_WRITE,value, - I2C_SMBUS_BYTE,NULL); -} - -static inline __s32 i2c_smbus_read_byte_data(int file, __u8 command) -{ - union i2c_smbus_data data; - if (i2c_smbus_access(file,I2C_SMBUS_READ,command, - I2C_SMBUS_BYTE_DATA,&data)) - return -1; - else - return 0x0FF & data.byte; -} - -static inline __s32 i2c_smbus_write_byte_data(int file, __u8 command, - __u8 value) -{ - union i2c_smbus_data data; - data.byte = value; - return i2c_smbus_access(file,I2C_SMBUS_WRITE,command, - I2C_SMBUS_BYTE_DATA, &data); -} - -static inline __s32 i2c_smbus_read_word_data(int file, __u8 command) -{ - union i2c_smbus_data data; - if (i2c_smbus_access(file,I2C_SMBUS_READ,command, - I2C_SMBUS_WORD_DATA,&data)) - return -1; - else - return 0x0FFFF & data.word; -} - -static inline __s32 i2c_smbus_write_word_data(int file, __u8 command, - __u16 value) -{ - union i2c_smbus_data data; - data.word = value; - return i2c_smbus_access(file,I2C_SMBUS_WRITE,command, - I2C_SMBUS_WORD_DATA, &data); -} - -static inline __s32 i2c_smbus_process_call(int file, __u8 command, __u16 value) -{ - union i2c_smbus_data data; - data.word = value; - if (i2c_smbus_access(file,I2C_SMBUS_WRITE,command, - I2C_SMBUS_PROC_CALL,&data)) - return -1; - else - return 0x0FFFF & data.word; -} - - -/* Returns the number of read bytes */ -static inline __s32 i2c_smbus_read_block_data(int file, __u8 command, - __u8 *values) -{ - union i2c_smbus_data data; - int i; - if (i2c_smbus_access(file,I2C_SMBUS_READ,command, - I2C_SMBUS_BLOCK_DATA,&data)) - return -1; - else { - for (i = 1; i <= data.block[0]; i++) - values[i-1] = data.block[i]; - return data.block[0]; - } -} - -static inline __s32 i2c_smbus_write_block_data(int file, __u8 command, - __u8 length, __u8 *values) -{ - union i2c_smbus_data data; - int i; - if (length > 32) - length = 32; - for (i = 1; i <= length; i++) - data.block[i] = values[i-1]; - data.block[0] = length; - return i2c_smbus_access(file,I2C_SMBUS_WRITE,command, - I2C_SMBUS_BLOCK_DATA, &data); -} - -/* Returns the number of read bytes */ -static inline __s32 i2c_smbus_read_i2c_block_data(int file, __u8 command, - __u8 *values) -{ - union i2c_smbus_data data; - int i; - if (i2c_smbus_access(file,I2C_SMBUS_READ,command, - I2C_SMBUS_I2C_BLOCK_DATA,&data)) - return -1; - else { - for (i = 1; i <= data.block[0]; i++) - values[i-1] = data.block[i]; - return data.block[0]; - } -} - -static inline __s32 i2c_smbus_write_i2c_block_data(int file, __u8 command, - __u8 length, __u8 *values) -{ - union i2c_smbus_data data; - int i; - if (length > 32) - length = 32; - for (i = 1; i <= length; i++) - data.block[i] = values[i-1]; - data.block[0] = length; - return i2c_smbus_access(file,I2C_SMBUS_WRITE,command, - I2C_SMBUS_I2C_BLOCK_DATA, &data); -} - -/* Returns the number of read bytes */ -static inline __s32 i2c_smbus_block_process_call(int file, __u8 command, - __u8 length, __u8 *values) -{ - union i2c_smbus_data data; - int i; - if (length > 32) - length = 32; - for (i = 1; i <= length; i++) - data.block[i] = values[i-1]; - data.block[0] = length; - if (i2c_smbus_access(file,I2C_SMBUS_WRITE,command, - I2C_SMBUS_BLOCK_PROC_CALL,&data)) - return -1; - else { - for (i = 1; i <= data.block[0]; i++) - values[i-1] = data.block[i]; - return data.block[0]; - } -} - -#endif /* ndef __KERNEL__ */ - -#endif +#endif /* _LINUX_I2C_DEV_H */ diff --git a/include/linux/i2c-elektor.h b/include/linux/i2c-elektor.h deleted file mode 100644 index 7c9213175892..000000000000 --- a/include/linux/i2c-elektor.h +++ /dev/null @@ -1,47 +0,0 @@ -/* ------------------------------------------------------------------------- */ -/* i2c-elektor.c i2c-hw access for PCF8584 style isa bus adaptes */ -/* ------------------------------------------------------------------------- */ -/* Copyright (C) 1995-97 Simon G. Vogl - 1998-99 Hans Berglund - - 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; either version 2 of the License, or - (at your option) any later version. - - 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., 675 Mass Ave, Cambridge, MA 02139, USA. */ -/* ------------------------------------------------------------------------- */ - -/* With some changes from Kyösti Mälkki <kmalkki@cc.hut.fi> and even - Frodo Looijaard <frodol@dds.nl> */ - -/* $Id: i2c-elektor.h,v 1.5 2001/06/05 01:46:33 mds Exp $ */ - -#ifndef I2C_PCF_ELEKTOR_H -#define I2C_PCF_ELEKTOR_H 1 - -/* - * This struct contains the hw-dependent functions of PCF8584 adapters to - * manipulate the registers, and to init any hw-specific features. - * vdovikin: removed: this module in real supports only one device, - * due to missing arguments in some functions, called from the algo-pcf module. - * Sometimes it's need to be rewriten - - * but for now just remove this for simpler reading */ - -/* -struct i2c_pcf_isa { - int pi_base; - int pi_irq; - int pi_clock; - int pi_own; -}; -*/ - -#endif /* PCF_ELEKTOR_H */ diff --git a/include/linux/i2c-id.h b/include/linux/i2c-id.h index 2b6394004ea1..0061776f0402 100644 --- a/include/linux/i2c-id.h +++ b/include/linux/i2c-id.h @@ -145,6 +145,8 @@ #define I2C_DRIVERID_LM92 1033 #define I2C_DRIVERID_VT8231 1034 #define I2C_DRIVERID_SMARTBATT 1035 +#define I2C_DRIVERID_BMCSENSORS 1036 +#define I2C_DRIVERID_FS451 1037 /* * ---- Adapter types ---------------------------------------------------- @@ -164,6 +166,8 @@ #define I2C_ALGO_IIC 0x080000 /* ITE IIC bus */ #define I2C_ALGO_SAA7134 0x090000 #define I2C_ALGO_MPC824X 0x0a0000 /* Motorola 8240 / 8245 */ +#define I2C_ALGO_IPMI 0x0b0000 /* IPMI dummy adapter */ +#define I2C_ALGO_IPMB 0x0c0000 /* IPMB adapter */ #define I2C_ALGO_EC 0x100000 /* ACPI embedded controller */ #define I2C_ALGO_MPC8XX 0x110000 /* MPC8xx PowerPC I2C algorithm */ @@ -196,6 +200,7 @@ #define I2C_HW_B_VOO 0x0b /* 3dfx Voodoo 3 / Banshee */ #define I2C_HW_B_PPORT 0x0c /* Primitive parallel port adapter */ #define I2C_HW_B_SAVG 0x0d /* Savage 4 */ +#define I2C_HW_B_SCX200 0x0e /* Nat'l Semi SCx200 I2C */ #define I2C_HW_B_RIVA 0x10 /* Riva based graphics cards */ #define I2C_HW_B_IOC 0x11 /* IOC bit-wiggling */ #define I2C_HW_B_TSUNA 0x12 /* DEC Tsunami chipset */ @@ -234,8 +239,15 @@ #define I2C_HW_SMBUS_SIS630 0x08 #define I2C_HW_SMBUS_SIS645 0x09 #define I2C_HW_SMBUS_AMD8111 0x0a +#define I2C_HW_SMBUS_SCX200 0x0b /* --- ISA pseudo-adapter */ #define I2C_HW_ISA 0x00 +/* --- IPMI pseudo-adapter */ +#define I2C_HW_IPMI 0x00 + +/* --- IPMB adapter */ +#define I2C_HW_IPMB 0x00 + #endif /* I2C_ID_H */ diff --git a/include/linux/i2c.h b/include/linux/i2c.h index ab69e01bc8c3..c176ca672cc7 100644 --- a/include/linux/i2c.h +++ b/include/linux/i2c.h @@ -25,31 +25,17 @@ /* $Id: i2c.h,v 1.59 2002/07/19 20:53:45 phil Exp $ */ -#ifndef I2C_H -#define I2C_H +#ifndef _LINUX_I2C_H +#define _LINUX_I2C_H #define I2C_DATE "20020719" #define I2C_VERSION "2.6.4" #include <linux/i2c-id.h> /* id values of adapters et. al. */ #include <linux/types.h> - - -struct i2c_msg; - - -#ifdef __KERNEL__ - -/* --- Includes and compatibility declarations ------------------------ */ - -#include <linux/version.h> -#ifndef KERNEL_VERSION -#define KERNEL_VERSION(a,b,c) (((a) << 16) | ((b) << 8) | (c)) -#endif - -#include <asm/page.h> /* for 2.2.xx */ -#include <asm/semaphore.h> #include <linux/config.h> +#include <asm/semaphore.h> + /* --- General options ------------------------------------------------ */ @@ -59,6 +45,7 @@ struct i2c_msg; #define I2C_CLIENT_MAX 32 #define I2C_DUMMY_MAX 4 +struct i2c_msg; struct i2c_algorithm; struct i2c_adapter; struct i2c_client; @@ -132,6 +119,7 @@ extern s32 i2c_smbus_write_i2c_block_data(struct i2c_client * client, */ struct i2c_driver { + struct module *owner; char name[32]; int id; unsigned int flags; /* div., see below */ @@ -155,18 +143,6 @@ struct i2c_driver { * with the device. */ int (*command)(struct i2c_client *client,unsigned int cmd, void *arg); - - /* These two are mainly used for bookkeeping & dynamic unloading of - * kernel modules. inc_use tells the driver that a client is being - * used by another module & that it should increase its ref. counter. - * dec_use is the inverse operation. - * NB: Make sure you have no circular dependencies, or else you get a - * deadlock when trying to unload the modules. - * You should use the i2c_{inc,dec}_use_client functions instead of - * calling this function directly. - */ - void (*inc_use)(struct i2c_client *client); - void (*dec_use)(struct i2c_client *client); }; /* @@ -223,25 +199,18 @@ struct i2c_algorithm { u32 (*functionality) (struct i2c_adapter *); }; -#if LINUX_VERSION_CODE < KERNEL_VERSION(2,1,29) -struct proc_dir_entry; -#endif - /* * i2c_adapter is the structure used to identify a physical i2c bus along * with the access algorithms necessary to access it. */ struct i2c_adapter { + struct module *owner; char name[32]; /* some useful name to identify the adapter */ unsigned int id;/* == is algo->id | hwdep.struct->id, */ /* for registered values see below */ struct i2c_algorithm *algo;/* the algorithm to access the bus */ void *algo_data; - /* --- These may be NULL, but should increase the module use count */ - void (*inc_use)(struct i2c_adapter *); - void (*dec_use)(struct i2c_adapter *); - /* --- administration stuff. */ int (*client_register)(struct i2c_client *); int (*client_unregister)(struct i2c_client *); @@ -264,9 +233,6 @@ struct i2c_adapter { #ifdef CONFIG_PROC_FS /* No need to set this when you initialize the adapter */ int inode; -#if LINUX_VERSION_CODE < KERNEL_VERSION(2,1,29) - struct proc_dir_entry *proc_entry; -#endif #endif /* def CONFIG_PROC_FS */ }; @@ -319,12 +285,6 @@ extern int i2c_del_driver(struct i2c_driver *); extern int i2c_attach_client(struct i2c_client *); extern int i2c_detach_client(struct i2c_client *); -/* Only call these if you grab a resource that makes unloading the - client and the adapter it is on completely impossible. Like when a - /proc directory is entered. */ -extern void i2c_inc_use_client(struct i2c_client *); -extern void i2c_dec_use_client(struct i2c_client *); - /* New function: This is to get an i2c_client-struct for controlling the client either by using i2c_control-function or having the client-module export functions that can be used with the i2c_client @@ -375,8 +335,6 @@ extern u32 i2c_get_functionality (struct i2c_adapter *adap); /* Return 1 if adapter supports everything we need, 0 if not. */ extern int i2c_check_functionality (struct i2c_adapter *adap, u32 func); -#endif /* __KERNEL__ */ - /* * I2C Message - used for pure i2c transaction, also from /dev interface */ @@ -387,6 +345,8 @@ struct i2c_msg { #define I2C_M_RD 0x01 #define I2C_M_NOSTART 0x4000 #define I2C_M_REV_DIR_ADDR 0x2000 +#define I2C_M_IGNORE_NAK 0x1000 +#define I2C_M_NO_RD_ACK 0x0800 short len; /* msg length */ char *buf; /* pointer to msg data */ }; @@ -395,7 +355,7 @@ struct i2c_msg { #define I2C_FUNC_I2C 0x00000001 #define I2C_FUNC_10BIT_ADDR 0x00000002 -#define I2C_FUNC_PROTOCOL_MANGLING 0x00000004 /* I2C_M_{REV_DIR_ADDR,NOSTART} */ +#define I2C_FUNC_PROTOCOL_MANGLING 0x00000004 /* I2C_M_{REV_DIR_ADDR,NOSTART,..} */ #define I2C_FUNC_SMBUS_HWPEC_CALC 0x00000008 /* SMBus 2.0 */ #define I2C_FUNC_SMBUS_READ_WORD_DATA_PEC 0x00000800 /* SMBus 2.0 */ #define I2C_FUNC_SMBUS_WRITE_WORD_DATA_PEC 0x00001000 /* SMBus 2.0 */ @@ -524,8 +484,6 @@ union i2c_smbus_data { #define I2C_MAJOR 89 /* Device major number */ -#ifdef __KERNEL__ - # ifndef NULL # define NULL ( (void *) 0 ) # endif @@ -595,5 +553,4 @@ union i2c_smbus_data { #define i2c_is_isa_adapter(adapptr) \ ((adapptr)->algo->id == I2C_ALGO_ISA) -#endif /* def __KERNEL__ */ -#endif /* I2C_H */ +#endif /* _LINUX_I2C_H */ diff --git a/include/linux/isapnp.h b/include/linux/isapnp.h index 7008adef1677..3e03c39fbc40 100644 --- a/include/linux/isapnp.h +++ b/include/linux/isapnp.h @@ -24,6 +24,7 @@ #include <linux/config.h> #include <linux/errno.h> +#include <linux/pnp.h> /* * Configuration registers (TODO: change by specification) @@ -54,79 +55,7 @@ #ifdef __KERNEL__ -#include <linux/pci.h> - -#define ISAPNP_PORT_FLAG_16BITADDR (1<<0) -#define ISAPNP_PORT_FLAG_FIXED (1<<1) - -struct isapnp_port { - unsigned short min; /* min base number */ - unsigned short max; /* max base number */ - unsigned char align; /* align boundary */ - unsigned char size; /* size of range */ - unsigned char flags; /* port flags */ - unsigned char pad; /* pad */ - struct isapnp_resources *res; /* parent */ - struct isapnp_port *next; /* next port */ -}; - -struct isapnp_irq { - unsigned short map; /* bitmaks for IRQ lines */ - unsigned char flags; /* IRQ flags */ - unsigned char pad; /* pad */ - struct isapnp_resources *res; /* parent */ - struct isapnp_irq *next; /* next IRQ */ -}; - -struct isapnp_dma { - unsigned char map; /* bitmask for DMA channels */ - unsigned char flags; /* DMA flags */ - struct isapnp_resources *res; /* parent */ - struct isapnp_dma *next; /* next port */ -}; - -struct isapnp_mem { - unsigned int min; /* min base number */ - unsigned int max; /* max base number */ - unsigned int align; /* align boundary */ - unsigned int size; /* size of range */ - unsigned char flags; /* memory flags */ - unsigned char pad; /* pad */ - struct isapnp_resources *res; /* parent */ - struct isapnp_mem *next; /* next memory resource */ -}; - -struct isapnp_mem32 { - /* TODO */ - unsigned char data[17]; - struct isapnp_resources *res; /* parent */ - struct isapnp_mem32 *next; /* next 32-bit memory resource */ -}; - -struct isapnp_fixup { - unsigned short vendor; /* matching vendor */ - unsigned short device; /* matching device */ - void (*quirk_function)(struct pci_dev *dev); /* fixup function */ -}; - - -#define ISAPNP_RES_PRIORITY_PREFERRED 0 -#define ISAPNP_RES_PRIORITY_ACCEPTABLE 1 -#define ISAPNP_RES_PRIORITY_FUNCTIONAL 2 -#define ISAPNP_RES_PRIORITY_INVALID 65535 - -struct isapnp_resources { - unsigned short priority; /* priority */ - unsigned short dependent; /* dependent resources */ - struct isapnp_port *port; /* first port */ - struct isapnp_irq *irq; /* first IRQ */ - struct isapnp_dma *dma; /* first DMA */ - struct isapnp_mem *mem; /* first memory resource */ - struct isapnp_mem32 *mem32; /* first 32-bit memory */ - struct pci_dev *dev; /* parent */ - struct isapnp_resources *alt; /* alternative resource (aka dependent resources) */ - struct isapnp_resources *next; /* next resource */ -}; +#define DEVICE_COUNT_COMPATIBLE 4 #define ISAPNP_ANY_ID 0xffff #define ISAPNP_CARD_DEVS 8 @@ -162,14 +91,6 @@ struct isapnp_device_id { unsigned long driver_data; /* data private to the driver */ }; -struct isapnp_driver { - struct list_head node; - char *name; - const struct isapnp_device_id *id_table; /* NULL if wants all devices */ - int (*probe) (struct pci_dev *dev, const struct isapnp_device_id *id); /* New device inserted */ - void (*remove) (struct pci_dev *dev); /* Device removed (NULL if not a hot-plug capable driver) */ -}; - #if defined(CONFIG_ISAPNP) || (defined(CONFIG_ISAPNP_MODULE) && defined(MODULE)) #define __ISAPNP__ @@ -188,7 +109,6 @@ void isapnp_wake(unsigned char csn); void isapnp_device(unsigned char device); void isapnp_activate(unsigned char device); void isapnp_deactivate(unsigned char device); -void isapnp_fixup_device(struct pci_dev *dev); void *isapnp_alloc(long size); #ifdef CONFIG_PROC_FS @@ -199,40 +119,8 @@ static inline isapnp_proc_init(void) { return 0; } static inline isapnp_proc_done(void) { return 0; } #endif -/* misc */ -void isapnp_resource_change(struct resource *resource, - unsigned long start, - unsigned long size); /* init/main.c */ int isapnp_init(void); -/* manager */ -static inline struct pci_bus *isapnp_find_card(unsigned short vendor, - unsigned short device, - struct pci_bus *from) { return NULL; } -static inline struct pci_dev *isapnp_find_dev(struct pci_bus *card, - unsigned short vendor, - unsigned short function, - struct pci_dev *from) { return NULL; } -static inline int isapnp_probe_cards(const struct isapnp_card_id *ids, - int (*probe)(struct pci_bus *card, - const struct isapnp_card_id *id)) { return -ENODEV; } -static inline int isapnp_probe_devs(const struct isapnp_device_id *ids, - int (*probe)(struct pci_dev *dev, - const struct isapnp_device_id *id)) { return -ENODEV; } -static inline int isapnp_activate_dev(struct pci_dev *dev, const char *name) { return -ENODEV; } - -static inline int isapnp_register_driver(struct isapnp_driver *drv) { return 0; } - -static inline void isapnp_unregister_driver(struct isapnp_driver *drv) { } - -extern struct list_head isapnp_cards; -extern struct list_head isapnp_devices; -extern struct pnp_protocol isapnp_protocol; - -#define isapnp_for_each_card(card) \ - for(card = to_pnp_card(isapnp_cards.next); card != to_pnp_card(&isapnp_cards); card = to_pnp_card(card->node.next)) -#define isapnp_for_each_dev(dev) \ - for(dev = protocol_to_pnp_dev(isapnp_protocol.devices.next); dev != protocol_to_pnp_dev(&isapnp_protocol.devices); dev = protocol_to_pnp_dev(dev->dev_list.next)) #else /* !CONFIG_ISAPNP */ @@ -250,28 +138,6 @@ static inline void isapnp_wake(unsigned char csn) { ; } static inline void isapnp_device(unsigned char device) { ; } static inline void isapnp_activate(unsigned char device) { ; } static inline void isapnp_deactivate(unsigned char device) { ; } -/* manager */ -static inline struct pci_bus *isapnp_find_card(unsigned short vendor, - unsigned short device, - struct pci_bus *from) { return NULL; } -static inline struct pci_dev *isapnp_find_dev(struct pci_bus *card, - unsigned short vendor, - unsigned short function, - struct pci_dev *from) { return NULL; } -static inline int isapnp_probe_cards(const struct isapnp_card_id *ids, - int (*probe)(struct pci_bus *card, - const struct isapnp_card_id *id)) { return -ENODEV; } -static inline int isapnp_probe_devs(const struct isapnp_device_id *ids, - int (*probe)(struct pci_dev *dev, - const struct isapnp_device_id *id)) { return -ENODEV; } -static inline void isapnp_resource_change(struct resource *resource, - unsigned long start, - unsigned long size) { ; } -static inline int isapnp_activate_dev(struct pci_dev *dev, const char *name) { return -ENODEV; } - -static inline int isapnp_register_driver(struct isapnp_driver *drv) { return 0; } - -static inline void isapnp_unregister_driver(struct isapnp_driver *drv) { } #endif /* CONFIG_ISAPNP */ diff --git a/include/linux/kernel.h b/include/linux/kernel.h index f3cadd9416ad..9cb6277f5b86 100644 --- a/include/linux/kernel.h +++ b/include/linux/kernel.h @@ -28,6 +28,7 @@ #define STACK_MAGIC 0xdeadbeef #define ARRAY_SIZE(x) (sizeof(x) / sizeof((x)[0])) +#define ALIGN(x,a) (((x)+(a)-1)&~((a)-1)) #define KERN_EMERG "<0>" /* system is unusable */ #define KERN_ALERT "<1>" /* action must be taken immediately */ diff --git a/include/linux/mc146818rtc.h b/include/linux/mc146818rtc.h index 2ec35699a8e8..cde7dbae375e 100644 --- a/include/linux/mc146818rtc.h +++ b/include/linux/mc146818rtc.h @@ -87,15 +87,4 @@ extern spinlock_t rtc_lock; /* serialize CMOS RAM access */ # define RTC_VRT 0x80 /* valid RAM and time */ /**********************************************************************/ -/* example: !(CMOS_READ(RTC_CONTROL) & RTC_DM_BINARY) - * determines if the following two #defines are needed - */ -#ifndef BCD_TO_BIN -#define BCD_TO_BIN(val) ((val)=((val)&15) + ((val)>>4)*10) -#endif - -#ifndef BIN_TO_BCD -#define BIN_TO_BCD(val) ((val)=(((val)/10)<<4) + (val)%10) -#endif - #endif /* _MC146818RTC_H */ diff --git a/include/linux/mm.h b/include/linux/mm.h index df49cb472866..70177c796b12 100644 --- a/include/linux/mm.h +++ b/include/linux/mm.h @@ -41,6 +41,9 @@ extern int page_cluster; * per VM-area/task. A VM area is any part of the process virtual memory * space that has a special rule for the page-fault handlers (ie a shared * library, the executable area etc). + * + * This structure is exactly 64 bytes on ia32. Please think very, very hard + * before adding anything to it. */ struct vm_area_struct { struct mm_struct * vm_mm; /* The address space we belong to. */ diff --git a/include/linux/module.h b/include/linux/module.h index 3a411c8c6575..8e1954a89913 100644 --- a/include/linux/module.h +++ b/include/linux/module.h @@ -285,7 +285,9 @@ static inline const char *module_address_lookup(unsigned long addr, } #endif /* CONFIG_MODULES */ -#if defined(MODULE) && defined(KBUILD_MODNAME) +#ifdef MODULE +extern struct module __this_module; +#ifdef KBUILD_MODNAME /* We make the linker do some of the work. */ struct module __this_module __attribute__((section(".gnu.linkonce.this_module"))) = { @@ -296,7 +298,8 @@ __attribute__((section(".gnu.linkonce.this_module"))) = { .exit = cleanup_module, #endif }; -#endif /* MODULE && KBUILD_MODNAME */ +#endif /* KBUILD_MODNAME */ +#endif /* MODULE */ /* For archs to search exception tables */ extern struct list_head extables; @@ -354,7 +357,6 @@ static inline void __deprecated _MOD_INC_USE_COUNT(struct module *module) _MOD_INC_USE_COUNT(THIS_MODULE) #define MOD_DEC_USE_COUNT \ __MOD_DEC_USE_COUNT(THIS_MODULE) -#define try_inc_mod_count(mod) try_module_get(mod) #define EXPORT_NO_SYMBOLS extern int module_dummy_usage; #define GET_USE_COUNT(module) (module_dummy_usage) diff --git a/include/linux/mtd/mtd.h b/include/linux/mtd/mtd.h index 52d38241e91e..503a715fe014 100644 --- a/include/linux/mtd/mtd.h +++ b/include/linux/mtd/mtd.h @@ -215,10 +215,8 @@ static inline struct mtd_info *get_mtd_device(struct mtd_info *mtd, int num) struct mtd_info *ret; ret = __get_mtd_device(mtd, num); - - if (ret && ret->module && !try_inc_mod_count(ret->module)) + if (ret && !try_module_get(ret->module)) return NULL; - return ret; } @@ -227,7 +225,6 @@ static inline void put_mtd_device(struct mtd_info *mtd) module_put(mtd->module); } - struct mtd_notifier { void (*add)(struct mtd_info *mtd); void (*remove)(struct mtd_info *mtd); diff --git a/include/linux/pci.h b/include/linux/pci.h index 9d4e269ac1db..553864c6a5fb 100644 --- a/include/linux/pci.h +++ b/include/linux/pci.h @@ -362,7 +362,7 @@ enum pci_mmap_state { #define PCI_ANY_ID (~0) /* - * The pci_dev structure is used to describe both PCI and ISAPnP devices. + * The pci_dev structure is used to describe PCI devices. */ struct pci_dev { struct list_head global_list; /* node in list of all PCI devices */ @@ -410,16 +410,9 @@ struct pci_dev { struct resource irq_resource[DEVICE_COUNT_IRQ]; char slot_name[8]; /* slot name */ - int active; /* ISAPnP: device is active */ - int ro; /* ISAPnP: read only */ - unsigned short regs; /* ISAPnP: supported registers */ /* These fields are used by common fixups */ - unsigned short transparent:1; /* Transparent PCI bridge */ - - int (*prepare)(struct pci_dev *dev); /* ISAPnP hooks */ - int (*activate)(struct pci_dev *dev); - int (*deactivate)(struct pci_dev *dev); + unsigned int transparent:1; /* Transparent PCI bridge */ }; #define pci_dev_g(n) list_entry(n, struct pci_dev, global_list) @@ -463,13 +456,7 @@ struct pci_bus { unsigned char subordinate; /* max number of subordinate buses */ char name[48]; - unsigned short vendor; - unsigned short device; - unsigned int serial; /* serial number */ - unsigned char pnpver; /* Plug & Play version */ - unsigned char productver; /* product version */ - unsigned char checksum; /* if zero - checksum passed */ - unsigned char pad1; + struct device * dev; }; diff --git a/include/linux/percpu.h b/include/linux/percpu.h index a79d04de4fd5..74c3d9786874 100644 --- a/include/linux/percpu.h +++ b/include/linux/percpu.h @@ -1,10 +1,71 @@ #ifndef __LINUX_PERCPU_H #define __LINUX_PERCPU_H #include <linux/spinlock.h> /* For preempt_disable() */ +#include <linux/slab.h> /* For kmalloc_percpu() */ #include <asm/percpu.h> /* Must be an lvalue. */ #define get_cpu_var(var) (*({ preempt_disable(); &__get_cpu_var(var); })) #define put_cpu_var(var) preempt_enable() +#ifdef CONFIG_SMP + +struct percpu_data { + void *ptrs[NR_CPUS]; + void *blkp; +}; + +/* + * Use this to get to a cpu's version of the per-cpu object allocated using + * kmalloc_percpu. If you want to get "this cpu's version", maybe you want + * to use get_cpu_ptr... + */ +#define per_cpu_ptr(ptr, cpu) \ +({ \ + struct percpu_data *__p = (struct percpu_data *)~(unsigned long)(ptr); \ + (__typeof__(ptr))__p->ptrs[(cpu)]; \ +}) + +extern void *kmalloc_percpu(size_t size, int flags); +extern void kfree_percpu(const void *); +extern void kmalloc_percpu_init(void); + +#else /* CONFIG_SMP */ + +#define per_cpu_ptr(ptr, cpu) (ptr) + +static inline void *kmalloc_percpu(size_t size, int flags) +{ + return(kmalloc(size, flags)); +} +static inline void kfree_percpu(const void *ptr) +{ + kfree(ptr); +} +static inline void kmalloc_percpu_init(void) { } + +#endif /* CONFIG_SMP */ + +/* + * Use these with kmalloc_percpu. If + * 1. You want to operate on memory allocated by kmalloc_percpu (dereference + * and read/modify/write) AND + * 2. You want "this cpu's version" of the object AND + * 3. You want to do this safely since: + * a. On multiprocessors, you don't want to switch between cpus after + * you've read the current processor id due to preemption -- this would + * take away the implicit advantage to not have any kind of traditional + * serialization for per-cpu data + * b. On uniprocessors, you don't want another kernel thread messing + * up with the same per-cpu data due to preemption + * + * So, Use get_cpu_ptr to disable preemption and get pointer to the + * local cpu version of the per-cpu object. Use put_cpu_ptr to enable + * preemption. Operations on per-cpu data between get_ and put_ is + * then considered to be safe. And ofcourse, "Thou shalt not sleep between + * get_cpu_ptr and put_cpu_ptr" + */ +#define get_cpu_ptr(ptr) per_cpu_ptr(ptr, get_cpu()) +#define put_cpu_ptr(ptr) put_cpu() + #endif /* __LINUX_PERCPU_H */ diff --git a/include/linux/pnp.h b/include/linux/pnp.h index d666c6a92b9f..7d4e9fd6ae0e 100644 --- a/include/linux/pnp.h +++ b/include/linux/pnp.h @@ -26,6 +26,7 @@ struct pnp_resource; struct pnp_protocol; struct pnp_id; +struct pnp_cfg; struct pnp_card { char name[80]; @@ -50,11 +51,15 @@ struct pnp_card { #define global_to_pnp_card(n) list_entry(n, struct pnp_card, global_list) #define protocol_to_pnp_card(n) list_entry(n, struct pnp_card, protocol_list) -#define to_pnp_card(n) list_entry(n, struct pnp_card, dev) +#define to_pnp_card(n) container_of(n, struct pnp_card, dev) #define pnp_for_each_card(card) \ - for(dev = global_to_pnp_card(pnp_cards.next); \ - dev != global_to_pnp_card(&cards); \ - dev = global_to_pnp_card(card>global_list.next)) + for((card) = global_to_pnp_card(pnp_cards.next); \ + (card) != global_to_pnp_card(&pnp_cards); \ + (card) = global_to_pnp_card((card)->global_list.next)) +#define pnp_card_for_each_dev(card,dev) \ + for((dev) = card_to_pnp_dev((card)->devices.next); \ + (dev) != card_to_pnp_dev(&(card)->devices); \ + (dev) = card_to_pnp_dev((dev)->card_list.next)) static inline void *pnpc_get_drvdata (struct pnp_card *pcard) { @@ -79,7 +84,6 @@ static inline void pnpc_set_protodata (struct pnp_card *pcard, void *data) struct pnp_dev { char name[80]; /* device name */ int active; /* status of the device */ - int ro; /* read only */ struct list_head global_list; /* node in global list of devices */ struct list_head protocol_list; /* node in list of device's protocol */ struct list_head card_list; /* node in card's list of devices */ @@ -93,6 +97,7 @@ struct pnp_dev { unsigned short regs; /* ISAPnP: supported registers */ struct pnp_resources *res; /* possible resource information */ + int lock_resources; /* resources are locked */ struct resource resource[DEVICE_COUNT_RESOURCE]; /* I/O and memory regions + expansion ROMs */ struct resource dma_resource[DEVICE_COUNT_DMA]; struct resource irq_resource[DEVICE_COUNT_IRQ]; @@ -112,6 +117,13 @@ struct pnp_dev { dev != global_to_pnp_dev(&pnp_global); \ dev = global_to_pnp_dev(dev->global_list.next)) +static inline int pnp_dev_has_driver(struct pnp_dev *pdev) +{ + if (pdev->driver || (pdev->card && pdev->card->driver)) + return 1; + return 0; +} + static inline void *pnp_get_drvdata (struct pnp_dev *pdev) { return dev_get_drvdata(&pdev->dev); @@ -160,10 +172,13 @@ struct pnp_card_id { } devs[MAX_DEVICES]; /* logical devices */ }; +#define PNP_DRIVER_DO_NOT_ACTIVATE (1<<0) + struct pnp_driver { struct list_head node; char *name; const struct pnp_device_id *id_table; + unsigned int flags; int (*probe) (struct pnp_dev *dev, const struct pnp_device_id *dev_id); void (*remove) (struct pnp_dev *dev); struct device_driver driver; @@ -171,10 +186,13 @@ struct pnp_driver { #define to_pnp_driver(drv) container_of(drv,struct pnp_driver, driver) +#define PNPC_DRIVER_DO_NOT_ACTIVATE (1<<0) + struct pnpc_driver { struct list_head node; char *name; const struct pnp_card_id *id_table; + unsigned int flags; int (*probe) (struct pnp_card *card, const struct pnp_card_id *card_id); void (*remove) (struct pnp_card *card); struct device_driver driver; @@ -279,6 +297,12 @@ struct pnp_resources { struct pnp_resources *dep; /* dependent resources */ }; +struct pnp_res_cfg { + struct resource resource[DEVICE_COUNT_RESOURCE]; /* I/O and memory regions + expansion ROMs */ + struct resource dma_resource[DEVICE_COUNT_DMA]; + struct resource irq_resource[DEVICE_COUNT_IRQ]; +}; + #define PNP_DYNAMIC 0 /* get or set current resource */ #define PNP_STATIC 1 /* get or set resource for next boot */ @@ -287,7 +311,7 @@ struct pnp_cfg { struct pnp_irq *irq[2]; struct pnp_dma *dma[2]; struct pnp_mem *mem[4]; - struct pnp_dev request; + struct pnp_res_cfg request; }; @@ -340,9 +364,11 @@ int pnp_add_dma_resource(struct pnp_dev *dev, int depnum, struct pnp_dma *data); int pnp_add_port_resource(struct pnp_dev *dev, int depnum, struct pnp_port *data); int pnp_add_mem_resource(struct pnp_dev *dev, int depnum, struct pnp_mem *data); int pnp_add_mem32_resource(struct pnp_dev *dev, int depnum, struct pnp_mem32 *data); -int pnp_activate_dev(struct pnp_dev *dev); +int pnp_init_res_cfg(struct pnp_res_cfg *template); +int pnp_activate_dev(struct pnp_dev *dev, struct pnp_res_cfg *template); int pnp_disable_dev(struct pnp_dev *dev); -int pnp_raw_set_dev(struct pnp_dev *dev, int depnum, int mode); +int pnp_raw_set_dev(struct pnp_dev *dev, int depnum, struct pnp_res_cfg *template, int mode); +void pnp_resource_change(struct resource *resource, unsigned long start, unsigned long size); /* driver */ int compare_pnp_id(struct pnp_id * pos, const char * id); @@ -366,9 +392,10 @@ static inline int pnp_add_dma_resource(struct pnp_dev *dev, int depnum, struct p static inline int pnp_add_port_resource(struct pnp_dev *dev, int depnum, struct pnp_irq *data) { return -ENODEV; } static inline int pnp_add_mem_resource(struct pnp_dev *dev, int depnum, struct pnp_irq *data) { return -ENODEV; } static inline int pnp_add_mem32_resource(struct pnp_dev *dev, int depnum, struct pnp_irq *data) { return -ENODEV; } -static inline int pnp_activate_dev(struct pnp_dev *dev) { return -ENODEV; } +static inline int pnp_init_res_cfg(struct pnp_res_cfg *template) { return -ENODEV; } +static inline int pnp_activate_dev(struct pnp_dev *dev, struct pnp_res_cfg *template) { return -ENODEV; } static inline int pnp_disable_dev(struct pnp_dev *dev) { return -ENODEV; } -static inline int pnp_raw_set_dev(struct pnp_dev *dev, int depnum, int mode) { return -ENODEV; } +static inline int pnp_raw_set_dev(struct pnp_dev *dev, int depnum, struct pnp_res_cfg *template, int mode) { return -ENODEV; } static inline int compare_pnp_id(struct list_head * id_list, const char * id) { return -ENODEV; } static inline int pnp_add_id(struct pnp_id *id, struct pnp_dev *dev) { return -ENODEV; } static inline int pnp_register_driver(struct pnp_driver *drv) { return -ENODEV; } diff --git a/include/linux/sched.h b/include/linux/sched.h index 7c3bbfc255ed..9545a1957089 100644 --- a/include/linux/sched.h +++ b/include/linux/sched.h @@ -343,7 +343,6 @@ struct task_struct { unsigned long start_time; /* mm fault and swap info: this can arguably be seen as either mm-specific or thread-specific */ unsigned long min_flt, maj_flt, nswap, cmin_flt, cmaj_flt, cnswap; - int swappable:1; /* process credentials */ uid_t uid,euid,suid,fsuid; gid_t gid,egid,sgid,fsgid; diff --git a/include/linux/sensors.h b/include/linux/sensors.h deleted file mode 100644 index 31998faab1e6..000000000000 --- a/include/linux/sensors.h +++ /dev/null @@ -1,690 +0,0 @@ -/* - sensors.h - Part of lm_sensors, Linux kernel modules for hardware - monitoring - Copyright (c) 1998, 1999 Frodo Looijaard <frodol@dds.nl> - - 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; either version 2 of the License, or - (at your option) any later version. - - 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., 675 Mass Ave, Cambridge, MA 02139, USA. -*/ - -#ifndef SENSORS_NSENSORS_H -#define SENSORS_NSENSORS_H - -#define LM_DATE "20020915" -#define LM_VERSION "2.6.5" - -#include <linux/i2c-proc.h> - -#define LM78_SYSCTL_IN0 1000 /* Volts * 100 */ -#define LM78_SYSCTL_IN1 1001 -#define LM78_SYSCTL_IN2 1002 -#define LM78_SYSCTL_IN3 1003 -#define LM78_SYSCTL_IN4 1004 -#define LM78_SYSCTL_IN5 1005 -#define LM78_SYSCTL_IN6 1006 -#define LM78_SYSCTL_FAN1 1101 /* Rotations/min */ -#define LM78_SYSCTL_FAN2 1102 -#define LM78_SYSCTL_FAN3 1103 -#define LM78_SYSCTL_TEMP 1200 /* Degrees Celcius * 10 */ -#define LM78_SYSCTL_VID 1300 /* Volts * 100 */ -#define LM78_SYSCTL_FAN_DIV 2000 /* 1, 2, 4 or 8 */ -#define LM78_SYSCTL_ALARMS 2001 /* bitvector */ - -#define LM78_ALARM_IN0 0x0001 -#define LM78_ALARM_IN1 0x0002 -#define LM78_ALARM_IN2 0x0004 -#define LM78_ALARM_IN3 0x0008 -#define LM78_ALARM_IN4 0x0100 -#define LM78_ALARM_IN5 0x0200 -#define LM78_ALARM_IN6 0x0400 -#define LM78_ALARM_FAN1 0x0040 -#define LM78_ALARM_FAN2 0x0080 -#define LM78_ALARM_FAN3 0x0800 -#define LM78_ALARM_TEMP 0x0010 -#define LM78_ALARM_BTI 0x0020 -#define LM78_ALARM_CHAS 0x1000 -#define LM78_ALARM_FIFO 0x2000 -#define LM78_ALARM_SMI_IN 0x4000 - -#define W83781D_SYSCTL_IN0 1000 /* Volts * 100 */ -#define W83781D_SYSCTL_IN1 1001 -#define W83781D_SYSCTL_IN2 1002 -#define W83781D_SYSCTL_IN3 1003 -#define W83781D_SYSCTL_IN4 1004 -#define W83781D_SYSCTL_IN5 1005 -#define W83781D_SYSCTL_IN6 1006 -#define W83781D_SYSCTL_IN7 1007 -#define W83781D_SYSCTL_IN8 1008 -#define W83781D_SYSCTL_FAN1 1101 /* Rotations/min */ -#define W83781D_SYSCTL_FAN2 1102 -#define W83781D_SYSCTL_FAN3 1103 -#define W83781D_SYSCTL_TEMP1 1200 /* Degrees Celcius * 10 */ -#define W83781D_SYSCTL_TEMP2 1201 /* Degrees Celcius * 10 */ -#define W83781D_SYSCTL_TEMP3 1202 /* Degrees Celcius * 10 */ -#define W83781D_SYSCTL_VID 1300 /* Volts * 1000 */ -#define W83781D_SYSCTL_VRM 1301 -#define W83781D_SYSCTL_PWM1 1401 -#define W83781D_SYSCTL_PWM2 1402 -#define W83781D_SYSCTL_PWM3 1403 -#define W83781D_SYSCTL_PWM4 1404 -#define W83781D_SYSCTL_SENS1 1501 /* 1, 2, or Beta (3000-5000) */ -#define W83781D_SYSCTL_SENS2 1502 -#define W83781D_SYSCTL_SENS3 1503 -#define W83781D_SYSCTL_RT1 1601 /* 32-entry table */ -#define W83781D_SYSCTL_RT2 1602 /* 32-entry table */ -#define W83781D_SYSCTL_RT3 1603 /* 32-entry table */ -#define W83781D_SYSCTL_FAN_DIV 2000 /* 1, 2, 4 or 8 */ -#define W83781D_SYSCTL_ALARMS 2001 /* bitvector */ -#define W83781D_SYSCTL_BEEP 2002 /* bitvector */ - -#define W83781D_ALARM_IN0 0x0001 -#define W83781D_ALARM_IN1 0x0002 -#define W83781D_ALARM_IN2 0x0004 -#define W83781D_ALARM_IN3 0x0008 -#define W83781D_ALARM_IN4 0x0100 -#define W83781D_ALARM_IN5 0x0200 -#define W83781D_ALARM_IN6 0x0400 -#define W83782D_ALARM_IN7 0x10000 -#define W83782D_ALARM_IN8 0x20000 -#define W83781D_ALARM_FAN1 0x0040 -#define W83781D_ALARM_FAN2 0x0080 -#define W83781D_ALARM_FAN3 0x0800 -#define W83781D_ALARM_TEMP1 0x0010 -#define W83781D_ALARM_TEMP23 0x0020 /* 781D only */ -#define W83781D_ALARM_TEMP2 0x0020 /* 782D/783S */ -#define W83781D_ALARM_TEMP3 0x2000 /* 782D only */ -#define W83781D_ALARM_CHAS 0x1000 - -#define LM75_SYSCTL_TEMP 1200 /* Degrees Celcius * 10 */ - -#define ADM1021_SYSCTL_TEMP 1200 -#define ADM1021_SYSCTL_REMOTE_TEMP 1201 -#define ADM1021_SYSCTL_DIE_CODE 1202 -#define ADM1021_SYSCTL_ALARMS 1203 - -#define ADM1021_ALARM_TEMP_HIGH 0x40 -#define ADM1021_ALARM_TEMP_LOW 0x20 -#define ADM1021_ALARM_RTEMP_HIGH 0x10 -#define ADM1021_ALARM_RTEMP_LOW 0x08 -#define ADM1021_ALARM_RTEMP_NA 0x04 - -#define GL518_SYSCTL_VDD 1000 /* Volts * 100 */ -#define GL518_SYSCTL_VIN1 1001 -#define GL518_SYSCTL_VIN2 1002 -#define GL518_SYSCTL_VIN3 1003 -#define GL518_SYSCTL_FAN1 1101 /* RPM */ -#define GL518_SYSCTL_FAN2 1102 -#define GL518_SYSCTL_TEMP 1200 /* Degrees Celcius * 10 */ -#define GL518_SYSCTL_FAN_DIV 2000 /* 1, 2, 4 or 8 */ -#define GL518_SYSCTL_ALARMS 2001 /* bitvector */ -#define GL518_SYSCTL_BEEP 2002 /* bitvector */ -#define GL518_SYSCTL_FAN1OFF 2003 -#define GL518_SYSCTL_ITERATE 2004 - -#define GL518_ALARM_VDD 0x01 -#define GL518_ALARM_VIN1 0x02 -#define GL518_ALARM_VIN2 0x04 -#define GL518_ALARM_VIN3 0x08 -#define GL518_ALARM_TEMP 0x10 -#define GL518_ALARM_FAN1 0x20 -#define GL518_ALARM_FAN2 0x40 - -#define GL520_SYSCTL_VDD 1000 /* Volts * 100 */ -#define GL520_SYSCTL_VIN1 1001 -#define GL520_SYSCTL_VIN2 1002 -#define GL520_SYSCTL_VIN3 1003 -#define GL520_SYSCTL_VIN4 1004 -#define GL520_SYSCTL_FAN1 1101 /* RPM */ -#define GL520_SYSCTL_FAN2 1102 -#define GL520_SYSCTL_TEMP1 1200 /* Degrees Celcius * 10 */ -#define GL520_SYSCTL_TEMP2 1201 /* Degrees Celcius * 10 */ -#define GL520_SYSCTL_VID 1300 -#define GL520_SYSCTL_FAN_DIV 2000 /* 1, 2, 4 or 8 */ -#define GL520_SYSCTL_ALARMS 2001 /* bitvector */ -#define GL520_SYSCTL_BEEP 2002 /* bitvector */ -#define GL520_SYSCTL_FAN1OFF 2003 -#define GL520_SYSCTL_CONFIG 2004 - -#define GL520_ALARM_VDD 0x01 -#define GL520_ALARM_VIN1 0x02 -#define GL520_ALARM_VIN2 0x04 -#define GL520_ALARM_VIN3 0x08 -#define GL520_ALARM_TEMP1 0x10 -#define GL520_ALARM_FAN1 0x20 -#define GL520_ALARM_FAN2 0x40 -#define GL520_ALARM_TEMP2 0x80 -#define GL520_ALARM_VIN4 0x80 - -#define EEPROM_SYSCTL1 1000 -#define EEPROM_SYSCTL2 1001 -#define EEPROM_SYSCTL3 1002 -#define EEPROM_SYSCTL4 1003 -#define EEPROM_SYSCTL5 1004 -#define EEPROM_SYSCTL6 1005 -#define EEPROM_SYSCTL7 1006 -#define EEPROM_SYSCTL8 1007 -#define EEPROM_SYSCTL9 1008 -#define EEPROM_SYSCTL10 1009 -#define EEPROM_SYSCTL11 1010 -#define EEPROM_SYSCTL12 1011 -#define EEPROM_SYSCTL13 1012 -#define EEPROM_SYSCTL14 1013 -#define EEPROM_SYSCTL15 1014 -#define EEPROM_SYSCTL16 1015 - -#define LM80_SYSCTL_IN0 1000 /* Volts * 100 */ -#define LM80_SYSCTL_IN1 1001 -#define LM80_SYSCTL_IN2 1002 -#define LM80_SYSCTL_IN3 1003 -#define LM80_SYSCTL_IN4 1004 -#define LM80_SYSCTL_IN5 1005 -#define LM80_SYSCTL_IN6 1006 -#define LM80_SYSCTL_FAN1 1101 /* Rotations/min */ -#define LM80_SYSCTL_FAN2 1102 -#define LM80_SYSCTL_TEMP 1250 /* Degrees Celcius * 100 */ -#define LM80_SYSCTL_FAN_DIV 2000 /* 1, 2, 4 or 8 */ -#define LM80_SYSCTL_ALARMS 2001 /* bitvector */ - -#define ADM9240_SYSCTL_IN0 1000 /* Volts * 100 */ -#define ADM9240_SYSCTL_IN1 1001 -#define ADM9240_SYSCTL_IN2 1002 -#define ADM9240_SYSCTL_IN3 1003 -#define ADM9240_SYSCTL_IN4 1004 -#define ADM9240_SYSCTL_IN5 1005 -#define ADM9240_SYSCTL_FAN1 1101 /* Rotations/min */ -#define ADM9240_SYSCTL_FAN2 1102 -#define ADM9240_SYSCTL_TEMP 1250 /* Degrees Celcius * 100 */ -#define ADM9240_SYSCTL_FAN_DIV 2000 /* 1, 2, 4 or 8 */ -#define ADM9240_SYSCTL_ALARMS 2001 /* bitvector */ -#define ADM9240_SYSCTL_ANALOG_OUT 2002 -#define ADM9240_SYSCTL_VID 2003 - -#define ADM9240_ALARM_IN0 0x0001 -#define ADM9240_ALARM_IN1 0x0002 -#define ADM9240_ALARM_IN2 0x0004 -#define ADM9240_ALARM_IN3 0x0008 -#define ADM9240_ALARM_IN4 0x0100 -#define ADM9240_ALARM_IN5 0x0200 -#define ADM9240_ALARM_FAN1 0x0040 -#define ADM9240_ALARM_FAN2 0x0080 -#define ADM9240_ALARM_TEMP 0x0010 -#define ADM9240_ALARM_CHAS 0x1000 - -#define ADM1024_SYSCTL_IN0 1000 /* Volts * 100 */ -#define ADM1024_SYSCTL_IN1 1001 -#define ADM1024_SYSCTL_IN2 1002 -#define ADM1024_SYSCTL_IN3 1003 -#define ADM1024_SYSCTL_IN4 1004 -#define ADM1024_SYSCTL_IN5 1005 -#define ADM1024_SYSCTL_FAN1 1101 /* Rotations/min */ -#define ADM1024_SYSCTL_FAN2 1102 -#define ADM1024_SYSCTL_TEMP 1250 /* Degrees Celcius * 100 */ -#define ADM1024_SYSCTL_TEMP1 1290 /* Degrees Celcius */ -#define ADM1024_SYSCTL_TEMP2 1295 /* Degrees Celcius */ -#define ADM1024_SYSCTL_FAN_DIV 2000 /* 1, 2, 4 or 8 */ -#define ADM1024_SYSCTL_ALARMS 2001 /* bitvector */ -#define ADM1024_SYSCTL_ANALOG_OUT 2002 -#define ADM1024_SYSCTL_VID 2003 - -#define ADM1024_ALARM_IN0 0x0001 -#define ADM1024_ALARM_IN1 0x0002 -#define ADM1024_ALARM_IN2 0x0004 -#define ADM1024_ALARM_IN3 0x0008 -#define ADM1024_ALARM_IN4 0x0100 -#define ADM1024_ALARM_IN5 0x0200 -#define ADM1024_ALARM_FAN1 0x0040 -#define ADM1024_ALARM_FAN2 0x0080 -#define ADM1024_ALARM_TEMP 0x0010 -#define ADM1024_ALARM_TEMP1 0x0020 -#define ADM1024_ALARM_TEMP2 0x0001 -#define ADM1024_ALARM_CHAS 0x1000 - -#define ADM1025_SYSCTL_IN0 1000 /* Volts * 100 */ -#define ADM1025_SYSCTL_IN1 1001 -#define ADM1025_SYSCTL_IN2 1002 -#define ADM1025_SYSCTL_IN3 1003 -#define ADM1025_SYSCTL_IN4 1004 -#define ADM1025_SYSCTL_IN5 1005 -#define ADM1025_SYSCTL_RTEMP 1251 -#define ADM1025_SYSCTL_TEMP 1250 /* Degrees Celcius * 100 */ -#define ADM1025_SYSCTL_ALARMS 2001 /* bitvector */ -#define ADM1025_SYSCTL_ANALOG_OUT 2002 -#define ADM1025_SYSCTL_VID 2003 -#define ADM1025_SYSCTL_VRM 2004 - -#define ADM1025_ALARM_IN0 0x0001 -#define ADM1025_ALARM_IN1 0x0002 -#define ADM1025_ALARM_IN2 0x0004 -#define ADM1025_ALARM_IN3 0x0008 -#define ADM1025_ALARM_IN4 0x0100 -#define ADM1025_ALARM_IN5 0x0200 -#define ADM1025_ALARM_RTEMP 0x0020 -#define ADM1025_ALARM_TEMP 0x0010 - -#define LTC1710_SYSCTL_SWITCH_1 1000 -#define LTC1710_SYSCTL_SWITCH_2 1001 - -#define LM80_ALARM_IN0 0x0001 -#define LM80_ALARM_IN1 0x0002 -#define LM80_ALARM_IN2 0x0004 -#define LM80_ALARM_IN3 0x0008 -#define LM80_ALARM_IN4 0x0010 -#define LM80_ALARM_IN5 0x0020 -#define LM80_ALARM_IN6 0x0040 -#define LM80_ALARM_FAN1 0x0400 -#define LM80_ALARM_FAN2 0x0800 -#define LM80_ALARM_TEMP_HOT 0x0100 -#define LM80_ALARM_TEMP_OS 0x2000 -#define LM80_ALARM_CHAS 0x1000 -#define LM80_ALARM_BTI 0x0200 -#define LM80_ALARM_INT_IN 0x0080 - -#define MAXI_SYSCTL_FAN1 1101 /* Rotations/min */ -#define MAXI_SYSCTL_FAN2 1102 /* Rotations/min */ -#define MAXI_SYSCTL_FAN3 1103 /* Rotations/min */ -#define MAXI_SYSCTL_FAN4 1104 /* Rotations/min */ -#define MAXI_SYSCTL_TEMP1 1201 /* Degrees Celcius */ -#define MAXI_SYSCTL_TEMP2 1202 /* Degrees Celcius */ -#define MAXI_SYSCTL_TEMP3 1203 /* Degrees Celcius */ -#define MAXI_SYSCTL_TEMP4 1204 /* Degrees Celcius */ -#define MAXI_SYSCTL_TEMP5 1205 /* Degrees Celcius */ -#define MAXI_SYSCTL_TEMP6 1206 /* Degrees Celcius */ -#define MAXI_SYSCTL_PLL 1301 /* MHz */ -#define MAXI_SYSCTL_VID1 1401 /* Volts / 6.337, for nba just Volts */ -#define MAXI_SYSCTL_VID2 1402 /* Volts */ -#define MAXI_SYSCTL_VID3 1403 /* Volts */ -#define MAXI_SYSCTL_VID4 1404 /* Volts */ -#define MAXI_SYSCTL_VID5 1405 /* Volts */ -#define MAXI_SYSCTL_LCD1 1501 /* Line 1 of LCD */ -#define MAXI_SYSCTL_LCD2 1502 /* Line 2 of LCD */ -#define MAXI_SYSCTL_LCD3 1503 /* Line 3 of LCD */ -#define MAXI_SYSCTL_LCD4 1504 /* Line 4 of LCD */ -#define MAXI_SYSCTL_ALARMS 2001 /* Bitvector (see below) */ - -#define MAXI_ALARM_VID4 0x0001 -#define MAXI_ALARM_TEMP2 0x0002 -#define MAXI_ALARM_VID1 0x0004 -#define MAXI_ALARM_VID2 0x0008 -#define MAXI_ALARM_VID3 0x0010 -#define MAXI_ALARM_PLL 0x0080 -#define MAXI_ALARM_TEMP4 0x0100 -#define MAXI_ALARM_TEMP5 0x0200 -#define MAXI_ALARM_FAN1 0x1000 -#define MAXI_ALARM_FAN2 0x2000 -#define MAXI_ALARM_FAN3 0x4000 - -#define MAXI_ALARM_FAN 0x0100 /* To be used with MaxiLife'99 */ -#define MAXI_ALARM_VID 0x0200 /* The MSB specifies which sensor */ -#define MAXI_ALARM_TEMP 0x0400 /* in the alarm group failed, i.e.: */ -#define MAXI_ALARM_VADD 0x0800 /* 0x0402 = TEMP2 failed = CPU2 temp */ - -#define SIS5595_SYSCTL_IN0 1000 /* Volts * 100 */ -#define SIS5595_SYSCTL_IN1 1001 -#define SIS5595_SYSCTL_IN2 1002 -#define SIS5595_SYSCTL_IN3 1003 -#define SIS5595_SYSCTL_IN4 1004 -#define SIS5595_SYSCTL_FAN1 1101 /* Rotations/min */ -#define SIS5595_SYSCTL_FAN2 1102 -#define SIS5595_SYSCTL_TEMP 1200 /* Degrees Celcius * 10 */ -#define SIS5595_SYSCTL_FAN_DIV 2000 /* 1, 2, 4 or 8 */ -#define SIS5595_SYSCTL_ALARMS 2001 /* bitvector */ - -#define SIS5595_ALARM_IN0 0x01 -#define SIS5595_ALARM_IN1 0x02 -#define SIS5595_ALARM_IN2 0x04 -#define SIS5595_ALARM_IN3 0x08 -#define SIS5595_ALARM_BTI 0x20 -#define SIS5595_ALARM_FAN1 0x40 -#define SIS5595_ALARM_FAN2 0x80 -#define SIS5595_ALARM_IN4 0x8000 -#define SIS5595_ALARM_TEMP 0x8000 - -#define VIA686A_SYSCTL_IN0 1000 -#define VIA686A_SYSCTL_IN1 1001 -#define VIA686A_SYSCTL_IN2 1002 -#define VIA686A_SYSCTL_IN3 1003 -#define VIA686A_SYSCTL_IN4 1004 -#define VIA686A_SYSCTL_FAN1 1101 -#define VIA686A_SYSCTL_FAN2 1102 -#define VIA686A_SYSCTL_TEMP 1200 -#define VIA686A_SYSCTL_TEMP2 1201 -#define VIA686A_SYSCTL_TEMP3 1202 -#define VIA686A_SYSCTL_FAN_DIV 2000 -#define VIA686A_SYSCTL_ALARMS 2001 - -#define VIA686A_ALARM_IN0 0x01 -#define VIA686A_ALARM_IN1 0x02 -#define VIA686A_ALARM_IN2 0x04 -#define VIA686A_ALARM_IN3 0x08 -#define VIA686A_ALARM_TEMP 0x10 -#define VIA686A_ALARM_FAN1 0x40 -#define VIA686A_ALARM_FAN2 0x80 -#define VIA686A_ALARM_IN4 0x100 -#define VIA686A_ALARM_TEMP2 0x800 -#define VIA686A_ALARM_CHAS 0x1000 -#define VIA686A_ALARM_TEMP3 0x8000 - -#define ICSPLL_SYSCTL1 1000 - -#define BT869_SYSCTL_STATUS 1000 -#define BT869_SYSCTL_NTSC 1001 -#define BT869_SYSCTL_HALF 1002 -#define BT869_SYSCTL_RES 1003 -#define BT869_SYSCTL_COLORBARS 1004 -#define BT869_SYSCTL_DEPTH 1005 -#define BT869_SYSCTL_SVIDEO 1006 - -#define MATORB_SYSCTL_DISP 1000 - -#define THMC50_SYSCTL_TEMP 1200 /* Degrees Celcius */ -#define THMC50_SYSCTL_REMOTE_TEMP 1201 /* Degrees Celcius */ -#define THMC50_SYSCTL_INTER 1202 -#define THMC50_SYSCTL_INTER_MASK 1203 -#define THMC50_SYSCTL_DIE_CODE 1204 -#define THMC50_SYSCTL_ANALOG_OUT 1205 - -#define DDCMON_SYSCTL_ID 1010 -#define DDCMON_SYSCTL_SIZE 1011 -#define DDCMON_SYSCTL_SYNC 1012 -#define DDCMON_SYSCTL_TIMINGS 1013 -#define DDCMON_SYSCTL_SERIAL 1014 - -#define LM87_SYSCTL_IN0 1000 /* Volts * 100 */ -#define LM87_SYSCTL_IN1 1001 -#define LM87_SYSCTL_IN2 1002 -#define LM87_SYSCTL_IN3 1003 -#define LM87_SYSCTL_IN4 1004 -#define LM87_SYSCTL_IN5 1005 -#define LM87_SYSCTL_AIN1 1006 -#define LM87_SYSCTL_AIN2 1007 -#define LM87_SYSCTL_FAN1 1102 -#define LM87_SYSCTL_FAN2 1103 -#define LM87_SYSCTL_TEMP1 1250 /* Degrees Celcius * 100 */ -#define LM87_SYSCTL_TEMP2 1251 /* Degrees Celcius * 100 */ -#define LM87_SYSCTL_TEMP3 1252 /* Degrees Celcius * 100 */ -#define LM87_SYSCTL_FAN_DIV 2000 /* 1, 2, 4 or 8 */ -#define LM87_SYSCTL_ALARMS 2001 /* bitvector */ -#define LM87_SYSCTL_ANALOG_OUT 2002 -#define LM87_SYSCTL_VID 2003 -#define LM87_SYSCTL_VRM 2004 - -#define LM87_ALARM_IN0 0x0001 -#define LM87_ALARM_IN1 0x0002 -#define LM87_ALARM_IN2 0x0004 -#define LM87_ALARM_IN3 0x0008 -#define LM87_ALARM_TEMP1 0x0010 -#define LM87_ALARM_TEMP2 0x0020 -#define LM87_ALARM_TEMP3 0x0020 /* same?? */ -#define LM87_ALARM_FAN1 0x0040 -#define LM87_ALARM_FAN2 0x0080 -#define LM87_ALARM_IN4 0x0100 -#define LM87_ALARM_IN5 0x0200 -#define LM87_ALARM_RESERVED1 0x0400 -#define LM87_ALARM_RESERVED2 0x0800 -#define LM87_ALARM_CHAS 0x1000 -#define LM87_ALARM_THERM_SIG 0x2000 -#define LM87_ALARM_TEMP2_FAULT 0x4000 -#define LM87_ALARM_TEMP3_FAULT 0x08000 - -#define PCF8574_SYSCTL_READ 1000 -#define PCF8574_SYSCTL_WRITE 1001 - -#define MTP008_SYSCTL_IN0 1000 /* Volts * 100 */ -#define MTP008_SYSCTL_IN1 1001 -#define MTP008_SYSCTL_IN2 1002 -#define MTP008_SYSCTL_IN3 1003 -#define MTP008_SYSCTL_IN4 1004 -#define MTP008_SYSCTL_IN5 1005 -#define MTP008_SYSCTL_IN6 1006 -#define MTP008_SYSCTL_FAN1 1101 /* Rotations/min */ -#define MTP008_SYSCTL_FAN2 1102 -#define MTP008_SYSCTL_FAN3 1103 -#define MTP008_SYSCTL_TEMP1 1200 /* Degrees Celcius * 10 */ -#define MTP008_SYSCTL_TEMP2 1201 /* Degrees Celcius * 10 */ -#define MTP008_SYSCTL_TEMP3 1202 /* Degrees Celcius * 10 */ -#define MTP008_SYSCTL_VID 1300 /* Volts * 100 */ -#define MTP008_SYSCTL_PWM1 1401 -#define MTP008_SYSCTL_PWM2 1402 -#define MTP008_SYSCTL_PWM3 1403 -#define MTP008_SYSCTL_SENS1 1501 /* 1, 2, or Beta (3000-5000) */ -#define MTP008_SYSCTL_SENS2 1502 -#define MTP008_SYSCTL_SENS3 1503 -#define MTP008_SYSCTL_FAN_DIV 2000 /* 1, 2, 4 or 8 */ -#define MTP008_SYSCTL_ALARMS 2001 /* bitvector */ -#define MTP008_SYSCTL_BEEP 2002 /* bitvector */ - -#define MTP008_ALARM_IN0 0x0001 -#define MTP008_ALARM_IN1 0x0002 -#define MTP008_ALARM_IN2 0x0004 -#define MTP008_ALARM_IN3 0x0008 -#define MTP008_ALARM_IN4 0x0100 -#define MTP008_ALARM_IN5 0x0200 -#define MTP008_ALARM_IN6 0x0400 -#define MTP008_ALARM_FAN1 0x0040 -#define MTP008_ALARM_FAN2 0x0080 -#define MTP008_ALARM_FAN3 0x0800 -#define MTP008_ALARM_TEMP1 0x0010 -#define MTP008_ALARM_TEMP2 0x0100 -#define MTP008_ALARM_TEMP3 0x0200 - -#define DS1621_SYSCTL_TEMP 1200 /* Degrees Celcius * 10 */ -#define DS1621_SYSCTL_ALARMS 2001 /* bitvector */ -#define DS1621_ALARM_TEMP_HIGH 0x40 -#define DS1621_ALARM_TEMP_LOW 0x20 -#define DS1621_SYSCTL_ENABLE 2002 -#define DS1621_SYSCTL_CONTINUOUS 2003 -#define DS1621_SYSCTL_POLARITY 2004 - -#define IT87_SYSCTL_IN0 1000 /* Volts * 100 */ -#define IT87_SYSCTL_IN1 1001 -#define IT87_SYSCTL_IN2 1002 -#define IT87_SYSCTL_IN3 1003 -#define IT87_SYSCTL_IN4 1004 -#define IT87_SYSCTL_IN5 1005 -#define IT87_SYSCTL_IN6 1006 -#define IT87_SYSCTL_IN7 1007 -#define IT87_SYSCTL_IN8 1008 -#define IT87_SYSCTL_FAN1 1101 /* Rotations/min */ -#define IT87_SYSCTL_FAN2 1102 -#define IT87_SYSCTL_FAN3 1103 -#define IT87_SYSCTL_TEMP1 1200 /* Degrees Celcius * 10 */ -#define IT87_SYSCTL_TEMP2 1201 /* Degrees Celcius * 10 */ -#define IT87_SYSCTL_TEMP3 1202 /* Degrees Celcius * 10 */ -#define IT87_SYSCTL_VID 1300 /* Volts * 100 */ -#define IT87_SYSCTL_FAN_DIV 2000 /* 1, 2, 4 or 8 */ -#define IT87_SYSCTL_ALARMS 2004 /* bitvector */ - -#define IT87_ALARM_IN0 0x000100 -#define IT87_ALARM_IN1 0x000200 -#define IT87_ALARM_IN2 0x000400 -#define IT87_ALARM_IN3 0x000800 -#define IT87_ALARM_IN4 0x001000 -#define IT87_ALARM_IN5 0x002000 -#define IT87_ALARM_IN6 0x004000 -#define IT87_ALARM_IN7 0x008000 -#define IT87_ALARM_FAN1 0x0001 -#define IT87_ALARM_FAN2 0x0002 -#define IT87_ALARM_FAN3 0x0004 -#define IT87_ALARM_TEMP1 0x00010000 -#define IT87_ALARM_TEMP2 0x00020000 -#define IT87_ALARM_TEMP3 0x00040000 - -#define FSCPOS_SYSCTL_VOLT0 1000 /* 12 volt supply */ -#define FSCPOS_SYSCTL_VOLT1 1001 /* 5 volt supply */ -#define FSCPOS_SYSCTL_VOLT2 1002 /* batterie voltage*/ -#define FSCPOS_SYSCTL_FAN0 1101 /* state, min, ripple, actual value fan 0 */ -#define FSCPOS_SYSCTL_FAN1 1102 /* state, min, ripple, actual value fan 1 */ -#define FSCPOS_SYSCTL_FAN2 1103 /* state, min, ripple, actual value fan 2 */ -#define FSCPOS_SYSCTL_TEMP0 1201 /* state and value of sensor 0, cpu die */ -#define FSCPOS_SYSCTL_TEMP1 1202 /* state and value of sensor 1, motherboard */ -#define FSCPOS_SYSCTL_TEMP2 1203 /* state and value of sensor 2, chassis */ -#define FSCPOS_SYSCTL_REV 2000 /* Revision */ -#define FSCPOS_SYSCTL_EVENT 2001 /* global event status */ -#define FSCPOS_SYSCTL_CONTROL 2002 /* global control byte */ -#define FSCPOS_SYSCTL_WDOG 2003 /* state, min, ripple, actual value fan 2 */ - -#define FSCSCY_SYSCTL_VOLT0 1000 /* 12 volt supply */ -#define FSCSCY_SYSCTL_VOLT1 1001 /* 5 volt supply */ -#define FSCSCY_SYSCTL_VOLT2 1002 /* batterie voltage*/ -#define FSCSCY_SYSCTL_FAN0 1101 /* state, min, ripple, actual value fan 0 */ -#define FSCSCY_SYSCTL_FAN1 1102 /* state, min, ripple, actual value fan 1 */ -#define FSCSCY_SYSCTL_FAN2 1103 /* state, min, ripple, actual value fan 2 */ -#define FSCSCY_SYSCTL_FAN3 1104 /* state, min, ripple, actual value fan 3 */ -#define FSCSCY_SYSCTL_FAN4 1105 /* state, min, ripple, actual value fan 4 */ -#define FSCSCY_SYSCTL_FAN5 1106 /* state, min, ripple, actual value fan 5 */ -#define FSCSCY_SYSCTL_TEMP0 1201 /* state and value of sensor 0, cpu die */ -#define FSCSCY_SYSCTL_TEMP1 1202 /* state and value of sensor 1, motherboard */ -#define FSCSCY_SYSCTL_TEMP2 1203 /* state and value of sensor 2, chassis */ -#define FSCSCY_SYSCTL_TEMP3 1204 /* state and value of sensor 3, chassis */ -#define FSCSCY_SYSCTL_REV 2000 /* Revision */ -#define FSCSCY_SYSCTL_EVENT 2001 /* global event status */ -#define FSCSCY_SYSCTL_CONTROL 2002 /* global control byte */ -#define FSCSCY_SYSCTL_WDOG 2003 /* state, min, ripple, actual value fan 2 */ -#define FSCSCY_SYSCTL_PCILOAD 2004 /* PCILoad value */ -#define FSCSCY_SYSCTL_INTRUSION 2005 /* state, control for intrusion sensor */ - -#define PCF8591_SYSCTL_AIN_CONF 1000 /* Analog input configuration */ -#define PCF8591_SYSCTL_CH0 1001 /* Input channel 1 */ -#define PCF8591_SYSCTL_CH1 1002 /* Input channel 2 */ -#define PCF8591_SYSCTL_CH2 1003 /* Input channel 3 */ -#define PCF8591_SYSCTL_CH3 1004 /* Input channel 4 */ -#define PCF8591_SYSCTL_AOUT_ENABLE 1005 /* Analog output enable flag */ -#define PCF8591_SYSCTL_AOUT 1006 /* Analog output */ - -#define ARP_SYSCTL1 1000 -#define ARP_SYSCTL2 1001 -#define ARP_SYSCTL3 1002 -#define ARP_SYSCTL4 1003 -#define ARP_SYSCTL5 1004 -#define ARP_SYSCTL6 1005 -#define ARP_SYSCTL7 1006 -#define ARP_SYSCTL8 1007 - -#define SMSC47M1_SYSCTL_FAN1 1101 /* Rotations/min */ -#define SMSC47M1_SYSCTL_FAN2 1102 -#define SMSC47M1_SYSCTL_PWM1 1401 -#define SMSC47M1_SYSCTL_PWM2 1402 -#define SMSC47M1_SYSCTL_FAN_DIV 2000 /* 1, 2, 4 or 8 */ -#define SMSC47M1_SYSCTL_ALARMS 2004 /* bitvector */ - -#define SMSC47M1_ALARM_FAN1 0x0001 -#define SMSC47M1_ALARM_FAN2 0x0002 - -#define VT1211_SYSCTL_IN0 1000 -#define VT1211_SYSCTL_IN1 1001 -#define VT1211_SYSCTL_IN2 1002 -#define VT1211_SYSCTL_IN3 1003 -#define VT1211_SYSCTL_IN4 1004 -#define VT1211_SYSCTL_IN5 1005 -#define VT1211_SYSCTL_IN6 1006 -#define VT1211_SYSCTL_FAN1 1101 -#define VT1211_SYSCTL_FAN2 1102 -#define VT1211_SYSCTL_TEMP 1200 -#define VT1211_SYSCTL_TEMP2 1201 -#define VT1211_SYSCTL_TEMP3 1202 -#define VT1211_SYSCTL_TEMP4 1203 -#define VT1211_SYSCTL_TEMP5 1204 -#define VT1211_SYSCTL_TEMP6 1205 -#define VT1211_SYSCTL_TEMP7 1206 -#define VT1211_SYSCTL_VID 1300 -#define VT1211_SYSCTL_PWM1 1401 -#define VT1211_SYSCTL_PWM2 1402 -#define VT1211_SYSCTL_VRM 1600 -#define VT1211_SYSCTL_UCH 1700 -#define VT1211_SYSCTL_FAN_DIV 2000 -#define VT1211_SYSCTL_ALARMS 2001 - -#define VT1211_ALARM_IN1 0x01 -#define VT1211_ALARM_IN2 0x02 -#define VT1211_ALARM_IN5 0x04 -#define VT1211_ALARM_IN3 0x08 -#define VT1211_ALARM_TEMP 0x10 -#define VT1211_ALARM_FAN1 0x40 -#define VT1211_ALARM_FAN2 0x80 -#define VT1211_ALARM_IN4 0x100 -#define VT1211_ALARM_IN6 0x200 -#define VT1211_ALARM_TEMP2 0x800 -#define VT1211_ALARM_CHAS 0x1000 -#define VT1211_ALARM_TEMP3 0x8000 -/* duplicates */ -#define VT1211_ALARM_IN0 VT1211_ALARM_TEMP -#define VT1211_ALARM_TEMP4 VT1211_ALARM_IN1 -#define VT1211_ALARM_TEMP5 VT1211_ALARM_IN2 -#define VT1211_ALARM_TEMP6 VT1211_ALARM_IN3 -#define VT1211_ALARM_TEMP7 VT1211_ALARM_IN4 - -#define LM92_SYSCTL_ALARMS 2001 /* high, low, critical */ -#define LM92_SYSCTL_TEMP 1200 /* high, low, critical, hysterisis, input */ - -#define LM92_ALARM_TEMP_HIGH 0x01 -#define LM92_ALARM_TEMP_LOW 0x02 -#define LM92_ALARM_TEMP_CRIT 0x04 -#define LM92_TEMP_HIGH 0x08 -#define LM92_TEMP_LOW 0x10 -#define LM92_TEMP_CRIT 0x20 -#define LM92_TEMP_HYST 0x40 -#define LM92_TEMP_INPUT 0x80 - -#define VT8231_SYSCTL_IN0 1000 -#define VT8231_SYSCTL_IN1 1001 -#define VT8231_SYSCTL_IN2 1002 -#define VT8231_SYSCTL_IN3 1003 -#define VT8231_SYSCTL_IN4 1004 -#define VT8231_SYSCTL_IN5 1005 -#define VT8231_SYSCTL_IN6 1006 -#define VT8231_SYSCTL_FAN1 1101 -#define VT8231_SYSCTL_FAN2 1102 -#define VT8231_SYSCTL_TEMP 1200 -#define VT8231_SYSCTL_TEMP2 1201 -#define VT8231_SYSCTL_TEMP3 1202 -#define VT8231_SYSCTL_TEMP4 1203 -#define VT8231_SYSCTL_TEMP5 1204 -#define VT8231_SYSCTL_TEMP6 1205 -#define VT8231_SYSCTL_TEMP7 1206 -#define VT8231_SYSCTL_VID 1300 -#define VT8231_SYSCTL_PWM1 1401 -#define VT8231_SYSCTL_PWM2 1402 -#define VT8231_SYSCTL_VRM 1600 -#define VT8231_SYSCTL_UCH 1700 -#define VT8231_SYSCTL_FAN_DIV 2000 -#define VT8231_SYSCTL_ALARMS 2001 - -#define VT8231_ALARM_IN1 0x01 -#define VT8231_ALARM_IN2 0x02 -#define VT8231_ALARM_IN5 0x04 -#define VT8231_ALARM_IN3 0x08 -#define VT8231_ALARM_TEMP 0x10 -#define VT8231_ALARM_FAN1 0x40 -#define VT8231_ALARM_FAN2 0x80 -#define VT8231_ALARM_IN4 0x100 -#define VT8231_ALARM_IN6 0x200 -#define VT8231_ALARM_TEMP2 0x800 -#define VT8231_ALARM_CHAS 0x1000 -#define VT8231_ALARM_TEMP3 0x8000 -/* duplicates */ -#define VT8231_ALARM_IN0 VT8231_ALARM_TEMP -#define VT8231_ALARM_TEMP4 VT8231_ALARM_IN1 -#define VT8231_ALARM_TEMP5 VT8231_ALARM_IN2 -#define VT8231_ALARM_TEMP6 VT8231_ALARM_IN3 -#define VT8231_ALARM_TEMP7 VT8231_ALARM_IN4 - -#define SMARTBATT_SYSCTL_I 1001 -#define SMARTBATT_SYSCTL_V 1002 -#define SMARTBATT_SYSCTL_TEMP 1003 -#define SMARTBATT_SYSCTL_TIME 1004 -#define SMARTBATT_SYSCTL_ALARMS 1005 -#define SMARTBATT_SYSCTL_CHARGE 1006 - - -#endif /* def SENSORS_SENSORS_H */ diff --git a/include/linux/smp.h b/include/linux/smp.h index 7a1e22b170c2..8243c6bec130 100644 --- a/include/linux/smp.h +++ b/include/linux/smp.h @@ -78,6 +78,13 @@ extern int register_cpu_notifier(struct notifier_block *nb); extern void unregister_cpu_notifier(struct notifier_block *nb); int cpu_up(unsigned int cpu); + +/* + * Mark the boot cpu "online" so that it can call console drivers in + * printk() and can access its per-cpu storage. + */ +void smp_prepare_boot_cpu(void); + #else /* !SMP */ /* @@ -94,7 +101,8 @@ static inline void smp_send_reschedule_all(void) { } #define cpu_online(cpu) ({ BUG_ON((cpu) != 0); 1; }) #define num_online_cpus() 1 #define num_booting_cpus() 1 -#define cpu_possible(cpu) ({ BUG_ON((cpu) != 0); 1; }) +#define cpu_possible(cpu) ({ BUG_ON((cpu) != 0); 1; }) +#define smp_prepare_boot_cpu() do {} while (0) struct notifier_block; diff --git a/include/linux/suspend.h b/include/linux/suspend.h index a481f80034fa..80b4a657b49c 100644 --- a/include/linux/suspend.h +++ b/include/linux/suspend.h @@ -46,6 +46,9 @@ struct suspend_header { /* mm/vmscan.c */ extern int shrink_mem(void); +/* mm/page_alloc.c */ +extern void drain_local_pages(void); + /* kernel/suspend.c */ extern void software_suspend(void); extern void software_resume(void); diff --git a/include/linux/tty.h b/include/linux/tty.h index 11b82d2c98ae..ad3149de8631 100644 --- a/include/linux/tty.h +++ b/include/linux/tty.h @@ -379,9 +379,8 @@ extern void start_tty(struct tty_struct * tty); extern int tty_register_ldisc(int disc, struct tty_ldisc *new_ldisc); extern int tty_register_driver(struct tty_driver *driver); extern int tty_unregister_driver(struct tty_driver *driver); -extern void tty_register_devfs (struct tty_driver *driver, unsigned int flags, - unsigned minor); -extern void tty_unregister_devfs (struct tty_driver *driver, unsigned minor); +extern void tty_register_device(struct tty_driver *driver, unsigned minor); +extern void tty_unregister_device(struct tty_driver *driver, unsigned minor); extern int tty_read_raw_data(struct tty_struct *tty, unsigned char *bufp, int buflen); extern void tty_write_message(struct tty_struct *tty, char *msg); diff --git a/include/linux/tty_driver.h b/include/linux/tty_driver.h index 806216e30a26..ad5638bbd4ed 100644 --- a/include/linux/tty_driver.h +++ b/include/linux/tty_driver.h @@ -227,4 +227,6 @@ extern struct list_head tty_drivers; #define SERIAL_TYPE_NORMAL 1 #define SERIAL_TYPE_CALLOUT 2 +extern struct device_class tty_devclass; + #endif /* #ifdef _LINUX_TTY_DRIVER_H */ |
