summaryrefslogtreecommitdiff
path: root/include/linux
diff options
context:
space:
mode:
authorPatrick Mochel <mochel@osdl.org>2002-12-30 00:43:03 -0600
committerPatrick Mochel <mochel@osdl.org>2002-12-30 00:43:03 -0600
commit61f53a3c83622a876d219e5b7b09ab97cc189d39 (patch)
tree3edce216b64ef2cbc8c6b3be15a5a873119d31f3 /include/linux
parent5bab068f962e67a0b08a1230fb7cec75ed56c97b (diff)
parentbec7aa00ffe5b1270837b965fdfe80be3e8e6e2e (diff)
Merge bk://linux.bkbits.net/linux-2.5
into osdl.org:/home/mochel/src/kernel/devel/linux-2.5-virgin
Diffstat (limited to 'include/linux')
-rw-r--r--include/linux/ax25.h2
-rw-r--r--include/linux/binfmts.h8
-rw-r--r--include/linux/compiler.h13
-rw-r--r--include/linux/fb.h2
-rw-r--r--include/linux/fs.h5
-rw-r--r--include/linux/i2c-id.h1
-rw-r--r--include/linux/i2c-proc.h25
-rw-r--r--include/linux/ide.h4
-rw-r--r--include/linux/init.h5
-rw-r--r--include/linux/ioport.h3
-rw-r--r--include/linux/module.h68
-rw-r--r--include/linux/moduleparam.h2
-rw-r--r--include/linux/mtd/map.h5
-rw-r--r--include/linux/mtd/mtd.h3
-rw-r--r--include/linux/nubus.h51
-rw-r--r--include/linux/personality.h18
-rw-r--r--include/linux/sensors.h690
-rw-r--r--include/linux/usb.h31
18 files changed, 837 insertions, 99 deletions
diff --git a/include/linux/ax25.h b/include/linux/ax25.h
index 6dfc8fc9116d..56c11f0dbd80 100644
--- a/include/linux/ax25.h
+++ b/include/linux/ax25.h
@@ -85,7 +85,7 @@ struct ax25_ctl_struct {
};
/* this will go away. Please do not export to user land */
-struct ax25_info_struct_depreciated {
+struct ax25_info_struct_deprecated {
unsigned int n2, n2count;
unsigned int t1, t1timer;
unsigned int t2, t2timer;
diff --git a/include/linux/binfmts.h b/include/linux/binfmts.h
index ae1b454395b5..bd929e344d75 100644
--- a/include/linux/binfmts.h
+++ b/include/linux/binfmts.h
@@ -58,13 +58,7 @@ extern int copy_strings(int argc,char ** argv,struct linux_binprm *bprm);
extern int copy_strings_kernel(int argc,char ** argv,struct linux_binprm *bprm);
extern void compute_creds(struct linux_binprm *binprm);
extern int do_coredump(long signr, int exit_code, struct pt_regs * regs);
-extern void set_binfmt(struct linux_binfmt *new);
-
-
-#if 0
-/* this went away now */
-#define change_ldt(a,b) setup_arg_pages(a,b)
-#endif
+extern int set_binfmt(struct linux_binfmt *new);
#endif /* __KERNEL__ */
#endif /* _LINUX_BINFMTS_H */
diff --git a/include/linux/compiler.h b/include/linux/compiler.h
index 6b19413b47a6..f88889740949 100644
--- a/include/linux/compiler.h
+++ b/include/linux/compiler.h
@@ -13,6 +13,19 @@
#define likely(x) __builtin_expect((x),1)
#define unlikely(x) __builtin_expect((x),0)
+/*
+ * Allow us to mark functions as 'deprecated' and have gcc emit a nice
+ * warning for each use, in hopes of speeding the functions removal.
+ * Usage is:
+ * int deprecated foo(void)
+ * and then gcc will emit a warning for each usage of the function.
+ */
+#if __GNUC__ >= 3
+#define __deprecated __attribute__((deprecated))
+#else
+#define __deprecated
+#endif
+
/* This macro obfuscates arithmetic on a variable address so that gcc
shouldn't recognize the original var, and make assumptions about it */
#define RELOC_HIDE(ptr, off) \
diff --git a/include/linux/fb.h b/include/linux/fb.h
index 23dd4c02ddec..188da2f94589 100644
--- a/include/linux/fb.h
+++ b/include/linux/fb.h
@@ -424,9 +424,11 @@ struct fb_info {
#define fb_readb __raw_readb
#define fb_readw __raw_readw
#define fb_readl __raw_readl
+#define fb_readq __raw_readq
#define fb_writeb __raw_writeb
#define fb_writew __raw_writew
#define fb_writel __raw_writel
+#define fb_writeq __raw_writeq
#define fb_memset memset_io
#else
diff --git a/include/linux/fs.h b/include/linux/fs.h
index 500cb3ac421e..6c3188b991e6 100644
--- a/include/linux/fs.h
+++ b/include/linux/fs.h
@@ -983,13 +983,13 @@ 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 ) \
+ ? (try_inc_mod_count((fops)->owner) ? (fops) : NULL) \
: (fops))
#define fops_put(fops) \
do { \
if ((fops) && (fops)->owner) \
- __MOD_DEC_USE_COUNT((fops)->owner); \
+ module_put((fops)->owner); \
} while(0)
extern int register_filesystem(struct file_system_type *);
@@ -1300,6 +1300,7 @@ extern int dcache_dir_open(struct inode *, struct file *);
extern int dcache_dir_close(struct inode *, struct file *);
extern loff_t dcache_dir_lseek(struct file *, loff_t, int);
extern int dcache_readdir(struct file *, void *, filldir_t);
+extern int simple_getattr(struct vfsmount *, struct dentry *, struct kstat *);
extern int simple_statfs(struct super_block *, struct statfs *);
extern int simple_link(struct dentry *, struct inode *, struct dentry *);
extern int simple_unlink(struct inode *, struct dentry *);
diff --git a/include/linux/i2c-id.h b/include/linux/i2c-id.h
index 8a52e78b89f0..2b6394004ea1 100644
--- a/include/linux/i2c-id.h
+++ b/include/linux/i2c-id.h
@@ -233,6 +233,7 @@
#define I2C_HW_SMBUS_ALI1535 0x07
#define I2C_HW_SMBUS_SIS630 0x08
#define I2C_HW_SMBUS_SIS645 0x09
+#define I2C_HW_SMBUS_AMD8111 0x0a
/* --- ISA pseudo-adapter */
#define I2C_HW_ISA 0x00
diff --git a/include/linux/i2c-proc.h b/include/linux/i2c-proc.h
index 4a4c33db48d5..ccdd2a95b1d1 100644
--- a/include/linux/i2c-proc.h
+++ b/include/linux/i2c-proc.h
@@ -348,6 +348,31 @@ struct i2c_address_data {
{NULL}}; \
SENSORS_INSMOD
+#define SENSORS_INSMOD_8(chip1,chip2,chip3,chip4,chip5,chip6,chip7,chip8) \
+ enum chips { any_chip, chip1, chip2, chip3, chip4, chip5, chip6, chip7, chip8 }; \
+ SENSORS_MODULE_PARM(force, \
+ "List of adapter,address pairs to boldly assume " \
+ "to be present"); \
+ SENSORS_MODULE_PARM_FORCE(chip1); \
+ SENSORS_MODULE_PARM_FORCE(chip2); \
+ SENSORS_MODULE_PARM_FORCE(chip3); \
+ SENSORS_MODULE_PARM_FORCE(chip4); \
+ SENSORS_MODULE_PARM_FORCE(chip5); \
+ SENSORS_MODULE_PARM_FORCE(chip6); \
+ SENSORS_MODULE_PARM_FORCE(chip7); \
+ SENSORS_MODULE_PARM_FORCE(chip8); \
+ static struct i2c_force_data forces[] = {{force,any_chip}, \
+ {force_ ## chip1,chip1}, \
+ {force_ ## chip2,chip2}, \
+ {force_ ## chip3,chip3}, \
+ {force_ ## chip4,chip4}, \
+ {force_ ## chip5,chip5}, \
+ {force_ ## chip6,chip6}, \
+ {force_ ## chip7,chip7}, \
+ {force_ ## chip8,chip8}, \
+ {NULL}}; \
+ SENSORS_INSMOD
+
typedef int i2c_found_addr_proc(struct i2c_adapter *adapter,
int addr, unsigned short flags,
int kind);
diff --git a/include/linux/ide.h b/include/linux/ide.h
index 033e94a6d6e4..2e2718ebfd98 100644
--- a/include/linux/ide.h
+++ b/include/linux/ide.h
@@ -360,8 +360,8 @@ extern int ide_irq_lock;
/* Currently only Atari needs it */
#ifndef IDE_ARCH_LOCK
-# define ide_release_lock(lock) do {} while (0)
-# define ide_get_lock(lock, hdlr, data) do {} while (0)
+# define ide_release_lock() do {} while (0)
+# define ide_get_lock(hdlr, data) do {} while (0)
#endif /* IDE_ARCH_LOCK */
/*
diff --git a/include/linux/init.h b/include/linux/init.h
index 46b1ef190c52..b7c6363478aa 100644
--- a/include/linux/init.h
+++ b/include/linux/init.h
@@ -147,14 +147,13 @@ struct obs_kernel_param {
#define module_init(initfn) \
static inline initcall_t __inittest(void) \
{ return initfn; } \
- int __initfn(void) __attribute__((alias(#initfn)));
+ int init_module(void) __attribute__((alias(#initfn)));
/* This is only required if you want to be unloadable. */
#define module_exit(exitfn) \
static inline exitcall_t __exittest(void) \
{ return exitfn; } \
- void __exitfn(void) __attribute__((alias(#exitfn)));
-
+ void cleanup_module(void) __attribute__((alias(#exitfn)));
#define __setup(str,func) /* nothing */
#endif
diff --git a/include/linux/ioport.h b/include/linux/ioport.h
index 020bd1596ab9..edd1eadb98b8 100644
--- a/include/linux/ioport.h
+++ b/include/linux/ioport.h
@@ -8,6 +8,7 @@
#ifndef _LINUX_IOPORT_H
#define _LINUX_IOPORT_H
+#include <linux/compiler.h>
/*
* Resources are tree-like, allowing
* nesting etc..
@@ -107,7 +108,7 @@ extern struct resource * __request_region(struct resource *, unsigned long start
#define check_mem_region(start,n) __check_region(&iomem_resource, (start), (n))
#define release_mem_region(start,n) __release_region(&iomem_resource, (start), (n))
-extern int __check_region(struct resource *, unsigned long, unsigned long);
+extern int __deprecated __check_region(struct resource *, unsigned long, unsigned long);
extern void __release_region(struct resource *, unsigned long, unsigned long);
#define get_ioport_list(buf) get_resource_list(&ioport_resource, buf, PAGE_SIZE)
diff --git a/include/linux/module.h b/include/linux/module.h
index 2392edcc3307..3a411c8c6575 100644
--- a/include/linux/module.h
+++ b/include/linux/module.h
@@ -40,12 +40,11 @@ struct kernel_symbol
char name[MODULE_NAME_LEN];
};
-#ifdef MODULE
+/* These are either module local, or the kernel's dummy ones. */
+extern int init_module(void);
+extern void cleanup_module(void);
-#ifdef KBUILD_MODNAME
-static const char __module_name[MODULE_NAME_LEN] __attribute__((section(".gnu.linkonce.modname"))) = \
- __stringify(KBUILD_MODNAME);
-#endif
+#ifdef MODULE
/* For replacement modutils, use an alias not a pointer. */
#define MODULE_GENERIC_TABLE(gtype,name) \
@@ -56,9 +55,6 @@ static const struct gtype##_id * __module_##gtype##_table \
extern const struct gtype##_id __mod_##gtype##_table \
__attribute__ ((unused, alias(__stringify(name))))
-/* This is magically filled in by the linker, but THIS_MODULE must be
- a constant so it works in initializers. */
-extern struct module __this_module;
#define THIS_MODULE (&__this_module)
#else /* !MODULE */
@@ -176,7 +172,7 @@ struct module
/* The command line arguments (may be mangled). People like
keeping pointers to this stuff */
- char args[0];
+ char *args;
};
/* FIXME: It'd be nice to isolate modules during init, too, so they
@@ -289,6 +285,19 @@ static inline const char *module_address_lookup(unsigned long addr,
}
#endif /* CONFIG_MODULES */
+#if defined(MODULE) && defined(KBUILD_MODNAME)
+/* We make the linker do some of the work. */
+struct module __this_module
+__attribute__((section(".gnu.linkonce.this_module"))) = {
+ .name = __stringify(KBUILD_MODNAME),
+ .symbols = { .owner = &__this_module },
+ .init = init_module,
+#ifdef CONFIG_MODULE_UNLOAD
+ .exit = cleanup_module,
+#endif
+};
+#endif /* MODULE && KBUILD_MODNAME */
+
/* For archs to search exception tables */
extern struct list_head extables;
extern spinlock_t modlist_lock;
@@ -296,9 +305,20 @@ extern spinlock_t modlist_lock;
#define symbol_request(x) try_then_request_module(symbol_get(x), "symbol:" #x)
/* BELOW HERE ALL THESE ARE OBSOLETE AND WILL VANISH */
-#define __MOD_INC_USE_COUNT(mod) \
- do { __unsafe(mod); (void)try_module_get(mod); } while(0)
-#define __MOD_DEC_USE_COUNT(mod) module_put(mod)
+static inline void __deprecated __MOD_INC_USE_COUNT(struct module *module)
+{
+ __unsafe(module);
+ /*
+ * Yes, we ignore the retval here, that's why it's deprecated.
+ */
+ try_module_get(module);
+}
+
+static inline void __deprecated __MOD_DEC_USE_COUNT(struct module *module)
+{
+ module_put(module);
+}
+
#define SET_MODULE_OWNER(dev) ((dev)->owner = THIS_MODULE)
struct obsolete_modparm {
@@ -319,14 +339,21 @@ struct obsolete_modparm __parm_##var __attribute__((section("__obsparm"))) = \
/* People do this inside their init routines, when the module isn't
"live" yet. They should no longer be doing that, but
meanwhile... */
+static inline void __deprecated _MOD_INC_USE_COUNT(struct module *module)
+{
+ __unsafe(module);
+
#if defined(CONFIG_MODULE_UNLOAD) && defined(MODULE)
-#define MOD_INC_USE_COUNT \
- do { __unsafe(THIS_MODULE); local_inc(&THIS_MODULE->ref[get_cpu()].count); put_cpu(); } while (0)
+ local_inc(&module->ref[get_cpu()].count);
+ put_cpu();
#else
-#define MOD_INC_USE_COUNT \
- do { __unsafe(THIS_MODULE); (void)try_module_get(THIS_MODULE); } while (0)
+ try_module_get(module);
#endif
-#define MOD_DEC_USE_COUNT module_put(THIS_MODULE)
+}
+#define MOD_INC_USE_COUNT \
+ _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;
@@ -342,13 +369,6 @@ extern int module_dummy_usage;
&& __mod_between((p),(n),(m)->module_init,(m)->init_size)) \
|| __mod_between((p),(n),(m)->module_core,(m)->core_size))
-/* Old-style "I'll just call it init_module and it'll be run at
- insert". Use module_init(myroutine) instead. */
-#ifdef MODULE
-#define init_module(voidarg) __initfn(void)
-#define cleanup_module(voidarg) __exitfn(void)
-#endif
-
/*
* The exception and symbol tables, and the lock
* to protect them.
diff --git a/include/linux/moduleparam.h b/include/linux/moduleparam.h
index 92a1bc154e8e..e52553263640 100644
--- a/include/linux/moduleparam.h
+++ b/include/linux/moduleparam.h
@@ -39,7 +39,7 @@ struct kparam_string {
writable. */
#define __module_param_call(prefix, name, set, get, arg, perm) \
static char __param_str_##name[] __initdata = prefix #name; \
- static struct kernel_param __param_##name \
+ static struct kernel_param const __param_##name \
__attribute__ ((unused,__section__ ("__param"))) \
= { __param_str_##name, perm, set, get, arg }
diff --git a/include/linux/mtd/map.h b/include/linux/mtd/map.h
index 94ffed22315b..ad8dfcbda17d 100644
--- a/include/linux/mtd/map.h
+++ b/include/linux/mtd/map.h
@@ -81,10 +81,7 @@ static inline void map_destroy(struct mtd_info *mtd)
if (map->fldrv->destroy)
map->fldrv->destroy(mtd);
-#ifdef CONFIG_MODULES
- if (map->fldrv->module)
- __MOD_DEC_USE_COUNT(map->fldrv->module);
-#endif
+ module_put(map->fldrv->module);
kfree(mtd);
}
diff --git a/include/linux/mtd/mtd.h b/include/linux/mtd/mtd.h
index ae5bfe3e10fb..52d38241e91e 100644
--- a/include/linux/mtd/mtd.h
+++ b/include/linux/mtd/mtd.h
@@ -224,8 +224,7 @@ static inline struct mtd_info *get_mtd_device(struct mtd_info *mtd, int num)
static inline void put_mtd_device(struct mtd_info *mtd)
{
- if (mtd->module)
- __MOD_DEC_USE_COUNT(mtd->module);
+ module_put(mtd->module);
}
diff --git a/include/linux/nubus.h b/include/linux/nubus.h
index a3fd37b33fdd..870e66a96286 100644
--- a/include/linux/nubus.h
+++ b/include/linux/nubus.h
@@ -28,18 +28,18 @@ enum nubus_category {
};
enum nubus_type_network {
- NUBUS_TYPE_ETHERNET = 0x0001,
- NUBUS_TYPE_RS232 = 0x0002
+ NUBUS_TYPE_ETHERNET = 0x0001,
+ NUBUS_TYPE_RS232 = 0x0002
};
enum nubus_type_display {
- NUBUS_TYPE_VIDEO = 0x0001
+ NUBUS_TYPE_VIDEO = 0x0001
};
enum nubus_type_cpu {
- NUBUS_TYPE_68020 = 0x0003,
- NUBUS_TYPE_68030 = 0x0004,
- NUBUS_TYPE_68040 = 0x0005
+ NUBUS_TYPE_68020 = 0x0003,
+ NUBUS_TYPE_68030 = 0x0004,
+ NUBUS_TYPE_68040 = 0x0005
};
/* Known <Cat,Type,SW,HW> tuples: (according to TattleTech and Slots)
@@ -80,22 +80,24 @@ enum nubus_type_cpu {
/* Add known DrSW values here */
enum nubus_drsw {
/* NUBUS_CAT_DISPLAY */
- NUBUS_DRSW_APPLE = 0x0001,
- NUBUS_DRSW_APPLE_HIRES = 0x0013, /* MacII HiRes card driver */
+ NUBUS_DRSW_APPLE = 0x0001,
+ NUBUS_DRSW_APPLE_HIRES = 0x0013, /* MacII HiRes card driver */
/* NUBUS_CAT_NETWORK */
- NUBUS_DRSW_CABLETRON = 0x0001,
- NUBUS_DRSW_SONIC_LC = 0x0001,
- NUBUS_DRSW_KINETICS = 0x0103,
- NUBUS_DRSW_ASANTE = 0x0104,
- NUBUS_DRSW_DAYNA = 0x010b,
- NUBUS_DRSW_FARALLON = 0x010c,
- NUBUS_DRSW_APPLE_SN = 0x010f,
- NUBUS_DRSW_FOCUS = 0x011a,
- NUBUS_DRSW_ASANTE_CS = 0x011d, /* use asante SMC9194 driver */
+ NUBUS_DRSW_CABLETRON = 0x0001,
+ NUBUS_DRSW_SONIC_LC = 0x0001,
+ NUBUS_DRSW_KINETICS = 0x0103,
+ NUBUS_DRSW_ASANTE = 0x0104,
+ NUBUS_DRSW_DAYNA = 0x010b,
+ NUBUS_DRSW_FARALLON = 0x010c,
+ NUBUS_DRSW_APPLE_SN = 0x010f,
+ NUBUS_DRSW_DAYNA2 = 0x0115,
+ NUBUS_DRSW_FOCUS = 0x011a,
+ NUBUS_DRSW_ASANTE_CS = 0x011d, /* use asante SMC9194 driver */
+ NUBUS_DRSW_DAYNA_LC = 0x011e,
/* NUBUS_CAT_CPU */
- NUBUS_DRSW_NONE = 0x0000,
+ NUBUS_DRSW_NONE = 0x0000,
};
/* DrHW: Uniquely identifies the hardware interface to a board (or at
@@ -106,11 +108,13 @@ enum nubus_drsw {
enum nubus_drhw {
/* NUBUS_CAT_DISPLAY */
NUBUS_DRHW_APPLE_TFB = 0x0001, /* Toby frame buffer card */
+ NUBUS_DRHW_APPLE_HRVC = 0x0013, /* Mac II High Res Video card */
NUBUS_DRHW_APPLE_RBV1 = 0x0018, /* IIci RBV video */
NUBUS_DRHW_APPLE_MDC = 0x0019, /* Macintosh Display Card */
NUBUS_DRHW_APPLE_SONORA = 0x0022, /* Sonora built-in video */
+ NUBUS_DRHW_APPLE_JET = 0x0029, /* Jet framebuffer (DuoDock) */
NUBUS_DRHW_APPLE_VALKYRIE = 0x002e,
- NUBUS_DRHW_APPLE_JET = 0x0029, /* Jet framebuffer (DuoDock) */
+ NUBUS_DRHW_THUNDER24 = 0x02cb, /* SuperMac Thunder/24 */
/* NUBUS_CAT_NETWORK */
NUBUS_DRHW_INTERLAN = 0x0100,
@@ -119,6 +123,11 @@ enum nubus_drhw {
NUBUS_DRHW_CABLETRON = 0x0109,
NUBUS_DRHW_ASANTE_LC = 0x010f,
NUBUS_DRHW_SONIC = 0x0110,
+ NUBUS_DRHW_SONIC_NB = 0x0118,
+ NUBUS_DRHW_SONIC_LC = 0x0119,
+
+ /* NUBUS_CAT_COMMUNICATIONS */
+ NUBUS_DRHW_DOVEFAX = 0x0100,
};
/* Resource IDs: These are the identifiers for the various weird and
@@ -153,8 +162,8 @@ enum nubus_board_res_id {
NUBUS_RESID_SECONDINIT = 0x0026,
/* Not sure why Apple put these next two in here */
- NUBUS_RESID_VIDNAMES = 0x0041,
- NUBUS_RESID_VIDMODES = 0x007e
+ NUBUS_RESID_VIDNAMES = 0x0041,
+ NUBUS_RESID_VIDMODES = 0x007e
};
/* Fields within the vendor info directory */
diff --git a/include/linux/personality.h b/include/linux/personality.h
index ca5d403e49ff..33802c8eeedb 100644
--- a/include/linux/personality.h
+++ b/include/linux/personality.h
@@ -107,22 +107,4 @@ struct exec_domain {
#define set_personality(pers) \
((current->personality == pers) ? 0 : __set_personality(pers))
-/*
- * Load an execution domain.
- */
-#define get_exec_domain(ep) \
-do { \
- if (ep != NULL && ep->module != NULL) \
- __MOD_INC_USE_COUNT(ep->module); \
-} while (0)
-
-/*
- * Unload an execution domain.
- */
-#define put_exec_domain(ep) \
-do { \
- if (ep != NULL && ep->module != NULL) \
- __MOD_DEC_USE_COUNT(ep->module); \
-} while (0)
-
#endif /* _LINUX_PERSONALITY_H */
diff --git a/include/linux/sensors.h b/include/linux/sensors.h
new file mode 100644
index 000000000000..31998faab1e6
--- /dev/null
+++ b/include/linux/sensors.h
@@ -0,0 +1,690 @@
+/*
+ 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/usb.h b/include/linux/usb.h
index 88557d5957a7..bcbfa72423c3 100644
--- a/include/linux/usb.h
+++ b/include/linux/usb.h
@@ -28,14 +28,6 @@ static __inline__ void wait_ms(unsigned int ms)
mdelay(ms);
}
-/*
- * USB device number allocation bitmap. There's one bitmap
- * per USB tree.
- */
-struct usb_devmap {
- unsigned long devicemap[128 / (8*sizeof(unsigned long))];
-};
-
struct usb_device;
/*-------------------------------------------------------------------------*/
@@ -119,12 +111,21 @@ struct usb_interface {
struct usb_driver *driver; /* driver */
kdev_t kdev; /* node this interface is bound to */
struct device dev; /* interface specific device info */
- void *private_data;
};
#define to_usb_interface(d) container_of(d, struct usb_interface, dev)
#define interface_to_usbdev(intf) \
container_of(intf->dev.parent, struct usb_device, dev)
+static inline void *usb_get_intfdata (struct usb_interface *intf)
+{
+ return dev_get_drvdata (&intf->dev);
+}
+
+static inline void usb_set_intfdata (struct usb_interface *intf, void *data)
+{
+ return dev_set_drvdata (&intf->dev, data);
+}
+
/* USB_DT_CONFIG: Configuration descriptor information.
*
* USB_DT_OTHER_SPEED_CONFIG is the same descriptor, except that the
@@ -159,10 +160,16 @@ int __usb_get_extra_descriptor(char *buffer, unsigned size,
struct usb_operations;
+/* USB device number allocation bitmap */
+struct usb_devmap {
+ unsigned long devicemap[128 / (8*sizeof(unsigned long))];
+};
+
/*
- * Allocated per bus we have
+ * Allocated per bus (tree of devices) we have:
*/
struct usb_bus {
+ struct device *controller; /* host/master side hardware */
int busnum; /* Bus number (in order of reg) */
char *bus_name; /* stable id (PCI slot_name etc) */
@@ -210,7 +217,6 @@ struct usb_device {
struct usb_tt *tt; /* low/full speed dev, highspeed hub */
int ttport; /* device port on that tt hub */
- atomic_t refcnt; /* Reference count */
struct semaphore serialize;
unsigned int toggle[2]; /* one bit for each endpoint ([0] = IN, [1] = OUT) */
@@ -254,8 +260,7 @@ struct usb_device {
extern struct usb_device *usb_alloc_dev(struct usb_device *parent, struct usb_bus *);
extern struct usb_device *usb_get_dev(struct usb_device *dev);
-extern void usb_free_dev(struct usb_device *);
-#define usb_put_dev usb_free_dev
+extern void usb_put_dev(struct usb_device *dev);
/* mostly for devices emulating SCSI over USB */
extern int usb_reset_device(struct usb_device *dev);