summaryrefslogtreecommitdiff
path: root/include/linux
diff options
context:
space:
mode:
authorChristoph Hellwig <hch@sgi.com>2003-02-19 01:07:11 -0800
committerLinus Torvalds <torvalds@home.transmeta.com>2003-02-19 01:07:11 -0800
commit204e654ecfcae553f8a509f603cb6e045b385496 (patch)
treeee7cf304eb1c708d86056e7065e4fedb99420896 /include/linux
parentb76a852bfb51ffe25505bab3dfd87ddbc821c2aa (diff)
[PATCH] i2c sanity
small updates to bring us nearer the lm_Sensors CVS (docs, comments, missing statics, named initializers). I still need to review their actual code changes before submitting those..
Diffstat (limited to 'include/linux')
-rw-r--r--include/linux/i2c-algo-bit.h10
-rw-r--r--include/linux/i2c-algo-pcf.h11
-rw-r--r--include/linux/i2c-dev.h3
-rw-r--r--include/linux/i2c-id.h14
-rw-r--r--include/linux/i2c-proc.h15
-rw-r--r--include/linux/i2c.h11
6 files changed, 27 insertions, 37 deletions
diff --git a/include/linux/i2c-algo-bit.h b/include/linux/i2c-algo-bit.h
index fea550f163d9..110904481238 100644
--- a/include/linux/i2c-algo-bit.h
+++ b/include/linux/i2c-algo-bit.h
@@ -21,12 +21,10 @@
/* With some changes from Kyösti Mälkki <kmalkki@cc.hut.fi> and even
Frodo Looijaard <frodol@dds.nl> */
-/* $Id: i2c-algo-bit.h,v 1.7 1999/12/21 23:45:58 frodo Exp $ */
+/* $Id: i2c-algo-bit.h,v 1.10 2003/01/21 08:08:16 kmalkki Exp $ */
-#ifndef I2C_ALGO_BIT_H
-#define I2C_ALGO_BIT_H 1
-
-#include <linux/i2c.h>
+#ifndef _LINUX_I2C_ALGO_BIT_H
+#define _LINUX_I2C_ALGO_BIT_H
/* --- Defines for bit-adapters --------------------------------------- */
/*
@@ -53,4 +51,4 @@ struct i2c_algo_bit_data {
int i2c_bit_add_bus(struct i2c_adapter *);
int i2c_bit_del_bus(struct i2c_adapter *);
-#endif /* I2C_ALGO_BIT_H */
+#endif /* _LINUX_I2C_ALGO_BIT_H */
diff --git a/include/linux/i2c-algo-pcf.h b/include/linux/i2c-algo-pcf.h
index 892d737ca96c..2a508562255f 100644
--- a/include/linux/i2c-algo-pcf.h
+++ b/include/linux/i2c-algo-pcf.h
@@ -22,13 +22,10 @@
/* With some changes from Kyösti Mälkki <kmalkki@cc.hut.fi> and even
Frodo Looijaard <frodol@dds.nl> */
-/* $Id: i2c-algo-pcf.h,v 1.7 2000/02/27 23:02:45 frodo Exp $ */
+/* $Id: i2c-algo-pcf.h,v 1.8 2003/01/21 08:08:16 kmalkki Exp $ */
-#ifndef I2C_ALGO_PCF_H
-#define I2C_ALGO_PCF_H 1
-
-/* --- Defines for pcf-adapters --------------------------------------- */
-#include <linux/i2c.h>
+#ifndef _LINUX_I2C_ALGO_PCF_H
+#define _LINUX_I2C_ALGO_PCF_H
struct i2c_algo_pcf_data {
void *data; /* private data for lolevel routines */
@@ -49,4 +46,4 @@ struct i2c_algo_pcf_data {
int i2c_pcf_add_bus(struct i2c_adapter *);
int i2c_pcf_del_bus(struct i2c_adapter *);
-#endif /* I2C_ALGO_PCF_H */
+#endif /* _LINUX_I2C_ALGO_PCF_H */
diff --git a/include/linux/i2c-dev.h b/include/linux/i2c-dev.h
index 84bede1ed6ac..3803c36293a8 100644
--- a/include/linux/i2c-dev.h
+++ b/include/linux/i2c-dev.h
@@ -19,13 +19,12 @@
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
-/* $Id: i2c-dev.h,v 1.11 2002/07/07 15:42:47 mds Exp $ */
+/* $Id: i2c-dev.h,v 1.13 2003/01/21 08:08:16 kmalkki Exp $ */
#ifndef _LINUX_I2C_DEV_H
#define _LINUX_I2C_DEV_H
#include <linux/types.h>
-#include <linux/i2c.h>
/* Some IOCTL commands are defined in <linux/i2c.h> */
/* Note: 10-bit addresses are NOT supported! */
diff --git a/include/linux/i2c-id.h b/include/linux/i2c-id.h
index 0061776f0402..fbdb019dcc2b 100644
--- a/include/linux/i2c-id.h
+++ b/include/linux/i2c-id.h
@@ -20,10 +20,11 @@
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */
/* ------------------------------------------------------------------------- */
-/* $Id: i2c-id.h,v 1.56 2002/10/13 15:50:02 mds Exp $ */
+/* $Id: i2c-id.h,v 1.63 2003/01/21 08:08:16 kmalkki Exp $ */
+
+#ifndef LINUX_I2C_ID_H
+#define LINUX_I2C_ID_H
-#ifndef I2C_ID_H
-#define I2C_ID_H
/*
* This file is part of the i2c-bus package and contains the identifier
* values for drivers, adapters and other folk populating these serial
@@ -95,7 +96,8 @@
#define I2C_DRIVERID_ADV717x 48 /* ADV 7175/7176 video encoder */
#define I2C_DRIVERID_ZR36067 49 /* Zoran 36067 video encoder */
#define I2C_DRIVERID_ZR36120 50 /* Zoran 36120 video encoder */
-#define I2C_DRIVERID_24LC32A 51 /* Microchip 24LC32A 32k EEPROM */
+#define I2C_DRIVERID_24LC32A 51 /* Microchip 24LC32A 32k EEPROM */
+#define I2C_DRIVERID_STM41T00 52 /* real time clock */
@@ -147,6 +149,7 @@
#define I2C_DRIVERID_SMARTBATT 1035
#define I2C_DRIVERID_BMCSENSORS 1036
#define I2C_DRIVERID_FS451 1037
+#define I2C_DRIVERID_W83627HF 1038
/*
* ---- Adapter types ----------------------------------------------------
@@ -172,6 +175,7 @@
#define I2C_ALGO_MPC8XX 0x110000 /* MPC8xx PowerPC I2C algorithm */
#define I2C_ALGO_OCP 0x120000 /* IBM or otherwise On-chip I2C algorithm */
+#define I2C_ALGO_BITHS 0x130000 /* enhanced bit style adapters */
#define I2C_ALGO_EXP 0x800000 /* experimental */
@@ -250,4 +254,4 @@
/* --- IPMB adapter */
#define I2C_HW_IPMB 0x00
-#endif /* I2C_ID_H */
+#endif /* LINUX_I2C_ID_H */
diff --git a/include/linux/i2c-proc.h b/include/linux/i2c-proc.h
index ccdd2a95b1d1..c1433e5f916b 100644
--- a/include/linux/i2c-proc.h
+++ b/include/linux/i2c-proc.h
@@ -19,14 +19,9 @@
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
-#ifndef SENSORS_SENSORS_H
-#define SENSORS_SENSORS_H
+#ifndef _LINUX_I2C_PROC_H
+#define _LINUX_I2C_PROC_H
-#ifdef __KERNEL__
-
-/* Next two must be included before sysctl.h can be included, in 2.0 kernels */
-#include <linux/types.h>
-#include <linux/fs.h>
#include <linux/sysctl.h>
/* The type of callback functions used in sensors_{proc,sysctl}_real */
@@ -388,7 +383,7 @@ extern int i2c_detect(struct i2c_adapter *adapter,
/* This macro is used to scale user-input to sensible values in almost all
chip drivers. */
-extern inline int SENSORS_LIMIT(long value, long low, long high)
+static inline int SENSORS_LIMIT(long value, long low, long high)
{
if (value < low)
return low;
@@ -398,8 +393,6 @@ extern inline int SENSORS_LIMIT(long value, long low, long high)
return value;
}
-#endif /* def __KERNEL__ */
-
/* The maximum length of the prefix */
#define SENSORS_PREFIX_MAX 20
@@ -418,5 +411,5 @@ struct i2c_chips_data {
char name[SENSORS_PREFIX_MAX + 13];
};
-#endif /* def SENSORS_SENSORS_H */
+#endif /* def _LINUX_I2C_PROC_H */
diff --git a/include/linux/i2c.h b/include/linux/i2c.h
index de3dc122f059..083081de5020 100644
--- a/include/linux/i2c.h
+++ b/include/linux/i2c.h
@@ -23,20 +23,19 @@
/* With some changes from Kyösti Mälkki <kmalkki@cc.hut.fi> and
Frodo Looijaard <frodol@dds.nl> */
-/* $Id: i2c.h,v 1.59 2002/07/19 20:53:45 phil Exp $ */
+/* $Id: i2c.h,v 1.68 2003/01/21 08:08:16 kmalkki Exp $ */
#ifndef _LINUX_I2C_H
#define _LINUX_I2C_H
-#define I2C_DATE "20020719"
-#define I2C_VERSION "2.6.4"
+#define I2C_DATE "20021208"
+#define I2C_VERSION "2.7.0"
-#include <linux/i2c-id.h> /* id values of adapters et. al. */
+#include <linux/module.h>
#include <linux/types.h>
-#include <linux/config.h>
+#include <linux/i2c-id.h>
#include <asm/semaphore.h>
-
/* --- General options ------------------------------------------------ */
#define I2C_ALGO_MAX 4 /* control memory consumption */