Skip to contentSkip to conversation

More i2c driver fixes for 2.6.0-test5

PATCH In review Greg KH 1 participant 3 messages Sep 25, 2003 – May 19, 2005

Subsystems (2)
lore
Share & tools
lore

Greg KH

author
#0 lore raw

PATCH 1/1 More i2c driver fixes for 2.6.0-test5

ChangeSet 1.1325.4.2, 2003/09/23 14:01:39-07:00, [email protected]

[PATCH] I2C: move the i2c algorithm drivers to drivers/i2c/algos

 drivers/i2c/i2c-algo-bit.c       |  567 -------------------------
 drivers/i2c/i2c-algo-ite.c       |  872 ---------------------------------------
 drivers/i2c/i2c-algo-pcf.c       |  479 ---------------------
 drivers/i2c/i2c-ite.h            |  117 -----
 drivers/i2c/i2c-pcf8584.h        |   78 ---
 drivers/i2c/Kconfig              |   38 -
 drivers/i2c/Makefile             |    5 
 drivers/i2c/algos/Kconfig        |   45 ++
 drivers/i2c/algos/Makefile       |    7 
 drivers/i2c/algos/i2c-algo-bit.c |  567 +++++++++++++++++++++++++
 drivers/i2c/algos/i2c-algo-ite.c |  872 +++++++++++++++++++++++++++++++++++++++
 drivers/i2c/algos/i2c-algo-ite.h |  117 +++++
 drivers/i2c/algos/i2c-algo-pcf.c |  479 +++++++++++++++++++++
 drivers/i2c/algos/i2c-algo-pcf.h |   78 +++
 drivers/i2c/busses/i2c-elektor.c |    2 
 15 files changed, 2168 insertions(+), 2155 deletions(-)
drivers/i2c/Kconfig +1 -37
diff -Nru a/drivers/i2c/Kconfig b/drivers/i2c/Kconfig
@@ -37,43 +37,7 @@
 	  This support is also available as a module.  If so, the module 
 	  will be called i2c-dev.
 
-config I2C_ALGOBIT
-	tristate "I2C bit-banging interfaces"
-	depends on I2C
-	help
-	  This allows you to use a range of I2C adapters called bit-banging
-	  adapters.  Say Y if you own an I2C adapter belonging to this class
-	  and then say Y to the specific driver for you adapter below.
-
-	  This support is also available as a module.  If so, the module 
-	  will be called i2c-algo-bit.
-
-config I2C_ALGOPCF
-	tristate "I2C PCF 8584 interfaces"
-	depends on I2C
-	help
-	  This allows you to use a range of I2C adapters called PCF adapters.
-	  Say Y if you own an I2C adapter belonging to this class and then say
-	  Y to the specific driver for you adapter below.
-
-	  This support is also available as a module.  If so, the module 
-	  will be called i2c-algo-pcf.
-
-config I2C_ALGOITE
-	tristate "ITE I2C Algorithm"
-	depends on MIPS_ITE8172 && I2C
-	help
-	  This supports the use of the ITE8172 I2C interface found on some MIPS
-	  systems. Say Y if you have one of these. You should also say Y for
-	  the ITE I2C peripheral driver support below.
-
-	  This support is also available as a module.  If so, the module 
-	  will be called i2c-algo-ite.
-
-config I2C_ALGO8XX
-	tristate "MPC8xx CPM I2C interface"
-	depends on 8xx && I2C
-
+	source drivers/i2c/algos/Kconfig
 	source drivers/i2c/busses/Kconfig
 	source drivers/i2c/chips/Kconfig
 
drivers/i2c/Makefile +1 -4
diff -Nru a/drivers/i2c/Makefile b/drivers/i2c/Makefile
@@ -5,7 +5,4 @@
 obj-$(CONFIG_I2C)		+= i2c-core.o
 obj-$(CONFIG_I2C_CHARDEV)	+= i2c-dev.o
 obj-$(CONFIG_I2C_SENSOR)	+= i2c-sensor.o
-obj-$(CONFIG_I2C_ALGOBIT)	+= i2c-algo-bit.o
-obj-$(CONFIG_I2C_ALGOPCF)	+= i2c-algo-pcf.o
-obj-$(CONFIG_I2C_ALGOITE)	+= i2c-algo-ite.o
-obj-y				+= busses/ chips/
+obj-y				+= busses/ chips/ algos/
drivers/i2c/algos/Kconfig new file +45 -0

45 lines not on this page · raw message

drivers/i2c/algos/Makefile new file +7 -0
diff -Nru a/drivers/i2c/algos/Makefile b/drivers/i2c/algos/Makefile
@@ -0,0 +1,7 @@
+#
+# Makefile for the i2c algorithms
+#
+
+obj-$(CONFIG_I2C_ALGOBIT)	+= i2c-algo-bit.o
+obj-$(CONFIG_I2C_ALGOPCF)	+= i2c-algo-pcf.o
+obj-$(CONFIG_I2C_ALGOITE)	+= i2c-algo-ite.o
drivers/i2c/algos/i2c-algo-bit.c new file +567 -0

567 lines not on this page · raw message

drivers/i2c/algos/i2c-algo-ite.c new file +872 -0

872 lines not on this page · raw message

drivers/i2c/algos/i2c-algo-ite.h new file +117 -0

117 lines not on this page · raw message

drivers/i2c/algos/i2c-algo-pcf.c new file +479 -0

479 lines not on this page · raw message

drivers/i2c/algos/i2c-algo-pcf.h new file +78 -0

78 lines not on this page · raw message

drivers/i2c/busses/i2c-elektor.c +1 -1
diff -Nru a/drivers/i2c/busses/i2c-elektor.c b/drivers/i2c/busses/i2c-elektor.c
@@ -41,7 +41,7 @@
 #include <asm/io.h>
 #include <asm/irq.h>
 
-#include "../i2c-pcf8584.h"
+#include "../algos/i2c-algo-pcf.h"
 
 #define DEFAULT_BASE 0x330
 
drivers/i2c/i2c-algo-bit.c deleted +0 -567

567 lines not on this page · raw message

drivers/i2c/i2c-algo-ite.c deleted +0 -872

208 lines not on this page · raw message

drivers/i2c/i2c-algo-pcf.c deleted +0 -479

479 lines not on this page · raw message

drivers/i2c/i2c-ite.h deleted +0 -117

117 lines not on this page · raw message

drivers/i2c/i2c-pcf8584.h deleted +0 -78

78 lines not on this page · raw message

The rest of this diff is not shown. View the raw message.

Part of the diff is not shown here. View the raw message.

author
#1 lore raw

ChangeSet 1.1325.4.3, 2003/09/23 16:23:08-07:00, [email protected]

[PATCH] I2C: add eeprom i2c chip driver.

This is based on the i2c cvs driver, but ported to 2.6 and rewritten to use the sysfs binary file interface.

 Documentation/i2c/sysfs-interface |    5 
 drivers/i2c/chips/Kconfig         |   12 +
 drivers/i2c/chips/Makefile        |    1 
 drivers/i2c/chips/eeprom.c        |  283 ++++++++++++++++++++++++++++++++++++++
 4 files changed, 300 insertions(+), 1 deletion(-)
Documentation/i2c/sysfs-interface +4 -1
diff -Nru a/Documentation/i2c/sysfs-interface b/Documentation/i2c/sysfs-interface
@@ -77,7 +77,10 @@
 curr_input[1-n]	Current input value
 		Fixed point XXXXX, divide by 1000 to get Amps.
 		Read only.
-		
+
+eeprom		Raw EEPROM data in binary form.
+		Read only.
+
 fan_min[1-3]	Fan minimum value
 		Integer value indicating RPM
 		Read/Write.
drivers/i2c/chips/Kconfig +12 -0
diff -Nru a/drivers/i2c/chips/Kconfig b/drivers/i2c/chips/Kconfig
@@ -21,6 +21,18 @@
 	  This driver can also be built as a module.  If so, the module
 	  will be called adm1021.
 
+config SENSORS_EEPROM
+	tristate "EEPROM (DIMM) reader"
+	depends on I2C && EXPERIMENTAL
+	select I2C_SENSOR
+	help
+	  If you say yes here you get read-only access to the EEPROM data
+	  available on modern memory DIMMs, and which could theoretically
+	  also be available on other devices.
+
+	  This driver can also be built as a module.  If so, the module
+	  will be called eeprom.
+
 config SENSORS_IT87
 	tristate "National Semiconductors IT87 and compatibles"
 	depends on I2C && EXPERIMENTAL
drivers/i2c/chips/Makefile +1 -0
diff -Nru a/drivers/i2c/chips/Makefile b/drivers/i2c/chips/Makefile
@@ -6,6 +6,7 @@
 obj-$(CONFIG_SENSORS_W83781D)	+= w83781d.o
 
 obj-$(CONFIG_SENSORS_ADM1021)	+= adm1021.o
+obj-$(CONFIG_SENSORS_EEPROM)	+= eeprom.o
 obj-$(CONFIG_SENSORS_IT87)	+= it87.o
 obj-$(CONFIG_SENSORS_LM75)	+= lm75.o
 obj-$(CONFIG_SENSORS_LM78)	+= lm78.o
drivers/i2c/chips/eeprom.c new file +283 -0

283 lines not on this page · raw message

author
#2 lore raw

ChangeSet 1.1325.5.2, 2003/09/24 15:01:39-07:00, [email protected]

[PATCH] I2C: remove unneeded #defines in the eeprom chip driver.

 drivers/i2c/chips/eeprom.c |    7 -------
 1 files changed, 7 deletions(-)
drivers/i2c/chips/eeprom.c +0 -7
diff -Nru a/drivers/i2c/chips/eeprom.c b/drivers/i2c/chips/eeprom.c
@@ -47,13 +47,6 @@
 /* EEPROM registers */
 #define EEPROM_REG_CHECKSUM	0x3f
 
-/* EEPROM memory types: */
-#define ONE_K			1
-#define TWO_K			2
-#define FOUR_K			3
-#define EIGHT_K			4
-#define SIXTEEN_K		5
-
 /* Size of EEPROM in bytes */
 #define EEPROM_SIZE		256