Skip to contentSkip to conversation

i2c driver fixes for 2.6.0-test5

PATCH New Greg KH 2 participants 39 messages Sep 22, 2003 – May 19, 2005

Subsystems (6)
lore
Share & tools
lore

Greg KH

author
#0 lore raw

PATCH 1/1 i2c driver fixes for 2.6.0-test5

Hi,

Here are some i2c driver fixes and additions for 2.6.0-test5. I've ported almost all of the i2c bus drivers from the 2.4 cvs tree to the 2.6 kernel (the one exception is a crazy one that acts like a pci hotplug driver in its init function, I'll leave that to someone else...) I've also cleaned up the existing i2c bus drivers by moving them into the proper directory, and polishing up the Kconfig entries.

There are a also a few other minor i2c cleanups and fixes in here.

Please pull from: bk://kernel.bkbits.net/gregkh/linux/i2c-2.5

thanks,

greg k-h

 drivers/i2c/i2c-adap-ite.c           |  278 ----------
 drivers/i2c/i2c-algo-ibm_ocp.c       |  900 -----------------------------------
 drivers/i2c/i2c-algo-ibm_ocp.h       |   55 --
 drivers/i2c/i2c-elektor.c            |  286 -----------
 drivers/i2c/i2c-elv.c                |  176 ------
 drivers/i2c/i2c-frodo.c              |   85 ---
 drivers/i2c/i2c-ibm_iic.c            |  729 ----------------------------
 drivers/i2c/i2c-ibm_iic.h            |  124 ----
 drivers/i2c/i2c-iop3xx.c             |  536 --------------------
 drivers/i2c/i2c-iop3xx.h             |  118 ----
 drivers/i2c/i2c-keywest.c            |  653 -------------------------
 drivers/i2c/i2c-keywest.h            |  110 ----
 drivers/i2c/i2c-philips-par.c        |  256 ---------
 drivers/i2c/i2c-prosavage.c          |  356 -------------
 drivers/i2c/i2c-rpx.c                |  103 ----
 drivers/i2c/i2c-velleman.c           |  161 ------
 drivers/i2c/scx200_acb.c             |  553 ---------------------
 drivers/i2c/scx200_i2c.c             |  133 -----
 drivers/i2c/Kconfig                  |  237 +--------
 drivers/i2c/Makefile                 |   18 
 drivers/i2c/busses/Kconfig           |  385 +++++++++-----
 drivers/i2c/busses/Makefile          |   22 
 drivers/i2c/busses/i2c-ali1535.c     |    4 
 drivers/i2c/busses/i2c-ali15x3.c     |    4 
 drivers/i2c/busses/i2c-amd756.c      |    4 
 drivers/i2c/busses/i2c-amd8111.c     |    3 
 drivers/i2c/busses/i2c-elektor.c     |  304 +++++++++++
 drivers/i2c/busses/i2c-elv.c         |  197 +++++++
 drivers/i2c/busses/i2c-frodo.c       |   85 +++
 drivers/i2c/busses/i2c-i801.c        |    4 
 drivers/i2c/busses/i2c-i810.c        |  256 +++++++++
 drivers/i2c/busses/i2c-ibm_iic.c     |  729 ++++++++++++++++++++++++++++
 drivers/i2c/busses/i2c-ibm_iic.h     |  124 ++++
 drivers/i2c/busses/i2c-iop3xx.c      |  536 ++++++++++++++++++++
 drivers/i2c/busses/i2c-iop3xx.h      |  118 ++++
 drivers/i2c/busses/i2c-isa.c         |   10 
 drivers/i2c/busses/i2c-ite.c         |  278 ++++++++++
 drivers/i2c/busses/i2c-keywest.c     |  653 +++++++++++++++++++++++++
 drivers/i2c/busses/i2c-keywest.h     |  110 ++++
 drivers/i2c/busses/i2c-nforce2.c     |    3 
 drivers/i2c/busses/i2c-philips-par.c |  289 ++++++++++-
 drivers/i2c/busses/i2c-piix4.c       |    4 
 drivers/i2c/busses/i2c-prosavage.c   |  410 ++++++++++++++-
 drivers/i2c/busses/i2c-rpx.c         |  105 ++++
 drivers/i2c/busses/i2c-savage4.c     |  205 +++++++
 drivers/i2c/busses/i2c-sis5595.c     |  420 ++++++++++++++++
 drivers/i2c/busses/i2c-sis630.c      |  497 +++++++++++++++++++
 drivers/i2c/busses/i2c-sis96x.c      |    3 
 drivers/i2c/busses/i2c-velleman.c    |  164 ++++++
 drivers/i2c/busses/i2c-via.c         |  184 +++++++
 drivers/i2c/busses/i2c-viapro.c      |    3 
 drivers/i2c/busses/i2c-voodoo3.c     |  248 +++++++++
 drivers/i2c/busses/scx200_acb.c      |  553 +++++++++++++++++++++
 drivers/i2c/busses/scx200_i2c.c      |  132 +++++
 drivers/i2c/chips/Kconfig            |  111 +---
 drivers/i2c/chips/adm1021.c          |   13 
 drivers/i2c/chips/it87.c             |    5 
 drivers/i2c/chips/lm75.c             |    2 
 drivers/i2c/chips/lm78.c             |    8 
 drivers/i2c/chips/lm85.c             |   16 
 drivers/i2c/chips/via686a.c          |    4 
 drivers/i2c/chips/w83781d.c          |   32 -
 drivers/i2c/i2c-adap-ite.c           |    1 
 drivers/i2c/i2c-algo-ite.c           |    1 
 drivers/i2c/i2c-core.c               |    6 
 drivers/i2c/i2c-dev.c                |    3 
 drivers/i2c/i2c-elektor.c            |    1 
 drivers/i2c/i2c-ibm_iic.c            |  729 ++++++++++++++++++++++++++++
 drivers/i2c/i2c-ibm_iic.h            |  124 ++++
 drivers/i2c/i2c-keywest.c            |    1 
 drivers/i2c/i2c-prosavage.c          |    1 
 drivers/i2c/i2c-sensor.c             |    5 
 drivers/i2c/scx200_acb.c             |    2 
 drivers/media/video/msp3400.c        |    2 
 drivers/media/video/saa5249.c        |    2 
 drivers/media/video/tuner.c          |    4 
 drivers/video/matrox/i2c-matroxfb.c  |    2 
 include/linux/i2c-id.h               |    2 
 include/linux/i2c.h                  |    9 
 79 files changed, 7794 insertions(+), 6205 deletions(-)

-----

<arvidjaar:mail.ru>:
o I2C: sysfs sensor nameing inconsistency

<mds:paradyne.com>:
o I2C: i2c-isa functionality

Greg Kroah-Hartman:
o I2C: remove I2C_VERSION and I2C_DATE as they make no sense in the kernel tree
o I2C: remove check_region usage and warning from i2c-sensor
o I2C: move the remaining i2c bus drivers to drivers/i2c/busses
o I2C: move the scx200* drivers to drivers/i2c/busses
o I2C: move i2c-velleman driver to drivers/i2c/busses
o I2C: move i2c-elektor.c driver to drivers/i2c/busses/
o I2C: clean up the i2c-elv.c driver a bit
o I2C: move i2c-elv.c driver to drivers/i2c/busses
o I2C: clean up i2c-philips-par.c driver a bit
o I2C: move the i2c-philips-par driver to drivers/i2c/busses
o I2C: fix up dependancies in the i2c/busses/Kconfig file
o I2C: clean up i2c-prosavage.c driver
o I2C: move i2c-prosavage.c driver to drivers/i2c/busses where it belongs
o I2C: clean up the drivers/i2c/Kconfig file
o I2C: clean up the i2c chips Kconfig logic and help information
o I2C: add the i2c-voodoo3 i2c bus driver
o I2C: add the i2c-savage4 i2c bus driver
o I2C: add the i2c-i810 i2c bus driver
o I2C: turn off debugging on the new sis i2c bus drivers
o I2C: clean up the i2c bus Kconfig menu and help texts
o I2C: add the i2c-via i2c bus driver
o I2C: add the i2c-sis630 i2c bus driver
o I2C: add the i2c-sis5595 i2c bus driver
o I2C: remove some usages of i2c_adapter.id as they are not used
o I2C: added new id for Radeon driver

Hirofumi Ogawa:
o DEVICE_NAME_SIZE/_HALF removal (I2C related, but fb stuff)
o DEVICE_NAME_SIZE/_HALF removal (I2C related, but v4l stuff)
o DEVICE_NAME_SIZE/_HALF removal (I2C stuff)

Martin Schlemmer:
o I2C: Fix conversion from milli volts in store_in_reg() for w83781d.c

Matt Porter:
o I2C: New PPC4xx I2C driver

Randy Hron:
o I2C: drivers/i2c version.h cleanup

author
#1 lore raw

PATCH 1/1 i2c driver fixes for 2.6.0-test5

ChangeSet 1.1153.85.1, 2003/08/27 15:24:53-07:00, [email protected]

[PATCH] I2C: added new id for Radeon driver.

As requested by [email protected]

 include/linux/i2c-id.h |    2 +-
 1 files changed, 1 insertion(+), 1 deletion(-)
include/linux/i2c-id.h +1 -1
diff -Nru a/include/linux/i2c-id.h b/include/linux/i2c-id.h
@@ -100,7 +100,7 @@
 #define I2C_DRIVERID_STM41T00	52	/* real time clock		*/
 #define I2C_DRIVERID_UDA1342	53	/* UDA1342 audio codec		*/
 #define I2C_DRIVERID_ADV7170	54	/* video encoder		*/
-
+#define I2C_DRIVERID_RADEON	55	/* I2C bus on Radeon boards	*/
 
 
 #define I2C_DRIVERID_EXP0	0xF0	/* experimental use id's	*/
author
#2 lore raw

ChangeSet 1.1153.85.2, 2003/08/27 15:29:33-07:00, [email protected]

[PATCH] I2C: i2c-isa functionality

The "functionality" return was incorrectly removed for i2c-isa.c when porting to 2.5. A driver that does nothing must return a 0 or else i2c-core assumes 0xffffffff (all functionality).

 drivers/i2c/busses/i2c-isa.c |    9 +++++++++
 1 files changed, 9 insertions(+)
drivers/i2c/busses/i2c-isa.c +9 -0
diff -Nru a/drivers/i2c/busses/i2c-isa.c b/drivers/i2c/busses/i2c-isa.c
@@ -30,10 +30,13 @@
 #include <linux/errno.h>
 #include <linux/i2c.h>
 
+static u32 isa_func(struct i2c_adapter *adapter);
+
 /* This is the actual algorithm we define */
 static struct i2c_algorithm isa_algorithm = {
 	.name		= "ISA bus algorithm",
 	.id		= I2C_ALGO_ISA,
+	.functionality	= isa_func,
 };
 
 /* There can only be one... */
@@ -44,6 +47,12 @@
 	.algo		= &isa_algorithm,
 	.name		= "ISA main adapter",
 };
+
+/* We can't do a thing... */
+static u32 isa_func(struct i2c_adapter *adapter)
+{
+	return 0;
+}
 
 static int __init i2c_isa_init(void)
 {
author
#3 lore raw

PATCH 1/1 i2c driver fixes for 2.6.0-test5

ChangeSet 1.1315.1.24, 2003/09/22 15:00:04-07:00, [email protected]

[PATCH] I2C: move the remaining i2c bus drivers to drivers/i2c/busses

 drivers/i2c/i2c-adap-ite.c       |  278 --------------
 drivers/i2c/i2c-frodo.c          |   85 ----
 drivers/i2c/i2c-ibm_iic.c        |  729 ---------------------------------------
 drivers/i2c/i2c-ibm_iic.h        |  124 ------
 drivers/i2c/i2c-iop3xx.c         |  536 ----------------------------
 drivers/i2c/i2c-iop3xx.h         |  118 ------
 drivers/i2c/i2c-keywest.c        |  653 ----------------------------------
 drivers/i2c/i2c-keywest.h        |  110 -----
 drivers/i2c/i2c-rpx.c            |  103 -----
 drivers/i2c/Kconfig              |   35 -
 drivers/i2c/Makefile             |   10 
 drivers/i2c/busses/Kconfig       |   35 +
 drivers/i2c/busses/Makefile      |    9 
 drivers/i2c/busses/i2c-frodo.c   |   85 ++++
 drivers/i2c/busses/i2c-ibm_iic.c |  729 +++++++++++++++++++++++++++++++++++++++
 drivers/i2c/busses/i2c-ibm_iic.h |  124 ++++++
 drivers/i2c/busses/i2c-iop3xx.c  |  536 ++++++++++++++++++++++++++++
 drivers/i2c/busses/i2c-iop3xx.h  |  118 ++++++
 drivers/i2c/busses/i2c-ite.c     |  278 ++++++++++++++
 drivers/i2c/busses/i2c-keywest.c |  653 ++++++++++++++++++++++++++++++++++
 drivers/i2c/busses/i2c-keywest.h |  110 +++++
 drivers/i2c/busses/i2c-rpx.c     |  103 +++++
 22 files changed, 2781 insertions(+), 2780 deletions(-)
drivers/i2c/Kconfig +1 -34
diff -Nru a/drivers/i2c/Kconfig b/drivers/i2c/Kconfig
@@ -59,17 +59,7 @@
 	  This support is also available as a module.  If so, the module 
 	  will be called i2c-algo-pcf.
 
-config I2C_KEYWEST
-	tristate "Powermac Keywest I2C interface"
-	depends on I2C && PPC_PMAC
-	help
-	  This supports the use of the I2C interface in the combo-I/O
-	  chip on recent Apple machines.  Say Y if you have such a machine.
-
-	  This support is also available as a module.  If so, the module 
-	  will be called i2c-keywest.
-
-config ITE_I2C_ALGO
+config I2C_ALGOITE
 	tristate "ITE I2C Algorithm"
 	depends on MIPS_ITE8172 && I2C
 	help
@@ -80,32 +70,9 @@
 	  This support is also available as a module.  If so, the module 
 	  will be called i2c-algo-ite.
 
-config ITE_I2C_ADAP
-	tristate "ITE I2C Adapter"
-	depends on ITE_I2C_ALGO
-	help
-	  This supports the ITE8172 I2C peripheral found on some MIPS
-	  systems. Say Y if you have one of these. You should also say Y for
-	  the ITE I2C driver algorithm support above.
-
-	  This support is also available as a module.  If so, the module 
-	  will be called i2c-adap-ite.
-
 config I2C_ALGO8XX
 	tristate "MPC8xx CPM I2C interface"
 	depends on 8xx && I2C
-
-config I2C_RPXLITE
-	tristate "Embedded Planet RPX Lite/Classic suppoort"
-	depends on (RPXLITE || RPXCLASSIC) && I2C_ALGO8XX
-
-config I2C_IBM_IIC
-	tristate "IBM IIC I2C"
-	depends on IBM_OCP && I2C
-
-config I2C_IOP3XX
-	tristate "Intel XScale IOP3xx on-chip I2C interface"
-	depends on ARCH_IOP3XX && I2C
 
 	source drivers/i2c/busses/Kconfig
 	source drivers/i2c/chips/Kconfig
drivers/i2c/Makefile +3 -7
diff -Nru a/drivers/i2c/Makefile b/drivers/i2c/Makefile
@@ -1,15 +1,11 @@
 #
-# Makefile for the kernel i2c bus driver.
+# Makefile for the i2c core.
 #
 
 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_KEYWEST)	+= i2c-keywest.o
-obj-$(CONFIG_ITE_I2C_ALGO)	+= i2c-algo-ite.o
-obj-$(CONFIG_ITE_I2C_ADAP)	+= i2c-adap-ite.o
-obj-$(CONFIG_I2C_IBM_IIC)	+= i2c-ibm_iic.o
-obj-$(CONFIG_I2C_SENSOR)	+= i2c-sensor.o
-obj-$(CONFIG_I2C_IOP3XX)	+= i2c-iop3xx.o
+obj-$(CONFIG_I2C_ALGOITE)	+= i2c-algo-ite.o
 obj-y				+= busses/ chips/
drivers/i2c/busses/Kconfig +34 -1
diff -Nru a/drivers/i2c/busses/Kconfig b/drivers/i2c/busses/Kconfig
@@ -2,7 +2,7 @@
 # Sensor device configuration
 #
 
-menu "I2C Hardware Sensors Mainboard support"
+menu "I2C Hardware Bus support"
 
 config I2C_ALI1535
 	tristate "ALI 1535"
@@ -97,6 +97,14 @@
 	  This driver can also be built as a module.  If so, the module
 	  will be called i2c-i810.
 
+config I2C_IBM_IIC
+	tristate "IBM IIC I2C"
+	depends on IBM_OCP && I2C
+
+config I2C_IOP3XX
+	tristate "Intel XScale IOP3xx on-chip I2C interface"
+	depends on ARCH_IOP3XX && I2C
+
 config I2C_ISA
 	tristate "ISA Bus support"
 	depends on I2C && ISA && EXPERIMENTAL
@@ -107,6 +115,27 @@
 	  This driver can also be built as a module.  If so, the module
 	  will be called i2c-isa.
 
+config I2C_ITE
+	tristate "ITE I2C Adapter"
+	depends on I2C_ALGOITE
+	help
+	  This supports the ITE8172 I2C peripheral found on some MIPS
+	  systems. Say Y if you have one of these. You should also say Y for
+	  the ITE I2C driver algorithm support above.
+
+	  This support is also available as a module.  If so, the module 
+	  will be called i2c-ite.
+
+config I2C_KEYWEST
+	tristate "Powermac Keywest I2C interface"
+	depends on I2C && PPC_PMAC
+	help
+	  This supports the use of the I2C interface in the combo-I/O
+	  chip on recent Apple machines.  Say Y if you have such a machine.
+
+	  This support is also available as a module.  If so, the module 
+	  will be called i2c-keywest.
+
 config I2C_NFORCE2
 	tristate "Nvidia Nforce2"
 	depends on I2C && PCI && EXPERIMENTAL
@@ -155,6 +184,10 @@
 
 	  This support is also available as a module.  If so, the module 
 	  will be called i2c-prosavage.
+
+config I2C_RPXLITE
+	tristate "Embedded Planet RPX Lite/Classic suppoort"
+	depends on (RPXLITE || RPXCLASSIC) && I2C_ALGO8XX
 
 config I2C_SAVAGE4
 	tristate "S3 Savage 4"
drivers/i2c/busses/Makefile +7 -2
diff -Nru a/drivers/i2c/busses/Makefile b/drivers/i2c/busses/Makefile
@@ -1,5 +1,5 @@
 #
-# Makefile for the kernel hardware sensors bus drivers.
+# Makefile for the i2c bus drivers.
 #
 
 obj-$(CONFIG_I2C_ALI1535)	+= i2c-ali1535.o
@@ -10,11 +10,16 @@
 obj-$(CONFIG_I2C_ELV)		+= i2c-elv.o
 obj-$(CONFIG_I2C_I801)		+= i2c-i801.o
 obj-$(CONFIG_I2C_I810)		+= i2c-i810.o
+obj-$(CONFIG_I2C_IBM_IIC)	+= i2c-ibm_iic.o
+obj-$(CONFIG_I2C_IOP3XX)	+= i2c-iop3xx.o
 obj-$(CONFIG_I2C_ISA)		+= i2c-isa.o
+obj-$(CONFIG_I2C_ITE)		+= i2c-ite.o
+obj-$(CONFIG_I2C_KEYWEST)	+= i2c-keywest.o
 obj-$(CONFIG_I2C_NFORCE2)	+= i2c-nforce2.o
 obj-$(CONFIG_I2C_PHILIPSPAR)	+= i2c-philips-par.o
 obj-$(CONFIG_I2C_PIIX4)		+= i2c-piix4.o
 obj-$(CONFIG_I2C_PROSAVAGE)	+= i2c-prosavage.o
+obj-$(CONFIG_I2C_RPXLITE)	+= i2c-rpx.o
 obj-$(CONFIG_I2C_SAVAGE4)	+= i2c-savage4.o
 obj-$(CONFIG_I2C_SIS5595)	+= i2c-sis5595.o
 obj-$(CONFIG_I2C_SIS630)	+= i2c-sis630.o
@@ -23,5 +28,5 @@
 obj-$(CONFIG_I2C_VIA)		+= i2c-via.o
 obj-$(CONFIG_I2C_VIAPRO)	+= i2c-viapro.o
 obj-$(CONFIG_I2C_VOODOO3)	+= i2c-voodoo3.o
-obj-$(CONFIG_SCx200_I2C)	+= scx200_i2c.o
 obj-$(CONFIG_SCx200_ACB)	+= scx200_acb.o
+obj-$(CONFIG_SCx200_I2C)	+= scx200_i2c.o
drivers/i2c/busses/i2c-frodo.c new file +85 -0

85 lines not on this page · raw message

drivers/i2c/busses/i2c-ibm_iic.c new file +728 -0

728 lines not on this page · raw message

drivers/i2c/busses/i2c-ibm_iic.h new file +124 -0

124 lines not on this page · raw message

drivers/i2c/busses/i2c-iop3xx.c new file +536 -0

536 lines not on this page · raw message

drivers/i2c/busses/i2c-iop3xx.h new file +118 -0

118 lines not on this page · raw message

drivers/i2c/busses/i2c-ite.c new file +278 -0

278 lines not on this page · raw message

drivers/i2c/busses/i2c-keywest.c new file +653 -0

653 lines not on this page · raw message

drivers/i2c/busses/i2c-keywest.h new file +110 -0

110 lines not on this page · raw message

drivers/i2c/busses/i2c-rpx.c new file +103 -0

103 lines not on this page · raw message

drivers/i2c/i2c-adap-ite.c deleted +0 -278

110 lines not on this page · raw message

drivers/i2c/i2c-frodo.c deleted +0 -85

85 lines not on this page · raw message

drivers/i2c/i2c-ibm_iic.c deleted +0 -728

728 lines not on this page · raw message

drivers/i2c/i2c-ibm_iic.h deleted +0 -124

124 lines not on this page · raw message

drivers/i2c/i2c-iop3xx.c deleted +0 -536

536 lines not on this page · raw message

drivers/i2c/i2c-iop3xx.h deleted +0 -118

118 lines not on this page · raw message

drivers/i2c/i2c-keywest.c deleted +0 -653

653 lines not on this page · raw message

drivers/i2c/i2c-keywest.h deleted +0 -110

110 lines not on this page · raw message

drivers/i2c/i2c-rpx.c deleted +0 -103

103 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
#4 lore raw

ChangeSet 1.1315.1.25, 2003/09/22 15:11:24-07:00, [email protected]

[PATCH] I2C: remove check_region usage and warning from i2c-sensor

 drivers/i2c/i2c-sensor.c |    5 +++--
 1 files changed, 3 insertions(+), 2 deletions(-)
drivers/i2c/i2c-sensor.c +3 -2
diff -Nru a/drivers/i2c/i2c-sensor.c b/drivers/i2c/i2c-sensor.c
@@ -50,8 +50,9 @@
 		return -1;
 
 	for (addr = 0x00; addr <= (is_isa ? 0xffff : 0x7f); addr++) {
-		/* XXX: WTF is going on here??? */
-		if ((is_isa && check_region(addr, 1)) ||
+		void *region_used = request_region(addr, 1, "foo");
+		release_region(addr, 1);
+		if ((is_isa && (region_used == NULL)) ||
 		    (!is_isa && i2c_check_addr(adapter, addr)))
 			continue;
 
author
#5 lore raw

ChangeSet 1.1315.1.26, 2003/09/22 15:24:36-07:00, [email protected]

[PATCH] I2C: sysfs sensor nameing inconsistency

Quoted 4 lines

That's what you are going to have to set the name file to in the i2c_client structure, much like your patch did. Then look at the different name files in each device directory to see what kind of device it is (chip, subclient, etc.)

OK attached patch sets all names to just chip name for chips themselves and "chipname subclient" when subclient ios registered.

 drivers/i2c/chips/adm1021.c |   11 +----------
 drivers/i2c/chips/it87.c    |    3 ---
 drivers/i2c/chips/lm78.c    |    6 +++---
 drivers/i2c/chips/lm85.c    |    6 +-----
 drivers/i2c/chips/via686a.c |    2 +-
 drivers/i2c/chips/w83781d.c |   24 ++++++++++++------------
 6 files changed, 18 insertions(+), 34 deletions(-)
drivers/i2c/chips/adm1021.c +1 -10
diff -Nru a/drivers/i2c/chips/adm1021.c b/drivers/i2c/chips/adm1021.c
@@ -225,7 +225,6 @@
 	struct adm1021_data *data;
 	int err = 0;
 	const char *type_name = "";
-	const char *client_name = "";
 
 	/* Make sure we aren't probing the ISA bus!! This is just a safety check
 	   at this moment; i2c_detect really won't call us. */
@@ -291,28 +290,20 @@
 
 	if (kind == max1617) {
 		type_name = "max1617";
-		client_name = "MAX1617 chip";
 	} else if (kind == max1617a) {
 		type_name = "max1617a";
-		client_name = "MAX1617A chip";
 	} else if (kind == adm1021) {
 		type_name = "adm1021";
-		client_name = "ADM1021 chip";
 	} else if (kind == adm1023) {
 		type_name = "adm1023";
-		client_name = "ADM1023 chip";
 	} else if (kind == thmc10) {
 		type_name = "thmc10";
-		client_name = "THMC10 chip";
 	} else if (kind == lm84) {
 		type_name = "lm84";
-		client_name = "LM84 chip";
 	} else if (kind == gl523sm) {
 		type_name = "gl523sm";
-		client_name = "GL523SM chip";
 	} else if (kind == mc1066) {
 		type_name = "mc1066";
-		client_name = "MC1066 chip";
 	} else {
 		dev_err(&adapter->dev, "Internal error: unknown kind (%d)?!?",
 			kind);
@@ -320,7 +311,7 @@
 	}
 
 	/* Fill in the remaining client fields and put it into the global list */
-	strlcpy(new_client->name, client_name, I2C_NAME_SIZE);
+	strlcpy(new_client->name, type_name, I2C_NAME_SIZE);
 	data->type = kind;
 
 	new_client->id = adm1021_id++;
drivers/i2c/chips/it87.c +0 -3
diff -Nru a/drivers/i2c/chips/it87.c b/drivers/i2c/chips/it87.c
@@ -592,7 +592,6 @@
 	struct it87_data *data;
 	int err = 0;
 	const char *name = "";
-	const char *client_name = "";
 	int is_isa = i2c_is_isa_adapter(adapter);
 
 	if (!is_isa && 
@@ -681,10 +680,8 @@
 
 	if (kind == it87) {
 		name = "it87";
-		client_name = "IT87 chip";
 	} /* else if (kind == it8712) {
 		name = "it8712";
-		client_name = "IT87-J chip";
 	} */ else {
 		dev_dbg(&adapter->dev, "Internal error: unknown kind (%d)?!?",
 			kind);
drivers/i2c/chips/lm78.c +3 -3
diff -Nru a/drivers/i2c/chips/lm78.c b/drivers/i2c/chips/lm78.c
@@ -625,11 +625,11 @@
 	}
 
 	if (kind == lm78) {
-		client_name = "LM78 chip";
+		client_name = "lm78";
 	} else if (kind == lm78j) {
-		client_name = "LM78-J chip";
+		client_name = "lm78-j";
 	} else if (kind == lm79) {
-		client_name = "LM79 chip";
+		client_name = "lm79";
 	} else {
 		dev_dbg(&adapter->dev, "Internal error: unknown kind (%d)?!?",
 			kind);
drivers/i2c/chips/lm85.c +1 -5
diff -Nru a/drivers/i2c/chips/lm85.c b/drivers/i2c/chips/lm85.c
@@ -853,24 +853,20 @@
 	/* Fill in the chip specific driver values */
 	if ( kind == any_chip ) {
 		type_name = "lm85";
-		strlcpy(new_client->name, "Generic LM85", I2C_NAME_SIZE);
 	} else if ( kind == lm85b ) {
 		type_name = "lm85b";
-		strlcpy(new_client->name, "National LM85-B", I2C_NAME_SIZE);
 	} else if ( kind == lm85c ) {
 		type_name = "lm85c";
-		strlcpy(new_client->name, "National LM85-C", I2C_NAME_SIZE);
 	} else if ( kind == adm1027 ) {
 		type_name = "adm1027";
-		strlcpy(new_client->name, "Analog Devices ADM1027", I2C_NAME_SIZE);
 	} else if ( kind == adt7463 ) {
 		type_name = "adt7463";
-		strlcpy(new_client->name, "Analog Devices ADT7463", I2C_NAME_SIZE);
 	} else {
 		dev_dbg(&adapter->dev, "Internal error, invalid kind (%d)!", kind);
 		err = -EFAULT ;
 		goto ERROR1;
 	}
+	strlcpy(new_client->name, type_name, I2C_NAME_SIZE);
 
 	/* Fill in the remaining client fields */
 	new_client->id = lm85_id++;
drivers/i2c/chips/via686a.c +1 -1
diff -Nru a/drivers/i2c/chips/via686a.c b/drivers/i2c/chips/via686a.c
@@ -671,7 +671,7 @@
 	struct i2c_client *new_client;
 	struct via686a_data *data;
 	int err = 0;
-	const char client_name[] = "via686a chip";
+	const char client_name[] = "via686a";
 	u16 val;
 
 	/* Make sure we are probing the ISA bus!!  */
drivers/i2c/chips/w83781d.c +12 -12
diff -Nru a/drivers/i2c/chips/w83781d.c b/drivers/i2c/chips/w83781d.c
@@ -1098,15 +1098,15 @@
 	}
 
 	if (kind == w83781d)
-		client_name = "W83781D subclient";
+		client_name = "w83781d subclient";
 	else if (kind == w83782d)
-		client_name = "W83782D subclient";
+		client_name = "w83782d subclient";
 	else if (kind == w83783s)
-		client_name = "W83783S subclient";
+		client_name = "w83783s subclient";
 	else if (kind == w83627hf)
-		client_name = "W83627HF subclient";
+		client_name = "w83627hf subclient";
 	else if (kind == as99127f)
-		client_name = "AS99127F subclient";
+		client_name = "as99127f subclient";
 	else
 		client_name = "unknown subclient?";
 
@@ -1304,20 +1304,20 @@
 	}
 
 	if (kind == w83781d) {
-		client_name = "W83781D chip";
+		client_name = "w83781d";
 	} else if (kind == w83782d) {
-		client_name = "W83782D chip";
+		client_name = "w83782d";
 	} else if (kind == w83783s) {
-		client_name = "W83783S chip";
+		client_name = "w83783s";
 	} else if (kind == w83627hf) {
 		if (val1 == 0x90)
-			client_name = "W83627THF chip";
+			client_name = "w83627thf";
 		else
-			client_name = "W83627HF chip";
+			client_name = "w83627hf";
 	} else if (kind == as99127f) {
-		client_name = "AS99127F chip";
+		client_name = "as99127f";
 	} else if (kind == w83697hf) {
-		client_name = "W83697HF chip";
+		client_name = "w83697hf";
 	} else {
 		dev_err(&new_client->dev, "Internal error: unknown "
 						"kind (%d)?!?", kind);
author
#6 lore raw

ChangeSet 1.1381, 2003/09/22 16:03:26-07:00, [email protected]

[PATCH] I2C: remove I2C_VERSION and I2C_DATE as they make no sense in the kernel tree.

 drivers/i2c/busses/i2c-ali1535.c  |    1 -
 drivers/i2c/busses/i2c-ali15x3.c  |    1 -
 drivers/i2c/busses/i2c-elektor.c  |   18 +++++++++---------
 drivers/i2c/busses/i2c-i801.c     |    1 -
 drivers/i2c/busses/i2c-piix4.c    |    1 -
 drivers/i2c/busses/i2c-rpx.c      |    2 +-
 drivers/i2c/busses/i2c-sis5595.c  |    1 -
 drivers/i2c/busses/i2c-sis630.c   |    1 -
 drivers/i2c/busses/i2c-velleman.c |    4 ++--
 drivers/i2c/busses/i2c-via.c      |    1 -
 drivers/i2c/i2c-dev.c             |    3 +--
 include/linux/i2c.h               |    3 ---
 12 files changed, 13 insertions(+), 24 deletions(-)
drivers/i2c/busses/i2c-ali1535.c +0 -1
diff -Nru a/drivers/i2c/busses/i2c-ali1535.c b/drivers/i2c/busses/i2c-ali1535.c
@@ -525,7 +525,6 @@
 
 static int __init i2c_ali1535_init(void)
 {
-	printk(KERN_INFO "i2c-ali1535 version %s (%s)\n", I2C_VERSION, I2C_DATE);
 	return pci_module_init(&ali1535_driver);
 }
 
drivers/i2c/busses/i2c-ali15x3.c +0 -1
diff -Nru a/drivers/i2c/busses/i2c-ali15x3.c b/drivers/i2c/busses/i2c-ali15x3.c
@@ -517,7 +517,6 @@
 
 static int __init i2c_ali15x3_init(void)
 {
-	printk("i2c-ali15x3.o version %s (%s)\n", I2C_VERSION, I2C_DATE);
 	return pci_module_init(&ali15x3_driver);
 }
 
drivers/i2c/busses/i2c-elektor.c +9 -9
diff -Nru a/drivers/i2c/busses/i2c-elektor.c b/drivers/i2c/busses/i2c-elektor.c
@@ -77,7 +77,7 @@
 		val |= I2C_PCF_ENI;
 	}
 
-	DEB3(printk(KERN_DEBUG "i2c-elektor.o: Write 0x%X 0x%02X\n", address, val & 255));
+	DEB3(printk(KERN_DEBUG "i2c-elektor: Write 0x%X 0x%02X\n", address, val & 255));
 
 	switch (mmapped) {
 	case 0: /* regular I/O */
@@ -98,7 +98,7 @@
 	int address = ctl ? (base + 1) : base;
 	int val = mmapped ? readb(address) : inb(address);
 
-	DEB3(printk(KERN_DEBUG "i2c-elektor.o: Read 0x%X 0x%02X\n", address, val));
+	DEB3(printk(KERN_DEBUG "i2c-elektor: Read 0x%X 0x%02X\n", address, val));
 
 	return (val);
 }
@@ -143,14 +143,14 @@
 	if (!mmapped) {
 		if (!request_region(base, 2, "i2c (isa bus adapter)")) {
 			printk(KERN_ERR
-			       "i2c-elektor.o: requested I/O region (0x%X:2) "
+			       "i2c-elektor: requested I/O region (0x%X:2) "
 			       "is in use.\n", base);
 			return -ENODEV;
 		}
 	}
 	if (irq > 0) {
 		if (request_irq(irq, pcf_isa_handler, 0, "PCF8584", 0) < 0) {
-			printk(KERN_ERR "i2c-elektor.o: Request irq%d failed\n", irq);
+			printk(KERN_ERR "i2c-elektor: Request irq%d failed\n", irq);
 			irq = 0;
 		} else
 			enable_irq(irq);
@@ -196,7 +196,7 @@
 			/* yeap, we've found cypress, let's check config */
 			if (!pci_read_config_byte(cy693_dev, 0x47, &config)) {
 				
-				DEB3(printk(KERN_DEBUG "i2c-elektor.o: found cy82c693, config register 0x47 = 0x%02x.\n", config));
+				DEB3(printk(KERN_DEBUG "i2c-elektor: found cy82c693, config register 0x47 = 0x%02x.\n", config));
 
 				/* UP2000 board has this register set to 0xe1,
                                    but the most significant bit as seems can be 
@@ -218,7 +218,7 @@
 					   8.25 MHz (PCI/4) clock
 					   (this can be read from cypress) */
 					clock = I2C_PCF_CLK | I2C_PCF_TRNS90;
-					printk(KERN_INFO "i2c-elektor.o: found API UP2000 like board, will probe PCF8584 later.\n");
+					printk(KERN_INFO "i2c-elektor: found API UP2000 like board, will probe PCF8584 later.\n");
 				}
 			}
 		}
@@ -227,11 +227,11 @@
 
 	/* sanity checks for mmapped I/O */
 	if (mmapped && base < 0xc8000) {
-		printk(KERN_ERR "i2c-elektor.o: incorrect base address (0x%0X) specified for mmapped I/O.\n", base);
+		printk(KERN_ERR "i2c-elektor: incorrect base address (0x%0X) specified for mmapped I/O.\n", base);
 		return -ENODEV;
 	}
 
-	printk(KERN_INFO "i2c-elektor.o: i2c pcf8584-isa adapter module version %s (%s)\n", I2C_VERSION, I2C_DATE);
+	printk(KERN_INFO "i2c-elektor: i2c pcf8584-isa adapter driver\n");
 
 	if (base == 0) {
 		base = DEFAULT_BASE;
@@ -243,7 +243,7 @@
 	if (i2c_pcf_add_bus(&pcf_isa_ops) < 0)
 		goto fail;
 	
-	printk(KERN_ERR "i2c-elektor.o: found device at %#x.\n", base);
+	printk(KERN_ERR "i2c-elektor: found device at %#x.\n", base);
 
 	return 0;
 
drivers/i2c/busses/i2c-i801.c +0 -1
diff -Nru a/drivers/i2c/busses/i2c-i801.c b/drivers/i2c/busses/i2c-i801.c
@@ -616,7 +616,6 @@
 
 static int __init i2c_i801_init(void)
 {
-	printk(KERN_INFO "i2c-i801 version %s (%s)\n", I2C_VERSION, I2C_DATE);
 	return pci_module_init(&i801_driver);
 }
 
drivers/i2c/busses/i2c-piix4.c +0 -1
diff -Nru a/drivers/i2c/busses/i2c-piix4.c b/drivers/i2c/busses/i2c-piix4.c
@@ -473,7 +473,6 @@
 
 static int __init i2c_piix4_init(void)
 {
-	printk(KERN_INFO "i2c-piix4 version %s (%s)\n", I2C_VERSION, I2C_DATE);
 	return pci_module_init(&piix4_driver);
 }
 
drivers/i2c/busses/i2c-rpx.c +1 -1
diff -Nru a/drivers/i2c/busses/i2c-rpx.c b/drivers/i2c/busses/i2c-rpx.c
@@ -78,7 +78,7 @@
 
 int __init i2c_rpx_init(void)
 {
-	printk("i2c-rpx.o: i2c MPC8xx module version %s (%s)\n", I2C_VERSION, I2C_DATE);
+	printk(KERN_INFO "i2c-rpx: i2c MPC8xx driver\n");
 
 	/* reset hardware to sane state */
 	rpx_iic_init(&rpx_data);
drivers/i2c/busses/i2c-sis5595.c +0 -1
diff -Nru a/drivers/i2c/busses/i2c-sis5595.c b/drivers/i2c/busses/i2c-sis5595.c
@@ -399,7 +399,6 @@
 
 static int __init i2c_sis5595_init(void)
 {
-	printk(KERN_INFO "i2c-sis5595 version %s (%s)\n", I2C_VERSION, I2C_DATE);
 	return pci_module_init(&sis5595_driver);
 }
 
drivers/i2c/busses/i2c-sis630.c +0 -1
diff -Nru a/drivers/i2c/busses/i2c-sis630.c b/drivers/i2c/busses/i2c-sis630.c
@@ -474,7 +474,6 @@
 
 static int __init i2c_sis630_init(void)
 {
-	printk("i2c-sis630.o version %s (%s)\n", I2C_VERSION, I2C_DATE);
 	return pci_module_init(&sis630_driver);
 }
 
drivers/i2c/busses/i2c-velleman.c +2 -2
diff -Nru a/drivers/i2c/busses/i2c-velleman.c b/drivers/i2c/busses/i2c-velleman.c
@@ -120,7 +120,7 @@
 
 static int __init i2c_bitvelle_init(void)
 {
-	printk(KERN_INFO "i2c-velleman.o: i2c Velleman K8000 adapter module version %s (%s)\n", I2C_VERSION, I2C_DATE);
+	printk(KERN_INFO "i2c-velleman: i2c Velleman K8000 driver\n");
 	if (base==0) {
 		/* probe some values */
 		base=DEFAULT_BASE;
@@ -140,7 +140,7 @@
 			return -ENODEV;
 		}
 	}
-	printk(KERN_DEBUG "i2c-velleman.o: found device at %#x.\n",base);
+	printk(KERN_DEBUG "i2c-velleman: found device at %#x.\n",base);
 	return 0;
 }
 
drivers/i2c/busses/i2c-via.c +0 -1
diff -Nru a/drivers/i2c/busses/i2c-via.c b/drivers/i2c/busses/i2c-via.c
@@ -165,7 +165,6 @@
 
 static int __init i2c_vt586b_init(void)
 {
-	printk(KERN_INFO "i2c-via version %s (%s)\n", I2C_VERSION, I2C_DATE);
 	return pci_module_init(&vt586b_driver);
 }
 
drivers/i2c/i2c-dev.c +1 -2
diff -Nru a/drivers/i2c/i2c-dev.c b/drivers/i2c/i2c-dev.c
@@ -505,8 +505,7 @@
 {
 	int res;
 
-	printk(KERN_INFO "i2c /dev entries driver module version %s (%s)\n",
-		I2C_VERSION, I2C_DATE);
+	printk(KERN_INFO "i2c /dev entries driver\n");
 
 	if (register_chrdev(I2C_MAJOR,"i2c",&i2cdev_fops)) {
 		printk(KERN_ERR "i2c-dev.o: unable to get major %d for i2c bus\n",
include/linux/i2c.h +0 -3
diff -Nru a/include/linux/i2c.h b/include/linux/i2c.h
@@ -28,9 +28,6 @@
 #ifndef _LINUX_I2C_H
 #define _LINUX_I2C_H
 
-#define I2C_DATE "20021208"
-#define I2C_VERSION "2.7.0"
-
 #include <linux/module.h>
 #include <linux/types.h>
 #include <linux/i2c-id.h>
#7 lore raw
In reply to Greg KH

drivers/i2c/i2c-sensor.c line 55

Quoted 6 lines · Greg KH
drivers/i2c/i2c-sensor.c +3 -2
 	for (addr = 0x00; addr <= (is_isa ? 0xffff : 0x7f); addr++) {
-		/* XXX: WTF is going on here??? */
-		if ((is_isa && check_region(addr, 1)) ||
+		void *region_used = request_region(addr, 1, "foo");
+		release_region(addr, 1);
+		if ((is_isa && (region_used == NULL)) ||

WTF?? Your papering over bugs again, this doesn't help at all.

author
#8 lore raw
Quoted 9 lines · Christoph Hellwig

drivers/i2c/i2c-sensor.c line 55

Quoted 6 lines · Greg KH
drivers/i2c/i2c-sensor.c +3 -2
 	for (addr = 0x00; addr <= (is_isa ? 0xffff : 0x7f); addr++) {
-		/* XXX: WTF is going on here??? */
-		if ((is_isa && check_region(addr, 1)) ||
+		void *region_used = request_region(addr, 1, "foo");
+		release_region(addr, 1);
+		if ((is_isa && (region_used == NULL)) ||

WTF?? Your papering over bugs again, this doesn't help at all.

Why?

Ok, from my reading of this horrible chunk of code it does the following:
- if this is a isa based controller, then we check the region that is to be used.
- If it is already in use by someone else, then we skip it, and move on to the next address.
- If it is not in use, then we pass the address down to the chip driver and let it try to find the chip at this address (it will do the reserving of the address space on its own.)

So basically, check_region is pretty valid here, as we are trying to see if something else is already at this address, to try to prevent i2c drivers from stomping on each other. I replaced this with a request_region()/release_region() pair to get rid of the compiler warning.

Is this your understanding too? Or do you think we should just get rid of the request_region() check here all together?

thanks,

greg k-h

#9 lore raw
Quoted 10 lines · Greg KH

Ok, from my reading of this horrible chunk of code it does the following:
- if this is a isa based controller, then we check the region that is to be used.
- If it is already in use by someone else, then we skip it, and move on to the next address.
- If it is not in use, then we pass the address down to the chip driver and let it try to find the chip at this address (it will do the reserving of the address space on its own.)

Quoted 8 lines

So basically, check_region is pretty valid here, as we are trying to see if something else is already at this address, to try to prevent i2c drivers from stomping on each other. I replaced this with a request_region()/release_region() pair to get rid of the compiler warning.

Is this your understanding too? Or do you think we should just get rid of the request_region() check here all together?

Yes, either we should get rid of it or move claiming the address to the i2c midlayer (not sure whether that's a good idea). But an opencoded check_region doesn't make any more sense than an explicit one. And you're also looking at the pointer it returned after it's already invalid again..

author
#10 lore raw
Quoted 17 lines · Christoph Hellwig
Quoted 16 lines · Greg KH

Ok, from my reading of this horrible chunk of code it does the following:
- if this is a isa based controller, then we check the region that is to be used.
- If it is already in use by someone else, then we skip it, and move on to the next address.
- If it is not in use, then we pass the address down to the chip driver and let it try to find the chip at this address (it will do the reserving of the address space on its own.)

So basically, check_region is pretty valid here, as we are trying to see if something else is already at this address, to try to prevent i2c drivers from stomping on each other. I replaced this with a request_region()/release_region() pair to get rid of the compiler warning.

Quoted 8 lines
Quoted 2 lines

Is this your understanding too? Or do you think we should just get rid of the request_region() check here all together?

Yes, either we should get rid of it or move claiming the address to the i2c midlayer (not sure whether that's a good idea). But an opencoded check_region doesn't make any more sense than an explicit one. And you're also looking at the pointer it returned after it's already invalid again..

Heh, good point. Ok, I dug out a box that uses a isa i2c adapter and tested the patch below. As the chip drivers are using request_region properly, taking this check out of i2c-sensor.c makes sense.

thanks,

greg k-h

drivers/i2c/i2c-sensor.c +1 -4
diff -Nru a/drivers/i2c/i2c-sensor.c b/drivers/i2c/i2c-sensor.c
@@ -50,10 +50,7 @@
 		return -1;
 
 	for (addr = 0x00; addr <= (is_isa ? 0xffff : 0x7f); addr++) {
-		void *region_used = request_region(addr, 1, "foo");
-		release_region(addr, 1);
-		if ((is_isa && (region_used == NULL)) ||
-		    (!is_isa && i2c_check_addr(adapter, addr)))
+		if (!is_isa && i2c_check_addr(adapter, addr))
 			continue;
 
 		/* If it is in one of the force entries, we don't do any
#11 lore raw
Quoted 3 lines · Greg KH

Heh, good point. Ok, I dug out a box that uses a isa i2c adapter and tested the patch below. As the chip drivers are using request_region properly, taking this check out of i2c-sensor.c makes sense.

Looks better already, but I really wonder WTF this i2c_check_addr thing is. It looks at least as racy as check_region..

author
#12 lore raw
In reply to Greg KH

ChangeSet 1.1153.85.3, 2003/08/27 15:32:28-07:00, [email protected]

[PATCH] DEVICE_NAME_SIZE/_HALF removal (I2C stuff)

 drivers/i2c/busses/i2c-ali1535.c |    2 +-
 drivers/i2c/busses/i2c-ali15x3.c |    2 +-
 drivers/i2c/busses/i2c-amd756.c  |    2 +-
 drivers/i2c/busses/i2c-amd8111.c |    2 +-
 drivers/i2c/busses/i2c-i801.c    |    2 +-
 drivers/i2c/busses/i2c-nforce2.c |    2 +-
 drivers/i2c/busses/i2c-piix4.c   |    2 +-
 drivers/i2c/busses/i2c-sis96x.c  |    2 +-
 drivers/i2c/busses/i2c-viapro.c  |    2 +-
 drivers/i2c/chips/adm1021.c      |    2 +-
 drivers/i2c/chips/it87.c         |    2 +-
 drivers/i2c/chips/lm75.c         |    2 +-
 drivers/i2c/chips/lm78.c         |    2 +-
 drivers/i2c/chips/lm85.c         |   10 +++++-----
 drivers/i2c/chips/via686a.c      |    2 +-
 drivers/i2c/chips/w83781d.c      |    4 ++--
 drivers/i2c/scx200_acb.c         |    2 +-
 include/linux/i2c.h              |    6 ++++--
 18 files changed, 26 insertions(+), 24 deletions(-)
drivers/i2c/busses/i2c-ali1535.c +1 -1
diff -Nru a/drivers/i2c/busses/i2c-ali1535.c b/drivers/i2c/busses/i2c-ali1535.c
@@ -507,7 +507,7 @@
 	/* set up the driverfs linkage to our parent device */
 	ali1535_adapter.dev.parent = &dev->dev;
 
-	snprintf(ali1535_adapter.name, DEVICE_NAME_SIZE, 
+	snprintf(ali1535_adapter.name, I2C_NAME_SIZE, 
 		"SMBus ALI1535 adapter at %04x", ali1535_smba);
 	return i2c_add_adapter(&ali1535_adapter);
 }
drivers/i2c/busses/i2c-ali15x3.c +1 -1
diff -Nru a/drivers/i2c/busses/i2c-ali15x3.c b/drivers/i2c/busses/i2c-ali15x3.c
@@ -498,7 +498,7 @@
 	/* set up the driverfs linkage to our parent device */
 	ali15x3_adapter.dev.parent = &dev->dev;
 
-	snprintf(ali15x3_adapter.name, DEVICE_NAME_SIZE,
+	snprintf(ali15x3_adapter.name, I2C_NAME_SIZE,
 		"SMBus ALI15X3 adapter at %04x", ali15x3_smba);
 	return i2c_add_adapter(&ali15x3_adapter);
 }
drivers/i2c/busses/i2c-amd756.c +1 -1
diff -Nru a/drivers/i2c/busses/i2c-amd756.c b/drivers/i2c/busses/i2c-amd756.c
@@ -369,7 +369,7 @@
 	/* set up the driverfs linkage to our parent device */
 	amd756_adapter.dev.parent = &pdev->dev;
 
-	snprintf(amd756_adapter.name, DEVICE_NAME_SIZE,
+	snprintf(amd756_adapter.name, I2C_NAME_SIZE,
 		"SMBus AMD75x adapter at %04x", amd756_ioport);
 
 	error = i2c_add_adapter(&amd756_adapter);
drivers/i2c/busses/i2c-amd8111.c +1 -1
diff -Nru a/drivers/i2c/busses/i2c-amd8111.c b/drivers/i2c/busses/i2c-amd8111.c
@@ -356,7 +356,7 @@
 		goto out_kfree;
 
 	smbus->adapter.owner = THIS_MODULE;
-	snprintf(smbus->adapter.name, DEVICE_NAME_SIZE,
+	snprintf(smbus->adapter.name, I2C_NAME_SIZE,
 		"SMBus2 AMD8111 adapter at %04x", smbus->base);
 	smbus->adapter.id = I2C_ALGO_SMBUS | I2C_HW_SMBUS_AMD8111;
 	smbus->adapter.class = I2C_ADAP_CLASS_SMBUS;
drivers/i2c/busses/i2c-i801.c +1 -1
diff -Nru a/drivers/i2c/busses/i2c-i801.c b/drivers/i2c/busses/i2c-i801.c
@@ -598,7 +598,7 @@
 	/* set up the driverfs linkage to our parent device */
 	i801_adapter.dev.parent = &dev->dev;
 
-	snprintf(i801_adapter.name, DEVICE_NAME_SIZE,
+	snprintf(i801_adapter.name, I2C_NAME_SIZE,
 		"SMBus I801 adapter at %04x", i801_smba);
 	return i2c_add_adapter(&i801_adapter);
 }
drivers/i2c/busses/i2c-nforce2.c +1 -1
diff -Nru a/drivers/i2c/busses/i2c-nforce2.c b/drivers/i2c/busses/i2c-nforce2.c
@@ -321,7 +321,7 @@
 	smbus->adapter = nforce2_adapter;
 	smbus->adapter.algo_data = smbus;
 	smbus->adapter.dev.parent = &dev->dev;
-	snprintf(smbus->adapter.name, DEVICE_NAME_SIZE,
+	snprintf(smbus->adapter.name, I2C_NAME_SIZE,
 		"SMBus nForce2 adapter at %04x", smbus->base);
 
 	error = i2c_add_adapter(&smbus->adapter);
drivers/i2c/busses/i2c-piix4.c +1 -1
diff -Nru a/drivers/i2c/busses/i2c-piix4.c b/drivers/i2c/busses/i2c-piix4.c
@@ -451,7 +451,7 @@
 	/* set up the driverfs linkage to our parent device */
 	piix4_adapter.dev.parent = &dev->dev;
 
-	snprintf(piix4_adapter.name, DEVICE_NAME_SIZE,
+	snprintf(piix4_adapter.name, I2C_NAME_SIZE,
 		"SMBus PIIX4 adapter at %04x", piix4_smba);
 
 	retval = i2c_add_adapter(&piix4_adapter);
drivers/i2c/busses/i2c-sis96x.c +1 -1
diff -Nru a/drivers/i2c/busses/i2c-sis96x.c b/drivers/i2c/busses/i2c-sis96x.c
@@ -318,7 +318,7 @@
 	/* set up the driverfs linkage to our parent device */
 	sis96x_adapter.dev.parent = &dev->dev;
 
-	snprintf(sis96x_adapter.name, DEVICE_NAME_SIZE,
+	snprintf(sis96x_adapter.name, I2C_NAME_SIZE,
 		"SiS96x SMBus adapter at 0x%04x", sis96x_smbus_base);
 
 	if ((retval = i2c_add_adapter(&sis96x_adapter))) {
drivers/i2c/busses/i2c-viapro.c +1 -1
diff -Nru a/drivers/i2c/busses/i2c-viapro.c b/drivers/i2c/busses/i2c-viapro.c
@@ -376,7 +376,7 @@
 	dev_dbg(&pdev->dev, "VT596_smba = 0x%X\n", vt596_smba);
 
 	vt596_adapter.dev.parent = &pdev->dev;
-	snprintf(vt596_adapter.name, DEVICE_NAME_SIZE,
+	snprintf(vt596_adapter.name, I2C_NAME_SIZE,
 			"SMBus Via Pro adapter at %04x", vt596_smba);
 	
 	return i2c_add_adapter(&vt596_adapter);
drivers/i2c/chips/adm1021.c +1 -1
diff -Nru a/drivers/i2c/chips/adm1021.c b/drivers/i2c/chips/adm1021.c
@@ -320,7 +320,7 @@
 	}
 
 	/* Fill in the remaining client fields and put it into the global list */
-	strlcpy(new_client->name, client_name, DEVICE_NAME_SIZE);
+	strlcpy(new_client->name, client_name, I2C_NAME_SIZE);
 	data->type = kind;
 
 	new_client->id = adm1021_id++;
drivers/i2c/chips/it87.c +1 -1
diff -Nru a/drivers/i2c/chips/it87.c b/drivers/i2c/chips/it87.c
@@ -692,7 +692,7 @@
 	}
 
 	/* Fill in the remaining client fields and put it into the global list */
-	strlcpy(new_client->name, name, DEVICE_NAME_SIZE);
+	strlcpy(new_client->name, name, I2C_NAME_SIZE);
 
 	data->type = kind;
 
drivers/i2c/chips/lm75.c +1 -1
diff -Nru a/drivers/i2c/chips/lm75.c b/drivers/i2c/chips/lm75.c
@@ -194,7 +194,7 @@
 	}
 
 	/* Fill in the remaining client fields and put it into the global list */
-	strlcpy(new_client->name, name, DEVICE_NAME_SIZE);
+	strlcpy(new_client->name, name, I2C_NAME_SIZE);
 
 	new_client->id = lm75_id++;
 	data->valid = 0;
drivers/i2c/chips/lm78.c +1 -1
diff -Nru a/drivers/i2c/chips/lm78.c b/drivers/i2c/chips/lm78.c
@@ -638,7 +638,7 @@
 	}
 
 	/* Fill in the remaining client fields and put into the global list */
-	strlcpy(new_client->name, client_name, DEVICE_NAME_SIZE);
+	strlcpy(new_client->name, client_name, I2C_NAME_SIZE);
 	data->type = kind;
 
 	data->valid = 0;
drivers/i2c/chips/lm85.c +5 -5
diff -Nru a/drivers/i2c/chips/lm85.c b/drivers/i2c/chips/lm85.c
@@ -853,19 +853,19 @@
 	/* Fill in the chip specific driver values */
 	if ( kind == any_chip ) {
 		type_name = "lm85";
-		strlcpy(new_client->name, "Generic LM85", DEVICE_NAME_SIZE);
+		strlcpy(new_client->name, "Generic LM85", I2C_NAME_SIZE);
 	} else if ( kind == lm85b ) {
 		type_name = "lm85b";
-		strlcpy(new_client->name, "National LM85-B", DEVICE_NAME_SIZE);
+		strlcpy(new_client->name, "National LM85-B", I2C_NAME_SIZE);
 	} else if ( kind == lm85c ) {
 		type_name = "lm85c";
-		strlcpy(new_client->name, "National LM85-C", DEVICE_NAME_SIZE);
+		strlcpy(new_client->name, "National LM85-C", I2C_NAME_SIZE);
 	} else if ( kind == adm1027 ) {
 		type_name = "adm1027";
-		strlcpy(new_client->name, "Analog Devices ADM1027", DEVICE_NAME_SIZE);
+		strlcpy(new_client->name, "Analog Devices ADM1027", I2C_NAME_SIZE);
 	} else if ( kind == adt7463 ) {
 		type_name = "adt7463";
-		strlcpy(new_client->name, "Analog Devices ADT7463", DEVICE_NAME_SIZE);
+		strlcpy(new_client->name, "Analog Devices ADT7463", I2C_NAME_SIZE);
 	} else {
 		dev_dbg(&adapter->dev, "Internal error, invalid kind (%d)!", kind);
 		err = -EFAULT ;
drivers/i2c/chips/via686a.c +1 -1
diff -Nru a/drivers/i2c/chips/via686a.c b/drivers/i2c/chips/via686a.c
@@ -727,7 +727,7 @@
 	new_client->dev.parent = &adapter->dev;
 
 	/* Fill in the remaining client fields and put into the global list */
-	snprintf(new_client->name, DEVICE_NAME_SIZE, client_name);
+	snprintf(new_client->name, I2C_NAME_SIZE, client_name);
 
 	data->valid = 0;
 	init_MUTEX(&data->update_lock);
drivers/i2c/chips/w83781d.c +2 -2
diff -Nru a/drivers/i2c/chips/w83781d.c b/drivers/i2c/chips/w83781d.c
@@ -1117,7 +1117,7 @@
 		data->lm75[i]->driver = &w83781d_driver;
 		data->lm75[i]->flags = 0;
 		strlcpy(data->lm75[i]->name, client_name,
-			DEVICE_NAME_SIZE);
+			I2C_NAME_SIZE);
 		if ((err = i2c_attach_client(data->lm75[i]))) {
 			dev_err(&new_client->dev, "Subclient %d "
 				"registration at address 0x%x "
@@ -1326,7 +1326,7 @@
 	}
 
 	/* Fill in the remaining client fields and put into the global list */
-	strlcpy(new_client->name, client_name, DEVICE_NAME_SIZE);
+	strlcpy(new_client->name, client_name, I2C_NAME_SIZE);
 	data->type = kind;
 
 	data->valid = 0;
drivers/i2c/scx200_acb.c +1 -1
diff -Nru a/drivers/i2c/scx200_acb.c b/drivers/i2c/scx200_acb.c
@@ -456,7 +456,7 @@
 	memset(iface, 0, sizeof(*iface));
 	adapter = &iface->adapter;
 	i2c_set_adapdata(adapter, iface);
-	snprintf(adapter->name, DEVICE_NAME_SIZE, "SCx200 ACB%d", index);
+	snprintf(adapter->name, I2C_NAME_SIZE, "SCx200 ACB%d", index);
 	adapter->owner = THIS_MODULE;
 	adapter->id = I2C_ALGO_SMBUS;
 	adapter->algo = &scx200_acb_algorithm;
include/linux/i2c.h +4 -2
diff -Nru a/include/linux/i2c.h b/include/linux/i2c.h
@@ -146,6 +146,8 @@
 
 extern struct bus_type i2c_bus_type;
 
+#define I2C_NAME_SIZE	50
+
 /*
  * i2c_client identifies a single device (i.e. chip) that is connected to an 
  * i2c bus. The behaviour is defined by the routines of the driver. This
@@ -166,7 +168,7 @@
 					/* to the client		*/
 	struct device dev;		/* the device structure		*/
 	struct list_head list;
-	char name[DEVICE_NAME_SIZE];
+	char name[I2C_NAME_SIZE];
 	struct completion released;
 };
 #define to_i2c_client(d) container_of(d, struct i2c_client, dev)
@@ -253,7 +255,7 @@
 	int nr;
 	struct list_head clients;
 	struct list_head list;
-	char name[DEVICE_NAME_SIZE];
+	char name[I2C_NAME_SIZE];
 	struct completion dev_released;
 	struct completion class_dev_released;
 };
author
#13 lore raw

ChangeSet 1.1153.85.4, 2003/08/27 15:32:44-07:00, [email protected]

[PATCH] DEVICE_NAME_SIZE/_HALF removal (I2C related, but v4l stuff)

 drivers/media/video/msp3400.c |    2 +-
 drivers/media/video/saa5249.c |    2 +-
 drivers/media/video/tuner.c   |    4 ++--
 3 files changed, 4 insertions(+), 4 deletions(-)
drivers/media/video/msp3400.c +1 -1
diff -Nru a/drivers/media/video/msp3400.c b/drivers/media/video/msp3400.c
@@ -1316,7 +1316,7 @@
 #endif
 	msp3400c_setvolume(c,msp->muted,msp->left,msp->right);
 
-	snprintf(c->name, DEVICE_NAME_SIZE, "MSP34%02d%c-%c%d",
+	snprintf(c->name, I2C_NAME_SIZE, "MSP34%02d%c-%c%d",
 		 (msp->rev2>>8)&0xff, (msp->rev1&0xff)+'@',
 		 ((msp->rev1>>8)&0xff)+'@', msp->rev2&0x1f);
 
drivers/media/video/saa5249.c +1 -1
diff -Nru a/drivers/media/video/saa5249.c b/drivers/media/video/saa5249.c
@@ -171,7 +171,7 @@
 		return -ENOMEM;
 	}
 	memset(t, 0, sizeof(*t));
-	strlcpy(client->name, IF_NAME, DEVICE_NAME_SIZE);
+	strlcpy(client->name, IF_NAME, I2C_NAME_SIZE);
 	init_MUTEX(&t->lock);
 	
 	/*
drivers/media/video/tuner.c +2 -2
diff -Nru a/drivers/media/video/tuner.c b/drivers/media/video/tuner.c
@@ -824,7 +824,7 @@
 	if (type < TUNERS) {
 		t->type = type;
 		printk("tuner(bttv): type forced to %d (%s) [insmod]\n",t->type,tuners[t->type].name);
-		strlcpy(client->name, tuners[t->type].name, DEVICE_NAME_SIZE);
+		strlcpy(client->name, tuners[t->type].name, I2C_NAME_SIZE);
 	}
         i2c_attach_client(client);
         if (t->type == TUNER_MT2032)
@@ -875,7 +875,7 @@
 		t->type = *iarg;
 		printk("tuner: type set to %d (%s)\n",
                         t->type,tuners[t->type].name);
-		strlcpy(client->name, tuners[t->type].name, DEVICE_NAME_SIZE);
+		strlcpy(client->name, tuners[t->type].name, I2C_NAME_SIZE);
 		if (t->type == TUNER_MT2032)
                         mt2032_init(client);
 		break;
author
#14 lore raw

ChangeSet 1.1153.85.5, 2003/08/27 15:32:59-07:00, [email protected]

[PATCH] DEVICE_NAME_SIZE/_HALF removal (I2C related, but fb stuff)

 drivers/video/matrox/i2c-matroxfb.c |    2 +-
 1 files changed, 1 insertion(+), 1 deletion(-)
drivers/video/matrox/i2c-matroxfb.c +1 -1
diff -Nru a/drivers/video/matrox/i2c-matroxfb.c b/drivers/video/matrox/i2c-matroxfb.c
@@ -111,7 +111,7 @@
 	b->mask.data = data;
 	b->mask.clock = clock;
 	b->adapter = matrox_i2c_adapter_template;
-	snprintf(b->adapter.name, DEVICE_NAME_SIZE, name,
+	snprintf(b->adapter.name, I2C_NAME_SIZE, name,
 		minfo->fbcon.node);
 	i2c_set_adapdata(&b->adapter, b);
 	b->adapter.algo_data = &b->bac;
author
#15 lore raw

ChangeSet 1.1153.123.2, 2003/09/04 11:28:46-07:00, [email protected]

[PATCH] I2C: Fix conversion from milli volts in store_in_reg() for w83781d.c

I am not sure if it was a later patch from me that fixed in_* to display milli volts in sysfs, or if it was a patch from Jan Dittmer, but the conversion in the store_in_*() functions is wrong, and cause something like:

 drivers/i2c/chips/w83781d.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)
drivers/i2c/chips/w83781d.c +2 -2
diff -Nru a/drivers/i2c/chips/w83781d.c b/drivers/i2c/chips/w83781d.c
@@ -378,8 +378,8 @@
 	struct w83781d_data *data = i2c_get_clientdata(client); \
 	u32 val; \
 	 \
-	val = simple_strtoul(buf, NULL, 10); \
-	data->in_##reg[nr] = (IN_TO_REG(val) / 10); \
+	val = simple_strtoul(buf, NULL, 10) / 10; \
+	data->in_##reg[nr] = IN_TO_REG(val); \
 	w83781d_write_value(client, W83781D_REG_IN_##REG(nr), data->in_##reg[nr]); \
 	 \
 	return count; \
author
#16 lore raw

ChangeSet 1.1217.7.2, 2003/09/12 16:58:01-07:00, [email protected]

[PATCH] I2C: remove some usages of i2c_adapter.id as they are not used.

Seems i2c_adapter.id is only used in some video drivers, will work on cleaning up that mess later...

 drivers/i2c/busses/i2c-ali1535.c |    1 -
 drivers/i2c/busses/i2c-ali15x3.c |    1 -
 drivers/i2c/busses/i2c-amd756.c  |    1 -
 drivers/i2c/busses/i2c-amd8111.c |    1 -
 drivers/i2c/busses/i2c-i801.c    |    1 -
 drivers/i2c/busses/i2c-isa.c     |    1 -
 drivers/i2c/busses/i2c-nforce2.c |    1 -
 drivers/i2c/busses/i2c-piix4.c   |    1 -
 drivers/i2c/busses/i2c-sis96x.c  |    1 -
 drivers/i2c/busses/i2c-viapro.c  |    1 -
 drivers/i2c/i2c-core.c           |    6 ++----
 11 files changed, 2 insertions(+), 14 deletions(-)
drivers/i2c/busses/i2c-ali1535.c +0 -1
diff -Nru a/drivers/i2c/busses/i2c-ali1535.c b/drivers/i2c/busses/i2c-ali1535.c
@@ -481,7 +481,6 @@
 
 static struct i2c_adapter ali1535_adapter = {
 	.owner		= THIS_MODULE,
-	.id		= I2C_ALGO_SMBUS | I2C_HW_SMBUS_ALI1535,
 	.algo		= &smbus_algorithm,
 	.name		= "unset",
 };
drivers/i2c/busses/i2c-ali15x3.c +0 -1
diff -Nru a/drivers/i2c/busses/i2c-ali15x3.c b/drivers/i2c/busses/i2c-ali15x3.c
@@ -471,7 +471,6 @@
 
 static struct i2c_adapter ali15x3_adapter = {
 	.owner		= THIS_MODULE,
-	.id		= I2C_ALGO_SMBUS | I2C_HW_SMBUS_ALI15X3,
 	.class          = I2C_ADAP_CLASS_SMBUS,
 	.algo		= &smbus_algorithm,
 	.name		= "unset",
drivers/i2c/busses/i2c-amd756.c +0 -1
diff -Nru a/drivers/i2c/busses/i2c-amd756.c b/drivers/i2c/busses/i2c-amd756.c
@@ -304,7 +304,6 @@
 
 static struct i2c_adapter amd756_adapter = {
 	.owner		= THIS_MODULE,
-	.id		= I2C_ALGO_SMBUS | I2C_HW_SMBUS_AMD756,
 	.class          = I2C_ADAP_CLASS_SMBUS,
 	.algo		= &smbus_algorithm,
 	.name		= "unset",
drivers/i2c/busses/i2c-amd8111.c +0 -1
diff -Nru a/drivers/i2c/busses/i2c-amd8111.c b/drivers/i2c/busses/i2c-amd8111.c
@@ -358,7 +358,6 @@
 	smbus->adapter.owner = THIS_MODULE;
 	snprintf(smbus->adapter.name, I2C_NAME_SIZE,
 		"SMBus2 AMD8111 adapter at %04x", smbus->base);
-	smbus->adapter.id = I2C_ALGO_SMBUS | I2C_HW_SMBUS_AMD8111;
 	smbus->adapter.class = I2C_ADAP_CLASS_SMBUS;
 	smbus->adapter.algo = &smbus_algorithm;
 	smbus->adapter.algo_data = smbus;
drivers/i2c/busses/i2c-i801.c +0 -1
diff -Nru a/drivers/i2c/busses/i2c-i801.c b/drivers/i2c/busses/i2c-i801.c
@@ -540,7 +540,6 @@
 
 static struct i2c_adapter i801_adapter = {
 	.owner		= THIS_MODULE,
-	.id		= I2C_ALGO_SMBUS | I2C_HW_SMBUS_I801,
 	.class		= I2C_ADAP_CLASS_SMBUS,
 	.algo		= &smbus_algorithm,
 	.name		= "unset",
drivers/i2c/busses/i2c-isa.c +0 -1
diff -Nru a/drivers/i2c/busses/i2c-isa.c b/drivers/i2c/busses/i2c-isa.c
@@ -42,7 +42,6 @@
 /* There can only be one... */
 static struct i2c_adapter isa_adapter = {
 	.owner		= THIS_MODULE,
-	.id		= I2C_ALGO_ISA | I2C_HW_ISA,
 	.class          = I2C_ADAP_CLASS_SMBUS,
 	.algo		= &isa_algorithm,
 	.name		= "ISA main adapter",
drivers/i2c/busses/i2c-nforce2.c +0 -1
diff -Nru a/drivers/i2c/busses/i2c-nforce2.c b/drivers/i2c/busses/i2c-nforce2.c
@@ -118,7 +118,6 @@
 
 static struct i2c_adapter nforce2_adapter = {
 	.owner          = THIS_MODULE,
-	.id             = I2C_ALGO_SMBUS | I2C_HW_SMBUS_NFORCE2,
 	.class          = I2C_ADAP_CLASS_SMBUS,
 	.algo           = &smbus_algorithm,
 	.name   	= "unset",
drivers/i2c/busses/i2c-piix4.c +0 -1
diff -Nru a/drivers/i2c/busses/i2c-piix4.c b/drivers/i2c/busses/i2c-piix4.c
@@ -395,7 +395,6 @@
 
 static struct i2c_adapter piix4_adapter = {
 	.owner		= THIS_MODULE,
-	.id		= I2C_ALGO_SMBUS | I2C_HW_SMBUS_PIIX4,
 	.class		= I2C_ADAP_CLASS_SMBUS,
 	.algo		= &smbus_algorithm,
 	.name		= "unset",
drivers/i2c/busses/i2c-sis96x.c +0 -1
diff -Nru a/drivers/i2c/busses/i2c-sis96x.c b/drivers/i2c/busses/i2c-sis96x.c
@@ -261,7 +261,6 @@
 
 static struct i2c_adapter sis96x_adapter = {
 	.owner		= THIS_MODULE,
-	.id		= I2C_ALGO_SMBUS | I2C_HW_SMBUS_SIS96X,
 	.class		= I2C_ADAP_CLASS_SMBUS,
 	.algo		= &smbus_algorithm,
 	.name		= "unset",
drivers/i2c/busses/i2c-viapro.c +0 -1
diff -Nru a/drivers/i2c/busses/i2c-viapro.c b/drivers/i2c/busses/i2c-viapro.c
@@ -287,7 +287,6 @@
 
 static struct i2c_adapter vt596_adapter = {
 	.owner		= THIS_MODULE,
-	.id		= I2C_ALGO_SMBUS | I2C_HW_SMBUS_VIA2,
 	.class		= I2C_ADAP_CLASS_SMBUS,
 	.algo		= &smbus_algorithm,
 	.name		= "unset",
drivers/i2c/i2c-core.c +2 -4
diff -Nru a/drivers/i2c/i2c-core.c b/drivers/i2c/i2c-core.c
@@ -581,8 +581,7 @@
 		 */
 		return (ret == 1 )? count : ret;
 	} else {
-		printk(KERN_ERR "i2c-core.o: I2C adapter %04x: I2C level transfers not supported\n",
-		       client->adapter->id);
+		dev_err(&client->adapter->dev, "I2C level transfers not supported\n");
 		return -ENOSYS;
 	}
 }
@@ -614,8 +613,7 @@
 	 	*/
 		return (ret == 1 )? count : ret;
 	} else {
-		printk(KERN_DEBUG "i2c-core.o: I2C adapter %04x: I2C level transfers not supported\n",
-		       client->adapter->id);
+		dev_err(&client->adapter->dev, "I2C level transfers not supported\n");
 		return -ENOSYS;
 	}
 }
author
#17 lore raw

ChangeSet 1.1315.1.2, 2003/09/15 13:46:00-07:00, [email protected]

[PATCH] I2C: add the i2c-sis5595 i2c bus driver

This is based on the lmsensor cvs version of the driver, but is cleaned it up and ported it to 2.6.

 drivers/i2c/busses/Kconfig       |   17 +
 drivers/i2c/busses/Makefile      |    1 
 drivers/i2c/busses/i2c-sis5595.c |  417 +++++++++++++++++++++++++++++++++++++++
 3 files changed, 435 insertions(+)
drivers/i2c/busses/Kconfig +17 -0
diff -Nru a/drivers/i2c/busses/Kconfig b/drivers/i2c/busses/Kconfig
@@ -149,6 +149,23 @@
 	  in the lm_sensors package, which you can download at 
 	  http://www.lm-sensors.nu
 
+config I2C_SIS5595
+	tristate "  Sis5595"
+	depends on I2C && PCI && EXPERIMENTAL
+	help
+	  If you say yes to this option, support will be included for the 
+	  SiS5595 SMBus (a subset of I2C) interface.
+
+	  This can also be built as a module which can be inserted and removed 
+	  while the kernel is running.  If you want to compile it as a module,
+	  say M here and read <file:Documentation/modules.txt>.
+
+	  The module will be called i2c-sis5595.
+
+	  You will also need the latest user-space utilties: you can find them
+	  in the lm_sensors package, which you can download at 
+	  http://www.lm-sensors.nu
+
 
 config I2C_SIS96X
 	tristate "  SiS 96x"
drivers/i2c/busses/Makefile +1 -0
diff -Nru a/drivers/i2c/busses/Makefile b/drivers/i2c/busses/Makefile
@@ -10,5 +10,6 @@
 obj-$(CONFIG_I2C_ISA)		+= i2c-isa.o
 obj-$(CONFIG_I2C_NFORCE2)	+= i2c-nforce2.o
 obj-$(CONFIG_I2C_PIIX4)		+= i2c-piix4.o
+obj-$(CONFIG_I2C_SIS5595)	+= i2c-sis5595.o
 obj-$(CONFIG_I2C_SIS96X)	+= i2c-sis96x.o
 obj-$(CONFIG_I2C_VIAPRO)	+= i2c-viapro.o
drivers/i2c/busses/i2c-sis5595.c new file +417 -0

417 lines not on this page · raw message

author
#18 lore raw

ChangeSet 1.1315.1.3, 2003/09/15 16:15:33-07:00, [email protected]

[PATCH] I2C: add the i2c-sis630 i2c bus driver

This is based on the lmsensor cvs version of the driver, but is cleaned it up and ported it to 2.6.

 drivers/i2c/busses/Kconfig      |   16 +
 drivers/i2c/busses/Makefile     |    1 
 drivers/i2c/busses/i2c-sis630.c |  494 ++++++++++++++++++++++++++++++++++++++++
 3 files changed, 511 insertions(+)
drivers/i2c/busses/Kconfig +16 -0
diff -Nru a/drivers/i2c/busses/Kconfig b/drivers/i2c/busses/Kconfig
@@ -166,6 +166,22 @@
 	  in the lm_sensors package, which you can download at 
 	  http://www.lm-sensors.nu
 
+config I2C_SIS630
+	tristate "  Sis630"
+	depends on I2C && PCI && EXPERIMENTAL
+	help
+	  If you say yes to this option, support will be included for the 
+	  SiS630 SMBus (a subset of I2C) interface.
+
+	  This can also be built as a module which can be inserted and removed 
+	  while the kernel is running.  If you want to compile it as a module,
+	  say M here and read <file:Documentation/modules.txt>.
+
+	  The module will be called i2c-sis630.
+
+	  You will also need the latest user-space utilties: you can find them
+	  in the lm_sensors package, which you can download at 
+	  http://www.lm-sensors.nu
 
 config I2C_SIS96X
 	tristate "  SiS 96x"
drivers/i2c/busses/Makefile +1 -0
diff -Nru a/drivers/i2c/busses/Makefile b/drivers/i2c/busses/Makefile
@@ -11,5 +11,6 @@
 obj-$(CONFIG_I2C_NFORCE2)	+= i2c-nforce2.o
 obj-$(CONFIG_I2C_PIIX4)		+= i2c-piix4.o
 obj-$(CONFIG_I2C_SIS5595)	+= i2c-sis5595.o
+obj-$(CONFIG_I2C_SIS630)	+= i2c-sis630.o
 obj-$(CONFIG_I2C_SIS96X)	+= i2c-sis96x.o
 obj-$(CONFIG_I2C_VIAPRO)	+= i2c-viapro.o
drivers/i2c/busses/i2c-sis630.c new file +494 -0

494 lines not on this page · raw message

author
#19 lore raw

ChangeSet 1.1315.1.4, 2003/09/15 16:37:19-07:00, [email protected]

[PATCH] I2C: add the i2c-via i2c bus driver

This is based on the lmsensor cvs version of the driver, but is cleaned it up and ported it to 2.6.

 drivers/i2c/busses/Kconfig   |   17 +++
 drivers/i2c/busses/Makefile  |    1 
 drivers/i2c/busses/i2c-via.c |  183 +++++++++++++++++++++++++++++++++++++++++++
 3 files changed, 201 insertions(+)
drivers/i2c/busses/Kconfig +17 -0
diff -Nru a/drivers/i2c/busses/Kconfig b/drivers/i2c/busses/Kconfig
@@ -207,6 +207,23 @@
 	  in the lm_sensors package, which you can download at 
 	  http://www.lm-sensors.nu
 
+config I2C_VIA
+	tristate "  VIA 82C58B"
+	depends on I2C && PCI && EXPERIMENTAL
+	help
+
+	  If you say yes to this option, support will be included for the VIA
+          82C586B I2C interface
+
+	  This can also be built as a module which can be inserted and removed
+	  while the kernel is running.  If you want to compile it as a module,
+	  say M here and read <file:Documentation/modules.txt>.
+
+	  The module will be called i2c-via.
+
+	  You will also need the latest user-space utilties: you can find them
+	  in the lm_sensors package, which you can download at
+	  http://www.lm-sensors.nu
 
 config I2C_VIAPRO
 	tristate "  VIA 82C596/82C686/823x"
drivers/i2c/busses/Makefile +1 -0
diff -Nru a/drivers/i2c/busses/Makefile b/drivers/i2c/busses/Makefile
@@ -13,4 +13,5 @@
 obj-$(CONFIG_I2C_SIS5595)	+= i2c-sis5595.o
 obj-$(CONFIG_I2C_SIS630)	+= i2c-sis630.o
 obj-$(CONFIG_I2C_SIS96X)	+= i2c-sis96x.o
+obj-$(CONFIG_I2C_VIA)		+= i2c-via.o
 obj-$(CONFIG_I2C_VIAPRO)	+= i2c-viapro.o
drivers/i2c/busses/i2c-via.c new file +183 -0

183 lines not on this page · raw message

author
#20 lore raw

ChangeSet 1.1315.1.5, 2003/09/15 16:38:32-07:00, [email protected]

[PATCH] I2C: clean up the i2c bus Kconfig menu and help texts.

 drivers/i2c/busses/Kconfig |  165 ++++++++++-----------------------------------
 1 files changed, 39 insertions(+), 126 deletions(-)
drivers/i2c/busses/Kconfig +39 -126
diff -Nru a/drivers/i2c/busses/Kconfig b/drivers/i2c/busses/Kconfig
@@ -5,7 +5,7 @@
 menu "I2C Hardware Sensors Mainboard support"
 
 config I2C_ALI1535
-	tristate "  ALI 1535"
+	tristate "ALI 1535"
 	depends on I2C && PCI && EXPERIMENTAL
 	help
 	  If you say yes to this option, support will be included for the SMB
@@ -13,63 +13,41 @@
 	  controller is part of the 7101 device, which is an ACPI-compliant
 	  Power Management Unit (PMU).
 
-	  This can also be built as a module.  If so, the module will be
-	  called i2c-ali1535.
-
-	  You will also need the latest user-space utilties: you can find them
-	  in the lm_sensors package, which you can download at
-	  http://www.lm-sensors.nu
+	  This driver can also be built as a module.  If so, the module
+	  will be called i2c-ali1535.
 
 config I2C_ALI15X3
-	tristate "  ALI 15x3"
+	tristate "ALI 15x3"
 	depends on I2C && PCI && EXPERIMENTAL
 	help
 	  If you say yes to this option, support will be included for the
 	  Acer Labs Inc. (ALI) M1514 and M1543 motherboard I2C interfaces.
 
-	  This can also be built as a module.  If so, the module will be
-	  called i2c-ali15x3.
-
-	  You will also need the latest user-space utilties: you can find them
-	  in the lm_sensors package, which you can download at
-	  http://www.lm-sensors.nu
+	  This driver can also be built as a module.  If so, the module
+	  will be called i2c-ali15x3.
 
 config I2C_AMD756
-	tristate "  AMD 756/766"
+	tristate "AMD 756/766"
 	depends on I2C && EXPERIMENTAL
 	help
 	  If you say yes to this option, support will be included for the AMD
 	  756/766/768 mainboard I2C interfaces.
 
-	  This can also be built as a module which can be inserted and removed 
-	  while the kernel is running.  If you want to compile it as a module,
-	  say M here and read <file:Documentation/modules.txt>.
-
-	  The module will be called i2c-amd756.
-
-	  You will also need the latest user-space utilties: you can find them
-	  in the lm_sensors package, which you can download at 
-	  http://www.lm-sensors.nu
+	  This driver can also be built as a module.  If so, the module
+	  will be called i2c-amd756.
 
 config I2C_AMD8111
-	tristate "  AMD 8111"
+	tristate "AMD 8111"
 	depends on I2C && EXPERIMENTAL
 	help
 	  If you say yes to this option, support will be included for the AMD
 	  8111 mainboard I2C interfaces.
 
-	  This can also be built as a module which can be inserted and removed 
-	  while the kernel is running.  If you want to compile it as a module,
-	  say M here and read <file:Documentation/modules.txt>.
-
-	  The module will be called i2c-amd8111.
-
-	  You will also need the latest user-space utilties: you can find them
-	  in the lm_sensors package, which you can download at 
-	  http://www.lm-sensors.nu
+	  This driver can also be built as a module.  If so, the module
+	  will be called i2c-amd8111.
 
 config I2C_I801
-	tristate "  Intel 801"
+	tristate "Intel 801"
 	depends on I2C && PCI && EXPERIMENTAL
 	help
 	  If you say yes to this option, support will be included for the Intel
@@ -81,53 +59,31 @@
 	    82801CA/CAM
 	    82801DB
 
-	  This can also be built as a module which can be inserted and removed 
-	  while the kernel is running.  If you want to compile it as a module,
-	  say M here and read <file:Documentation/modules.txt>.
-
-	  The module will be called i2c-i801.
-
-	  You will also need the latest user-space utilties: you can find them
-	  in the lm_sensors package, which you can download at 
-	  http://www.lm-sensors.nu
+	  This driver can also be built as a module.  If so, the module
+	  will be called i2c-i801.
 
 config I2C_ISA
-	tristate "  ISA Bus support"
+	tristate "ISA Bus support"
 	depends on I2C && ISA && EXPERIMENTAL
 	help
 	  If you say yes to this option, support will be included for i2c
 	  interfaces that are on the ISA bus.
 
-	  This can also be built as a module which can be inserted and removed 
-	  while the kernel is running.  If you want to compile it as a module,
-	  say M here and read <file:Documentation/modules.txt>.
-
-	  The module will be called i2c-isa.
-
-	  You will also need the latest user-space utilties: you can find them
-	  in the lm_sensors package, which you can download at 
-	  http://www.lm-sensors.nu
+	  This driver can also be built as a module.  If so, the module
+	  will be called i2c-isa.
 
 config I2C_NFORCE2
-	tristate "  Nvidia Nforce2"
+	tristate "Nvidia Nforce2"
 	depends on I2C && PCI && EXPERIMENTAL
 	help
 	  If you say yes to this option, support will be included for the Nvidia
 	  Nforce2 family of mainboard I2C interfaces.
 
-	  This can also be built as a module which can be inserted and removed
-	  while the kernel is running.  If you want to compile it as a module,
-	  say M here and read <file:Documentation/modules.txt>.
-
-	  The module will be called i2c-nforce2.
-
-	  You will also need the latest user-space utilties: you can find them
-	  in the lm_sensors package, which you can download at
-	  http://www.lm-sensors.nu
-
+	  This driver can also be built as a module.  If so, the module
+	  will be called i2c-nforce2.
 
 config I2C_PIIX4
-	tristate "  Intel PIIX4"
+	tristate "Intel PIIX4"
 	depends on I2C && PCI && EXPERIMENTAL
 	help
 	  If you say yes to this option, support will be included for the Intel
@@ -139,52 +95,31 @@
 	    Serverworks CSB5
 	    SMSC Victory66
 
-	  This can also be built as a module which can be inserted and removed 
-	  while the kernel is running.  If you want to compile it as a module,
-	  say M here and read <file:Documentation/modules.txt>.
-
-	  The module will be called i2c-piix4.
-
-	  You will also need the latest user-space utilties: you can find them
-	  in the lm_sensors package, which you can download at 
-	  http://www.lm-sensors.nu
+	  This driver can also be built as a module.  If so, the module
+	  will be called i2c-piix4.
 
 config I2C_SIS5595
-	tristate "  Sis5595"
+	tristate "SiS 5595"
 	depends on I2C && PCI && EXPERIMENTAL
 	help
 	  If you say yes to this option, support will be included for the 
 	  SiS5595 SMBus (a subset of I2C) interface.
 
-	  This can also be built as a module which can be inserted and removed 
-	  while the kernel is running.  If you want to compile it as a module,
-	  say M here and read <file:Documentation/modules.txt>.
-
-	  The module will be called i2c-sis5595.
-
-	  You will also need the latest user-space utilties: you can find them
-	  in the lm_sensors package, which you can download at 
-	  http://www.lm-sensors.nu
+	  This driver can also be built as a module.  If so, the module
+	  will be called i2c-sis5595.
 
 config I2C_SIS630
-	tristate "  Sis630"
+	tristate "SiS 630"
 	depends on I2C && PCI && EXPERIMENTAL
 	help
 	  If you say yes to this option, support will be included for the 
 	  SiS630 SMBus (a subset of I2C) interface.
 
-	  This can also be built as a module which can be inserted and removed 
-	  while the kernel is running.  If you want to compile it as a module,
-	  say M here and read <file:Documentation/modules.txt>.
-
-	  The module will be called i2c-sis630.
-
-	  You will also need the latest user-space utilties: you can find them
-	  in the lm_sensors package, which you can download at 
-	  http://www.lm-sensors.nu
+	  This driver can also be built as a module.  If so, the module
+	  will be called i2c-sis630.
 
 config I2C_SIS96X
-	tristate "  SiS 96x"
+	tristate "SiS 96x"
 	depends on I2C && PCI && EXPERIMENTAL
 	help
 	  If you say yes to this option, support will be included for the SiS
@@ -197,36 +132,22 @@
 	    650/961
 	    735
 
-	  This can also be built as a module which can be inserted and removed 
-	  while the kernel is running.  If you want to compile it as a module,
-	  say M here and read <file:Documentation/modules.txt>.
-
-	  The module will be called i2c-sis96x.
-
-	  You will also need the latest user-space utilties: you can find them
-	  in the lm_sensors package, which you can download at 
-	  http://www.lm-sensors.nu
+	  This driver can also be built as a module.  If so, the module
+	  will be called i2c-sis96x.
 
 config I2C_VIA
-	tristate "  VIA 82C58B"
+	tristate "VIA 82C58B"
 	depends on I2C && PCI && EXPERIMENTAL
 	help
 
 	  If you say yes to this option, support will be included for the VIA
           82C586B I2C interface
 
-	  This can also be built as a module which can be inserted and removed
-	  while the kernel is running.  If you want to compile it as a module,
-	  say M here and read <file:Documentation/modules.txt>.
-
-	  The module will be called i2c-via.
-
-	  You will also need the latest user-space utilties: you can find them
-	  in the lm_sensors package, which you can download at
-	  http://www.lm-sensors.nu
+	  This driver can also be built as a module.  If so, the module
+	  will be called i2c-via.
 
 config I2C_VIAPRO
-	tristate "  VIA 82C596/82C686/823x"
+	tristate "VIA 82C596/82C686/823x"
 	depends on I2C && PCI && EXPERIMENTAL
 	help
 
@@ -240,15 +161,7 @@
 	  8233A
 	  8235
 
-	  This can also be built as a module which can be inserted and removed
-	  while the kernel is running.  If you want to compile it as a module,
-	  say M here and read <file:Documentation/modules.txt>.
-
-	  The module will be called i2c-viapro.
-
-	  You will also need the latest user-space utilties: you can find them
-	  in the lm_sensors package, which you can download at
-	  http://www.lm-sensors.nu
+	  This driver can also be built as a module.  If so, the module
+	  will be called i2c-viapro.
 
 endmenu
-
author
#21 lore raw

ChangeSet 1.1315.1.6, 2003/09/15 16:44:07-07:00, [email protected]

[PATCH] I2C: turn off debugging on the new sis i2c bus drivers.

Forgot to do this before...

 drivers/i2c/busses/i2c-sis5595.c |    2 +-
 drivers/i2c/busses/i2c-sis630.c  |    2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)
drivers/i2c/busses/i2c-sis5595.c +1 -1
diff -Nru a/drivers/i2c/busses/i2c-sis5595.c b/drivers/i2c/busses/i2c-sis5595.c
@@ -55,7 +55,7 @@
  * Add adapter resets
  */
 
-#define DEBUG
+/* #define DEBUG 1 */
 
 #include <linux/kernel.h>
 #include <linux/module.h>
drivers/i2c/busses/i2c-sis630.c +1 -1
diff -Nru a/drivers/i2c/busses/i2c-sis630.c b/drivers/i2c/busses/i2c-sis630.c
@@ -48,7 +48,7 @@
    Note: we assume there can only be one device, with one SMBus interface.
 */
 
-#define DEBUG
+/* #define DEBUG 1 */
 
 #include <linux/kernel.h>
 #include <linux/module.h>
author
#22 lore raw

ChangeSet 1.1315.1.7, 2003/09/15 16:53:41-07:00, [email protected]

[PATCH] I2C: New PPC4xx I2C driver

This updates the current 2.6 PPC 4xx driver to the rewritten version we have in the PPC development tree. It is cleaner, has less bugs, and has more features.

 drivers/i2c/i2c-algo-ibm_ocp.c |  900 -----------------------------------------
 drivers/i2c/i2c-algo-ibm_ocp.h |   55 --
 drivers/i2c/Kconfig            |    8 
 drivers/i2c/Makefile           |    1 
 drivers/i2c/i2c-ibm_iic.c      |  729 +++++++++++++++++++++++++++++++++
 drivers/i2c/i2c-ibm_iic.h      |  124 +++++
 6 files changed, 856 insertions(+), 961 deletions(-)
drivers/i2c/Kconfig +2 -6
diff -Nru a/drivers/i2c/Kconfig b/drivers/i2c/Kconfig
@@ -203,13 +203,9 @@
 	tristate "Embedded Planet RPX Lite/Classic suppoort"
 	depends on (RPXLITE || RPXCLASSIC) && I2C_ALGO8XX
 
-config I2C_IBM_OCP_ALGO
-	tristate "IBM on-chip I2C Algorithm"
+config I2C_IBM_IIC
+	tristate "IBM IIC I2C"
 	depends on IBM_OCP && I2C
-
-config I2C_IBM_OCP_ADAP
-	tristate "IBM on-chip I2C Adapter"
-	depends on I2C_IBM_OCP_ALGO
 
 config I2C_IOP3XX
 	tristate "Intel XScale IOP3xx on-chip I2C interface"
drivers/i2c/Makefile +1 -0
diff -Nru a/drivers/i2c/Makefile b/drivers/i2c/Makefile
@@ -16,6 +16,7 @@
 obj-$(CONFIG_ITE_I2C_ADAP)	+= i2c-adap-ite.o
 obj-$(CONFIG_SCx200_I2C)	+= scx200_i2c.o
 obj-$(CONFIG_SCx200_ACB)	+= scx200_acb.o
+obj-$(CONFIG_I2C_IBM_IIC)	+= i2c-ibm_iic.o
 obj-$(CONFIG_I2C_SENSOR)	+= i2c-sensor.o
 obj-$(CONFIG_I2C_IOP3XX)	+= i2c-iop3xx.o
 obj-y				+= busses/ chips/
drivers/i2c/i2c-algo-ibm_ocp.c deleted +0 -900

900 lines not on this page · raw message

drivers/i2c/i2c-algo-ibm_ocp.h deleted +0 -55

55 lines not on this page · raw message

drivers/i2c/i2c-ibm_iic.c new file +729 -0

729 lines not on this page · raw message

drivers/i2c/i2c-ibm_iic.h new file +124 -0

124 lines not on this page · raw message

author
#23 lore raw

ChangeSet 1.1315.1.8, 2003/09/15 16:54:37-07:00, [email protected]

[PATCH] I2C: drivers/i2c version.h cleanup

remove unnecessary version.h from drivers/i2c.
test compiled with 2.6.0-test5-bk2 on x86.

 drivers/i2c/busses/i2c-amd756.c |    1 -
 drivers/i2c/i2c-adap-ite.c      |    1 -
 drivers/i2c/i2c-algo-ite.c      |    1 -
 drivers/i2c/i2c-elektor.c       |    1 -
 drivers/i2c/i2c-keywest.c       |    1 -
 drivers/i2c/i2c-prosavage.c     |    1 -
 6 files changed, 6 deletions(-)
drivers/i2c/busses/i2c-amd756.c +0 -1
diff -Nru a/drivers/i2c/busses/i2c-amd756.c b/drivers/i2c/busses/i2c-amd756.c
@@ -37,7 +37,6 @@
 
 /* #define DEBUG 1 */
 
-#include <linux/version.h>
 #include <linux/module.h>
 #include <linux/pci.h>
 #include <linux/kernel.h>
drivers/i2c/i2c-adap-ite.c +0 -1
diff -Nru a/drivers/i2c/i2c-adap-ite.c b/drivers/i2c/i2c-adap-ite.c
@@ -38,7 +38,6 @@
 #include <linux/module.h>
 #include <linux/delay.h>
 #include <linux/slab.h>
-#include <linux/version.h>
 #include <linux/init.h>
 #include <asm/irq.h>
 #include <asm/io.h>
drivers/i2c/i2c-algo-ite.c +0 -1
diff -Nru a/drivers/i2c/i2c-algo-ite.c b/drivers/i2c/i2c-algo-ite.c
@@ -38,7 +38,6 @@
 #include <linux/module.h>
 #include <linux/delay.h>
 #include <linux/slab.h>
-#include <linux/version.h>
 #include <linux/init.h>
 #include <asm/uaccess.h>
 #include <linux/ioport.h>
drivers/i2c/i2c-elektor.c +0 -1
diff -Nru a/drivers/i2c/i2c-elektor.c b/drivers/i2c/i2c-elektor.c
@@ -30,7 +30,6 @@
 #include <linux/module.h>
 #include <linux/delay.h>
 #include <linux/slab.h>
-#include <linux/version.h>
 #include <linux/init.h>
 #include <linux/interrupt.h>
 #include <linux/pci.h>
drivers/i2c/i2c-keywest.c +0 -1
diff -Nru a/drivers/i2c/i2c-keywest.c b/drivers/i2c/i2c-keywest.c
@@ -45,7 +45,6 @@
 
 #include <linux/module.h>
 #include <linux/config.h>
-#include <linux/version.h>
 #include <linux/kernel.h>
 #include <linux/ioport.h>
 #include <linux/pci.h>
drivers/i2c/i2c-prosavage.c +0 -1
diff -Nru a/drivers/i2c/i2c-prosavage.c b/drivers/i2c/i2c-prosavage.c
@@ -54,7 +54,6 @@
  *    (Additional documentation needed :(
  */
 
-#include <linux/version.h>
 #include <linux/module.h>
 #include <linux/init.h>
 #include <linux/pci.h>
author
#24 lore raw

ChangeSet 1.1315.1.9, 2003/09/22 11:03:30-07:00, [email protected]

[PATCH] I2C: add the i2c-i810 i2c bus driver

This is based on the lmsensor cvs version of the driver, but is cleaned it up and ported it to 2.6.

 drivers/i2c/busses/Kconfig    |   15 ++
 drivers/i2c/busses/Makefile   |    1 
 drivers/i2c/busses/i2c-i810.c |  256 ++++++++++++++++++++++++++++++++++++++++++
 3 files changed, 272 insertions(+)
drivers/i2c/busses/Kconfig +15 -0
diff -Nru a/drivers/i2c/busses/Kconfig b/drivers/i2c/busses/Kconfig
@@ -62,6 +62,21 @@
 	  This driver can also be built as a module.  If so, the module
 	  will be called i2c-i801.
 
+config I2C_I810
+	tristate "Intel 810/815"
+	depends on I2C && PCI && EXPERIMENTAL
+	help
+	  If you say yes to this option, support will be included for the Intel
+	  810/815 family of mainboard I2C interfaces.  Specifically, the 
+	  following versions of the chipset is supported:
+	    i810AA
+	    i810AB
+	    i810E
+	    i815
+
+	  This driver can also be built as a module.  If so, the module
+	  will be called i2c-i810.
+
 config I2C_ISA
 	tristate "ISA Bus support"
 	depends on I2C && ISA && EXPERIMENTAL
drivers/i2c/busses/Makefile +1 -0
diff -Nru a/drivers/i2c/busses/Makefile b/drivers/i2c/busses/Makefile
@@ -7,6 +7,7 @@
 obj-$(CONFIG_I2C_AMD756)	+= i2c-amd756.o
 obj-$(CONFIG_I2C_AMD8111)	+= i2c-amd8111.o
 obj-$(CONFIG_I2C_I801)		+= i2c-i801.o
+obj-$(CONFIG_I2C_I810)		+= i2c-i810.o
 obj-$(CONFIG_I2C_ISA)		+= i2c-isa.o
 obj-$(CONFIG_I2C_NFORCE2)	+= i2c-nforce2.o
 obj-$(CONFIG_I2C_PIIX4)		+= i2c-piix4.o
drivers/i2c/busses/i2c-i810.c new file +256 -0

256 lines not on this page · raw message

author
#25 lore raw

ChangeSet 1.1315.1.10, 2003/09/22 11:05:20-07:00, [email protected]

[PATCH] I2C: add the i2c-savage4 i2c bus driver

This is based on the lmsensor cvs version of the driver, but is cleaned it up and ported it to 2.6.

 drivers/i2c/busses/Kconfig       |   10 +
 drivers/i2c/busses/Makefile      |    1 
 drivers/i2c/busses/i2c-savage4.c |  205 +++++++++++++++++++++++++++++++++++++++
 3 files changed, 216 insertions(+)
drivers/i2c/busses/Kconfig +10 -0
diff -Nru a/drivers/i2c/busses/Kconfig b/drivers/i2c/busses/Kconfig
@@ -113,6 +113,16 @@
 	  This driver can also be built as a module.  If so, the module
 	  will be called i2c-piix4.
 
+config I2C_SAVAGE4
+	tristate "S3 Savage 4"
+	depends on I2C && PCI && EXPERIMENTAL
+	help
+	  If you say yes to this option, support will be included for the 
+	  S3 Savage 4 I2C interface.
+
+	  This driver can also be built as a module.  If so, the module
+	  will be called i2c-savage4.
+
 config I2C_SIS5595
 	tristate "SiS 5595"
 	depends on I2C && PCI && EXPERIMENTAL
drivers/i2c/busses/Makefile +1 -0
diff -Nru a/drivers/i2c/busses/Makefile b/drivers/i2c/busses/Makefile
@@ -11,6 +11,7 @@
 obj-$(CONFIG_I2C_ISA)		+= i2c-isa.o
 obj-$(CONFIG_I2C_NFORCE2)	+= i2c-nforce2.o
 obj-$(CONFIG_I2C_PIIX4)		+= i2c-piix4.o
+obj-$(CONFIG_I2C_SAVAGE4)	+= i2c-savage4.o
 obj-$(CONFIG_I2C_SIS5595)	+= i2c-sis5595.o
 obj-$(CONFIG_I2C_SIS630)	+= i2c-sis630.o
 obj-$(CONFIG_I2C_SIS96X)	+= i2c-sis96x.o
drivers/i2c/busses/i2c-savage4.c new file +205 -0

205 lines not on this page · raw message

author
#26 lore raw

ChangeSet 1.1315.1.11, 2003/09/22 11:15:16-07:00, [email protected]

[PATCH] I2C: add the i2c-voodoo3 i2c bus driver

This is based on the lmsensor cvs version of the driver, but is cleaned it up and ported it to 2.6.

 drivers/i2c/busses/Kconfig       |   11 +
 drivers/i2c/busses/Makefile      |    1 
 drivers/i2c/busses/i2c-voodoo3.c |  248 +++++++++++++++++++++++++++++++++++++++
 3 files changed, 260 insertions(+)
drivers/i2c/busses/Kconfig +11 -0
diff -Nru a/drivers/i2c/busses/Kconfig b/drivers/i2c/busses/Kconfig
@@ -189,4 +189,15 @@
 	  This driver can also be built as a module.  If so, the module
 	  will be called i2c-viapro.
 
+config I2C_VOODOO3
+	tristate "Voodoo 3"
+	depends on I2C && PCI && EXPERIMENTAL
+	help
+
+	  If you say yes to this option, support will be included for the
+	  Voodoo 3 I2C interface.
+
+	  This driver can also be built as a module.  If so, the module
+	  will be called i2c-voodoo3.
+
 endmenu
drivers/i2c/busses/Makefile +1 -0
diff -Nru a/drivers/i2c/busses/Makefile b/drivers/i2c/busses/Makefile
@@ -17,3 +17,4 @@
 obj-$(CONFIG_I2C_SIS96X)	+= i2c-sis96x.o
 obj-$(CONFIG_I2C_VIA)		+= i2c-via.o
 obj-$(CONFIG_I2C_VIAPRO)	+= i2c-viapro.o
+obj-$(CONFIG_I2C_VOODOO3)	+= i2c-voodoo3.o
drivers/i2c/busses/i2c-voodoo3.c new file +248 -0

248 lines not on this page · raw message

author
#27 lore raw

ChangeSet 1.1315.1.12, 2003/09/22 11:42:40-07:00, [email protected]

I2C: clean up the i2c chips Kconfig logic and help information

 drivers/i2c/chips/Kconfig |  111 +++++++++++++++++++---------------------------
 1 files changed, 46 insertions(+), 65 deletions(-)
drivers/i2c/chips/Kconfig +46 -65
diff -Nru a/drivers/i2c/chips/Kconfig b/drivers/i2c/chips/Kconfig
@@ -1,112 +1,93 @@
 #
-# Sensor device configuration
-# All depend on EXPERIMENTAL and I2C
+# I2C Sensor device configuration
 #
 
 menu "I2C Hardware Sensors Chip support"
 
+config I2C_SENSOR
+	tristate
+	default n
+
 config SENSORS_ADM1021
-	tristate "  Analog Devices ADM1021 and compatibles"
+	tristate "Analog Devices ADM1021 and compatibles"
 	depends on I2C && EXPERIMENTAL
+	select I2C_SENSOR
 	help
 	  If you say yes here you get support for Analog Devices ADM1021 
 	  and ADM1023 sensor chips and clones: Maxim MAX1617 and MAX1617A,
 	  Genesys Logic GL523SM, National Semi LM84, TI THMC10,
-	  and the XEON processor built-in sensor. This can also 
-	  be built as a module which can be inserted and removed while the 
-	  kernel is running.
+	  and the XEON processor built-in sensor.
 
-	  The module will be called adm1021.
-	  
-	  You will also need the latest user-space utilties: you can find them
-	  in the lm_sensors package, which you can download at 
-	  http://www.lm-sensors.nu
+	  This driver can also be built as a module.  If so, the module
+	  will be called adm1021.
 
 config SENSORS_IT87
-	tristate "  National Semiconductors IT87 and compatibles"
+	tristate "National Semiconductors IT87 and compatibles"
 	depends on I2C && EXPERIMENTAL
+	select I2C_SENSOR
 	help
-	  The module will be called it87.
+	  If you say yes here you get support for National Semiconductor IT87
+	  sensor chips and clones: IT8705F, IT8712F and SiS960.
 
-	  You will also need the latest user-space utilties: you can find them
-	  in the lm_sensors package, which you can download at 
-	  http://www.lm-sensors.nu
+	  This driver can also be built as a module.  If so, the module
+	  will be called it87.
 
 config SENSORS_LM75
-	tristate "  National Semiconductors LM75 and compatibles"
+	tristate "National Semiconductors LM75 and compatibles"
 	depends on I2C && EXPERIMENTAL
+	select I2C_SENSOR
 	help
 	  If you say yes here you get support for National Semiconductor LM75
 	  sensor chips and clones: Dallas Semi DS75 and DS1775, TelCon
-	  TCN75, and National Semi LM77. This can also be built as a module
-	  which can be inserted and removed while the kernel is running.
-
-	  The module will be called lm75.
-
-	  You will also need the latest user-space utilties: you can find them
-	  in the lm_sensors package, which you can download at 
-	  http://www.lm-sensors.nu
-	  
-config SENSORS_LM85
-	tristate "  National Semiconductors LM85 and compatibles"
-	depends on I2C && EXPERIMENTAL
-	help
-	  If you say yes here you get support for National Semiconductor LM85
-	  sensor chips and clones: ADT7463 and ADM1027.
-	  This can also be built as a module which can be inserted and
-	  removed while the kernel is running.
+	  TCN75, and National Semi LM77.
 
-	  The module will be called lm85.
+	  This driver can also be built as a module.  If so, the module
+	  will be called lm75.
 
-	  You will also need the latest user-space utilties: you can find them
-	  in the lm_sensors package, which you can download at 
-	  http://www.lm-sensors.nu
-	  
 config SENSORS_LM78
-	tristate "  National Semiconductors LM78 and compatibles"
+	tristate "National Semiconductors LM78 and compatibles"
 	depends on I2C && EXPERIMENTAL
+	select I2C_SENSOR
 	help
 	  If you say yes here you get support for National Semiconductor LM78,
 	  LM78-J and LM79.  This can also be built as a module which can be
 	  inserted and removed while the kernel is running.
 
-	  The module will be called lm78.
+	  This driver can also be built as a module.  If so, the module
+	  will be called lm78.
+
+config SENSORS_LM85
+	tristate "National Semiconductors LM85 and compatibles"
+	depends on I2C && EXPERIMENTAL
+	select I2C_SENSOR
+	help
+	  If you say yes here you get support for National Semiconductor LM85
+	  sensor chips and clones: ADT7463 and ADM1027.
+
+	  This driver can also be built as a module.  If so, the module
+	  will be called lm85.
 
-	  You will also need the latest user-space utilties: you can find them
-	  in the lm_sensors package, which you can download at 
-	  http://www.lm-sensors.nu
-	  
 config SENSORS_VIA686A
-	tristate "  VIA686A"
+	tristate "VIA686A"
 	depends on I2C && EXPERIMENTAL
+	select I2C_SENSOR
 	help
-	  support for via686a
 	  If you say yes here you get support for the integrated sensors in
-	  Via 686A/B South Bridges. This can also be built as a module
-	  which can be inserted and removed while the kernel is running.
+	  Via 686A/B South Bridges.
 
-	  You will also need the latest user-space utilties: you can find them
-	  in the lm_sensors package, which you can download at
-	  http://www.lm-sensors.nu
+	  This driver can also be built as a module.  If so, the module
+	  will be called via686a.
 
 config SENSORS_W83781D
-	tristate "  Winbond W83781D, W83782D, W83783S, W83627HF, Asus AS99127F"
+	tristate "Winbond W83781D, W83782D, W83783S, W83627HF, Asus AS99127F"
 	depends on I2C && EXPERIMENTAL
+	select I2C_SENSOR
 	help
 	  If you say yes here you get support for the Winbond W8378x series
 	  of sensor chips: the W83781D, W83782D, W83783S and W83682HF,
-	  and the similar Asus AS99127F. This
-	  can also be built as a module which can be inserted and removed
-	  while the kernel is running.
+	  and the similar Asus AS99127F.
 	  
-	  You will also need the latest user-space utilties: you can find them
-	  in the lm_sensors package, which you can download at
-	  http://www.lm-sensors.nu
-
-config I2C_SENSOR
-	tristate
-	default y if SENSORS_ADM1021=y || SENSORS_IT87=y || SENSORS_LM75=y || SENSORS_VIA686A=y || SENSORS_W83781D=y || SENSORS_LM85=y
-	default m if SENSORS_ADM1021=m || SENSORS_IT87=m || SENSORS_LM75=m || SENSORS_VIA686A=m || SENSORS_W83781D=m || SENSORS_LM85=m
-	default n
+	  This driver can also be built as a module.  If so, the module
+	  will be called w83781d.
 
 endmenu
author
#28 lore raw

ChangeSet 1.1315.1.13, 2003/09/22 12:26:49-07:00, [email protected]

I2C: clean up the drivers/i2c/Kconfig file

 drivers/i2c/Kconfig |  102 +++++++++++++++++++---------------------------------
 1 files changed, 38 insertions(+), 64 deletions(-)
drivers/i2c/Kconfig +38 -64
diff -Nru a/drivers/i2c/Kconfig b/drivers/i2c/Kconfig
@@ -22,10 +22,20 @@
 	  If you want I2C support, you should say Y here and also to the
 	  specific driver for your bus adapter(s) below.
 
-	  This I2C support is also available as a module.  If you want to
-	  compile it as a module, say M here and read
-	  <file:Documentation/modules.txt>.
-	  The module will be called i2c-core.
+	  This I2C support can also be built as a module.  If so, the module
+	  will be called i2c-core.
+
+config I2C_CHARDEV
+	tristate "I2C device interface"
+	depends on I2C
+	help
+	  Say Y here to use i2c-* device files, usually found in the /dev
+	  directory on your system.  They make it possible to have user-space
+	  programs use the I2C bus.  Information on how to do this is
+	  contained in the file <file:Documentation/i2c/dev-interface>.
+
+	  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"
@@ -35,10 +45,8 @@
 	  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 you want to compile
-	  it as a module, say M here and read
-	  <file:Documentation/modules.txt>.
-	  The module will be called i2c-algo-bit.
+	  This support is also available as a module.  If so, the module 
+	  will be called i2c-algo-bit.
 
 config I2C_PROSAVAGE
 	tristate "S3/VIA (Pro)Savage"
@@ -51,14 +59,8 @@
 	    S3/VIA KM266/VT8375 aka ProSavage8
 	    S3/VIA KM133/VT8365 aka Savage4
 
-	  This can also be built as a module which can be inserted and removed
-	  while the kernel is running.  If you want to compile it as a module,
-	  say M here and read <file:Documentation/modules.txt>.
-	  The module will be called i2c-prosavage.
-
-	  You will also need the latest user-space utilties: you can find them
-	  in the lm_sensors package, which you can download at
-	  http://www.lm-sensors.nu
+	  This support is also available as a module.  If so, the module 
+	  will be called i2c-prosavage.
 
 config I2C_PHILIPSPAR
 	tristate "Philips style parallel port adapter"
@@ -67,13 +69,8 @@
 	  This supports parallel-port I2C adapters made by Philips.  Say Y if
 	  you own such an adapter.
 
-	  This driver is also available as a module.  If you want to compile
-	  it as a module, say M here and read
-	  <file:Documentation/modules.txt>.
-	  The module will be called i2c-philips-par.
-
-	  Note that if you want support for different parallel port devices,
-	  life will be much easier if you compile them all as modules.
+	  This support is also available as a module.  If so, the module 
+	  will be called i2c-philips-par.
 
 config I2C_ELV
 	tristate "ELV adapter"
@@ -82,10 +79,8 @@
 	  This supports parallel-port I2C adapters called ELV.  Say Y if you
 	  own such an adapter.
 
-	  This driver is also available as a module.  If you want to compile
-	  it as a module, say M here and read
-	  <file:Documentation/modules.txt>.
-	  The module will be called i2c-elv.
+	  This support is also available as a module.  If so, the module 
+	  will be called i2c-elv.
 
 config I2C_VELLEMAN
 	tristate "Velleman K9000 adapter"
@@ -94,10 +89,8 @@
 	  This supports the Velleman K9000 parallel-port I2C adapter.  Say Y
 	  if you own such an adapter.
 
-	  This driver is also available as a module.  If you want to compile
-	  it as a module, say M here and read
-	  <file:Documentation/modules.txt>.
-	  The module will be called i2c-velleman.
+	  This support is also available as a module.  If so, the module 
+	  will be called i2c-velleman.
 
 config SCx200_I2C
 	tristate "NatSemi SCx200 I2C using GPIO pins"
@@ -107,7 +100,8 @@
 
 	  If you don't know what to do here, say N.
 
-	  If compiled as a module, it will be called scx200_i2c.
+	  This support is also available as a module.  If so, the module 
+	  will be called scx200_i2c.
 
 config SCx200_I2C_SCL
 	int "GPIO pin used for SCL"
@@ -133,7 +127,8 @@
 
 	  If you don't know what to do here, say N.
 
-	  If compiled as a module, it will be called scx200_acb.
+	  This support is also available as a module.  If so, the module 
+	  will be called scx200_acb.
 
 config I2C_ALGOPCF
 	tristate "I2C PCF 8584 interfaces"
@@ -143,10 +138,8 @@
 	  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 you want to compile
-	  it as a module, say M here and read
-	  <file:Documentation/modules.txt>.
-	  The module will be called i2c-algo-pcf.
+	  This support is also available as a module.  If so, the module 
+	  will be called i2c-algo-pcf.
 
 config I2C_ELEKTOR
 	tristate "Elektor ISA card"
@@ -155,10 +148,8 @@
 	  This supports the PCF8584 ISA bus I2C adapter.  Say Y if you own
 	  such an adapter.
 
-	  This driver is also available as a module.  If you want to compile
-	  it as a module, say M here and read
-	  <file:Documentation/modules.txt>.
-	  The module will be called i2c-elektor.
+	  This support is also available as a module.  If so, the module 
+	  will be called i2c-elektor.
 
 config I2C_KEYWEST
 	tristate "Powermac Keywest I2C interface"
@@ -167,9 +158,8 @@
 	  This supports the use of the I2C interface in the combo-I/O
 	  chip on recent Apple machines.  Say Y if you have such a machine.
 
-	  This driver is also available as a module.  If you want to compile
-	  it as a module, say M here and read Documentation/modules.txt.
-	  The module will be called i2c-keywest.
+	  This support is also available as a module.  If so, the module 
+	  will be called i2c-keywest.
 
 config ITE_I2C_ALGO
 	tristate "ITE I2C Algorithm"
@@ -179,9 +169,8 @@
 	  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 you want to compile
-	  it as a module, say M here and read Documentation/modules.txt.
-	  The module will be called i2c-algo-ite.
+	  This support is also available as a module.  If so, the module 
+	  will be called i2c-algo-ite.
 
 config ITE_I2C_ADAP
 	tristate "ITE I2C Adapter"
@@ -191,9 +180,8 @@
 	  systems. Say Y if you have one of these. You should also say Y for
 	  the ITE I2C driver algorithm support above.
 
-	  This support is also available as a module. If you want to compile
-	  it as a module, say M here and read Documentation/modules.txt.
-	  The module will be called i2c-adap-ite.
+	  This support is also available as a module.  If so, the module 
+	  will be called i2c-adap-ite.
 
 config I2C_ALGO8XX
 	tristate "MPC8xx CPM I2C interface"
@@ -210,20 +198,6 @@
 config I2C_IOP3XX
 	tristate "Intel XScale IOP3xx on-chip I2C interface"
 	depends on ARCH_IOP3XX && I2C
-
-config I2C_CHARDEV
-	tristate "I2C device interface"
-	depends on I2C
-	help
-	  Say Y here to use i2c-* device files, usually found in the /dev
-	  directory on your system.  They make it possible to have user-space
-	  programs use the I2C bus.  Information on how to do this is
-	  contained in the file <file:Documentation/i2c/dev-interface>.
-
-	  This code is also available as a module.  If you want to compile
-	  it as a module, say M here and read
-	  <file:Documentation/modules.txt>.
-	  The module will be called i2c-dev.
 
 	source drivers/i2c/busses/Kconfig
 	source drivers/i2c/chips/Kconfig
author
#29 lore raw

ChangeSet 1.1315.1.14, 2003/09/22 12:46:46-07:00, [email protected]

[PATCH] I2C: move i2c-prosavage.c driver to drivers/i2c/busses where it belongs.

 drivers/i2c/i2c-prosavage.c        |  356 -------------------------------------
 drivers/i2c/Kconfig                |   14 -
 drivers/i2c/Makefile               |    1 
 drivers/i2c/busses/Kconfig         |   14 +
 drivers/i2c/busses/Makefile        |    1 
 drivers/i2c/busses/i2c-prosavage.c |  356 +++++++++++++++++++++++++++++++++++++
 6 files changed, 371 insertions(+), 371 deletions(-)
drivers/i2c/Kconfig +0 -14
diff -Nru a/drivers/i2c/Kconfig b/drivers/i2c/Kconfig
@@ -48,20 +48,6 @@
 	  This support is also available as a module.  If so, the module 
 	  will be called i2c-algo-bit.
 
-config I2C_PROSAVAGE
-	tristate "S3/VIA (Pro)Savage"
-	depends on I2C_ALGOBIT && PCI && EXPERIMENTAL
-	help
-	  If you say yes to this option, support will be included for the
-	  I2C bus and DDC bus of the S3VIA embedded Savage4 and ProSavage8
-	  graphics processors.
-	  chipsets supported:
-	    S3/VIA KM266/VT8375 aka ProSavage8
-	    S3/VIA KM133/VT8365 aka Savage4
-
-	  This support is also available as a module.  If so, the module 
-	  will be called i2c-prosavage.
-
 config I2C_PHILIPSPAR
 	tristate "Philips style parallel port adapter"
 	depends on I2C_ALGOBIT && PARPORT
drivers/i2c/Makefile +0 -1
diff -Nru a/drivers/i2c/Makefile b/drivers/i2c/Makefile
@@ -5,7 +5,6 @@
 obj-$(CONFIG_I2C)		+= i2c-core.o
 obj-$(CONFIG_I2C_CHARDEV)	+= i2c-dev.o
 obj-$(CONFIG_I2C_ALGOBIT)	+= i2c-algo-bit.o
-obj-$(CONFIG_I2C_PROSAVAGE)	+= i2c-prosavage.o
 obj-$(CONFIG_I2C_PHILIPSPAR)	+= i2c-philips-par.o
 obj-$(CONFIG_I2C_ELV)		+= i2c-elv.o
 obj-$(CONFIG_I2C_VELLEMAN)	+= i2c-velleman.o
drivers/i2c/busses/Kconfig +14 -0
diff -Nru a/drivers/i2c/busses/Kconfig b/drivers/i2c/busses/Kconfig
@@ -113,6 +113,20 @@
 	  This driver can also be built as a module.  If so, the module
 	  will be called i2c-piix4.
 
+config I2C_PROSAVAGE
+	tristate "S3/VIA (Pro)Savage"
+	depends on I2C_ALGOBIT && PCI && EXPERIMENTAL
+	help
+	  If you say yes to this option, support will be included for the
+	  I2C bus and DDC bus of the S3VIA embedded Savage4 and ProSavage8
+	  graphics processors.
+	  chipsets supported:
+	    S3/VIA KM266/VT8375 aka ProSavage8
+	    S3/VIA KM133/VT8365 aka Savage4
+
+	  This support is also available as a module.  If so, the module 
+	  will be called i2c-prosavage.
+
 config I2C_SAVAGE4
 	tristate "S3 Savage 4"
 	depends on I2C && PCI && EXPERIMENTAL
drivers/i2c/busses/Makefile +1 -0
diff -Nru a/drivers/i2c/busses/Makefile b/drivers/i2c/busses/Makefile
@@ -11,6 +11,7 @@
 obj-$(CONFIG_I2C_ISA)		+= i2c-isa.o
 obj-$(CONFIG_I2C_NFORCE2)	+= i2c-nforce2.o
 obj-$(CONFIG_I2C_PIIX4)		+= i2c-piix4.o
+obj-$(CONFIG_I2C_PROSAVAGE)	+= i2c-prosavage.o
 obj-$(CONFIG_I2C_SAVAGE4)	+= i2c-savage4.o
 obj-$(CONFIG_I2C_SIS5595)	+= i2c-sis5595.o
 obj-$(CONFIG_I2C_SIS630)	+= i2c-sis630.o
drivers/i2c/busses/i2c-prosavage.c new file +356 -0

356 lines not on this page · raw message

drivers/i2c/i2c-prosavage.c deleted +0 -356

356 lines not on this page · raw message

author
#30 lore raw

ChangeSet 1.1315.1.15, 2003/09/22 13:06:04-07:00, [email protected]

[PATCH] I2C: clean up i2c-prosavage.c driver

Remove direct memory accesses and link up device in the proper place in the sysfs tree.

 drivers/i2c/busses/i2c-prosavage.c |   54 ++++++++++++-------------------------
 1 files changed, 18 insertions(+), 36 deletions(-)
drivers/i2c/busses/i2c-prosavage.c +18 -36
diff -Nru a/drivers/i2c/busses/i2c-prosavage.c b/drivers/i2c/busses/i2c-prosavage.c
@@ -60,21 +60,14 @@
 #include <linux/i2c.h>
 #include <linux/i2c-algo-bit.h>
 
-#include <asm/io.h>
-
 
 /*
  * driver configuration
  */
-#define	DRIVER_ID	"i2c-prosavage"
-#define	DRIVER_VERSION	"20030621"
-
-#define ADAPTER_NAME(x) (x).name
-
 #define MAX_BUSSES	2
 
 struct s_i2c_bus {
-	u8	*mmvga;
+	void	*mmvga;
 	int	i2c_reg;
 	int	adap_ok;
 	struct i2c_adapter		adap;
@@ -82,7 +75,7 @@
 };
 
 struct s_i2c_chip {
-	u8	*mmio;
+	void	*mmio;
 	struct s_i2c_bus	i2c_bus[MAX_BUSSES];
 };
 
@@ -102,9 +95,6 @@
 /* 
  * S3/VIA 8365/8375 registers
  */
-#ifndef PCI_VENDOR_ID_S3
-#define PCI_VENDOR_ID_S3		0x5333
-#endif
 #ifndef PCI_DEVICE_ID_S3_SAVAGE4
 #define PCI_DEVICE_ID_S3_SAVAGE4	0x8a25
 #endif
@@ -126,9 +116,9 @@
 #define I2C_SCL_IN	0x04
 #define I2C_SDA_IN	0x08
 
-#define SET_CR_IX(p, val)	*((p)->mmvga + VGA_CR_IX) = (u8)(val)
-#define SET_CR_DATA(p, val)	*((p)->mmvga + VGA_CR_DATA) = (u8)(val)
-#define GET_CR_DATA(p)		*((p)->mmvga + VGA_CR_DATA)
+#define SET_CR_IX(p, val)	writeb((val), (p)->mmvga + VGA_CR_IX)
+#define SET_CR_DATA(p, val)	writeb((val), (p)->mmvga + VGA_CR_DATA)
+#define GET_CR_DATA(p)		readb((p)->mmvga + VGA_CR_DATA)
 
 
 /*
@@ -190,12 +180,13 @@
 /*
  * adapter initialisation
  */
-static int i2c_register_bus(struct s_i2c_bus *p, u8 *mmvga, u32 i2c_reg)
+static int i2c_register_bus(struct pci_dev *dev, struct s_i2c_bus *p, u8 *mmvga, u32 i2c_reg)
 {
 	int ret;
 	p->adap.owner	  = THIS_MODULE;
 	p->adap.id	  = I2C_HW_B_S3VIA;
 	p->adap.algo_data = &p->algo;
+	p->adap.dev.parent = &dev->dev;
 	p->algo.setsda	  = bit_s3via_setsda;
 	p->algo.setscl	  = bit_s3via_setscl;
 	p->algo.getsda	  = bit_s3via_getsda;
@@ -236,8 +227,8 @@
 
 		ret = i2c_bit_del_bus(&chip->i2c_bus[i].adap);
 	        if (ret) {
-			printk(DRIVER_ID ": %s not removed\n",
-				ADAPTER_NAME(chip->i2c_bus[i].adap));
+			dev_err(&dev->dev, ": %s not removed\n",
+				chip->i2c_bus[i].adap.name);
 		}
 	}
 	if (chip->mmio) {
@@ -270,7 +261,7 @@
 	chip->mmio = ioremap_nocache(base, len);
 
 	if (chip->mmio == NULL) {
-		printk (DRIVER_ID ": ioremap failed\n");
+		dev_err(&dev->dev, "ioremap failed\n");
 		prosavage_remove(dev);
 		return -ENODEV;
 	}
@@ -286,10 +277,10 @@
 	 * i2c bus registration
 	 */
 	bus = &chip->i2c_bus[0];
-	snprintf(ADAPTER_NAME(bus->adap), sizeof(ADAPTER_NAME(bus->adap)),
+	snprintf(bus->adap.name, sizeof(bus->adap.name),
 		"ProSavage I2C bus at %02x:%02x.%x",
 		dev->bus->number, PCI_SLOT(dev->devfn), PCI_FUNC(dev->devfn));
-	ret = i2c_register_bus(bus, chip->mmio + 0x8000, CR_SERIAL1);
+	ret = i2c_register_bus(dev, bus, chip->mmio + 0x8000, CR_SERIAL1);
 	if (ret) {
 		goto err_adap;
 	}
@@ -297,16 +288,16 @@
 	 * ddc bus registration
 	 */
 	bus = &chip->i2c_bus[1];
-	snprintf(ADAPTER_NAME(bus->adap), sizeof(ADAPTER_NAME(bus->adap)),
+	snprintf(bus->adap.name, sizeof(bus->adap.name),
 		"ProSavage DDC bus at %02x:%02x.%x",
 		dev->bus->number, PCI_SLOT(dev->devfn), PCI_FUNC(dev->devfn));
-	ret = i2c_register_bus(bus, chip->mmio + 0x8000, CR_SERIAL2);
+	ret = i2c_register_bus(dev, bus, chip->mmio + 0x8000, CR_SERIAL2);
 	if (ret) {
 		goto err_adap;
 	}
 	return 0;
 err_adap:
-	printk (DRIVER_ID ": %s failed\n", ADAPTER_NAME(bus->adap));
+	dev_err(&dev->dev, ": %s failed\n", bus->adap.name);
 	prosavage_remove(dev);
 	return ret;
 }
@@ -316,17 +307,9 @@
  * Data for PCI driver interface
  */
 static struct pci_device_id prosavage_pci_tbl[] = {
-   {
-	.vendor		=	PCI_VENDOR_ID_S3,
-	.device		=	PCI_DEVICE_ID_S3_SAVAGE4,
-	.subvendor	=	PCI_ANY_ID,
-	.subdevice	=	PCI_ANY_ID,
-   },{
-	.vendor		=	PCI_VENDOR_ID_S3,
-	.device		=	PCI_DEVICE_ID_S3_PROSAVAGE8,
-	.subvendor	=	PCI_ANY_ID,
-	.subdevice	=	PCI_ANY_ID,
-   },{ 0, }
+	{ PCI_DEVICE(PCI_VENDOR_ID_S3, PCI_DEVICE_ID_S3_SAVAGE4) },
+	{ PCI_DEVICE(PCI_VENDOR_ID_S3, PCI_DEVICE_ID_S3_PROSAVAGE8) },
+	{ 0, },
 };
 
 static struct pci_driver prosavage_driver = {
@@ -338,7 +321,6 @@
 
 static int __init i2c_prosavage_init(void)
 {
-	printk(DRIVER_ID " version %s (%s)\n", I2C_VERSION, DRIVER_VERSION);
 	return pci_module_init(&prosavage_driver);
 }
 
author
#31 lore raw

ChangeSet 1.1315.1.16, 2003/09/22 13:10:15-07:00, [email protected]

[PATCH] I2C: fix up dependancies in the i2c/busses/Kconfig file

 drivers/i2c/busses/Kconfig |    8 ++++----
 1 files changed, 4 insertions(+), 4 deletions(-)
drivers/i2c/busses/Kconfig +4 -4
diff -Nru a/drivers/i2c/busses/Kconfig b/drivers/i2c/busses/Kconfig
@@ -64,7 +64,7 @@
 
 config I2C_I810
 	tristate "Intel 810/815"
-	depends on I2C && PCI && EXPERIMENTAL
+	depends on I2C_ALGOBIT && PCI && EXPERIMENTAL
 	help
 	  If you say yes to this option, support will be included for the Intel
 	  810/815 family of mainboard I2C interfaces.  Specifically, the 
@@ -129,7 +129,7 @@
 
 config I2C_SAVAGE4
 	tristate "S3 Savage 4"
-	depends on I2C && PCI && EXPERIMENTAL
+	depends on I2C_ALGOBIT && PCI && EXPERIMENTAL
 	help
 	  If you say yes to this option, support will be included for the 
 	  S3 Savage 4 I2C interface.
@@ -176,7 +176,7 @@
 
 config I2C_VIA
 	tristate "VIA 82C58B"
-	depends on I2C && PCI && EXPERIMENTAL
+	depends on I2C_ALGOBIT && PCI && EXPERIMENTAL
 	help
 
 	  If you say yes to this option, support will be included for the VIA
@@ -205,7 +205,7 @@
 
 config I2C_VOODOO3
 	tristate "Voodoo 3"
-	depends on I2C && PCI && EXPERIMENTAL
+	depends on I2C_ALGOBIT && PCI && EXPERIMENTAL
 	help
 
 	  If you say yes to this option, support will be included for the
author
#32 lore raw

ChangeSet 1.1315.1.17, 2003/09/22 13:20:35-07:00, [email protected]

[PATCH] I2C: move the i2c-philips-par driver to drivers/i2c/busses

 drivers/i2c/i2c-philips-par.c        |  256 -----------------------------------
 drivers/i2c/Kconfig                  |   10 -
 drivers/i2c/Makefile                 |    1 
 drivers/i2c/busses/Kconfig           |    9 +
 drivers/i2c/busses/Makefile          |    1 
 drivers/i2c/busses/i2c-philips-par.c |  256 +++++++++++++++++++++++++++++++++++
 6 files changed, 266 insertions(+), 267 deletions(-)
drivers/i2c/Kconfig +0 -10
diff -Nru a/drivers/i2c/Kconfig b/drivers/i2c/Kconfig
@@ -48,16 +48,6 @@
 	  This support is also available as a module.  If so, the module 
 	  will be called i2c-algo-bit.
 
-config I2C_PHILIPSPAR
-	tristate "Philips style parallel port adapter"
-	depends on I2C_ALGOBIT && PARPORT
-	---help---
-	  This supports parallel-port I2C adapters made by Philips.  Say Y if
-	  you own such an adapter.
-
-	  This support is also available as a module.  If so, the module 
-	  will be called i2c-philips-par.
-
 config I2C_ELV
 	tristate "ELV adapter"
 	depends on I2C_ALGOBIT && ISA
drivers/i2c/Makefile +0 -1
diff -Nru a/drivers/i2c/Makefile b/drivers/i2c/Makefile
@@ -5,7 +5,6 @@
 obj-$(CONFIG_I2C)		+= i2c-core.o
 obj-$(CONFIG_I2C_CHARDEV)	+= i2c-dev.o
 obj-$(CONFIG_I2C_ALGOBIT)	+= i2c-algo-bit.o
-obj-$(CONFIG_I2C_PHILIPSPAR)	+= i2c-philips-par.o
 obj-$(CONFIG_I2C_ELV)		+= i2c-elv.o
 obj-$(CONFIG_I2C_VELLEMAN)	+= i2c-velleman.o
 obj-$(CONFIG_I2C_ALGOPCF)	+= i2c-algo-pcf.o
drivers/i2c/busses/Kconfig +9 -0
diff -Nru a/drivers/i2c/busses/Kconfig b/drivers/i2c/busses/Kconfig
@@ -97,6 +97,15 @@
 	  This driver can also be built as a module.  If so, the module
 	  will be called i2c-nforce2.
 
+config I2C_PHILIPSPAR
+	tristate "Philips style parallel port adapter"
+	depends on I2C_ALGOBIT && PARPORT
+	help
+	  This supports parallel-port I2C adapters made by Philips.
+
+	  This support is also available as a module.  If so, the module 
+	  will be called i2c-philips-par.
+
 config I2C_PIIX4
 	tristate "Intel PIIX4"
 	depends on I2C && PCI && EXPERIMENTAL
drivers/i2c/busses/Makefile +1 -0
diff -Nru a/drivers/i2c/busses/Makefile b/drivers/i2c/busses/Makefile
@@ -10,6 +10,7 @@
 obj-$(CONFIG_I2C_I810)		+= i2c-i810.o
 obj-$(CONFIG_I2C_ISA)		+= i2c-isa.o
 obj-$(CONFIG_I2C_NFORCE2)	+= i2c-nforce2.o
+obj-$(CONFIG_I2C_PHILIPSPAR)	+= i2c-philips-par.o
 obj-$(CONFIG_I2C_PIIX4)		+= i2c-piix4.o
 obj-$(CONFIG_I2C_PROSAVAGE)	+= i2c-prosavage.o
 obj-$(CONFIG_I2C_SAVAGE4)	+= i2c-savage4.o
drivers/i2c/busses/i2c-philips-par.c new file +256 -0

256 lines not on this page · raw message

drivers/i2c/i2c-philips-par.c deleted +0 -256

256 lines not on this page · raw message

author
#33 lore raw

ChangeSet 1.1315.1.18, 2003/09/22 13:30:23-07:00, [email protected]

[PATCH] I2C: clean up i2c-philips-par.c driver a bit

Fix bug when registering the i2c_adap as the structure was not set to 0.

 drivers/i2c/busses/i2c-philips-par.c |   33 ++++++++++-----------------------
 1 files changed, 10 insertions(+), 23 deletions(-)
drivers/i2c/busses/i2c-philips-par.c +10 -23
diff -Nru a/drivers/i2c/busses/i2c-philips-par.c b/drivers/i2c/busses/i2c-philips-par.c
@@ -24,10 +24,8 @@
 /* $Id: i2c-philips-par.c,v 1.29 2003/01/21 08:08:16 kmalkki Exp $ */
 
 #include <linux/kernel.h>
-#include <linux/ioport.h>
 #include <linux/module.h>
 #include <linux/init.h>
-#include <linux/stddef.h>
 #include <linux/parport.h>
 #include <linux/i2c.h>
 #include <linux/i2c-algo-bit.h>
@@ -45,11 +43,6 @@
 static struct i2c_par *adapter_list;
 
 
-/* ----- global defines -----------------------------------------------	*/
-#define DEB(x)		/* should be reasonable open, close &c. 	*/
-#define DEB2(x) 	/* low level debugging - very slow 		*/
-#define DEBE(x)	x	/* error messages 				*/
-
 /* ----- printer port defines ------------------------------------------*/
 					/* Pin Port  Inverted	name	*/
 #define I2C_ON		0x20		/* 12 status N	paper		*/
@@ -163,8 +156,9 @@
 		printk(KERN_ERR "i2c-philips-par: Unable to malloc.\n");
 		return;
 	}
+	memset (adapter, 0x00, sizeof(struct i2c_par));
 
-	printk(KERN_DEBUG "i2c-philips-par.o: attaching to %s\n", port->name);
+	/* printk(KERN_DEBUG "i2c-philips-par.o: attaching to %s\n", port->name); */
 
 	adapter->pdev = parport_register_device(port, "i2c-philips-par",
 						NULL, NULL, NULL, 
@@ -191,8 +185,7 @@
 	bit_lp_setscl(port, 1);
 	parport_release(adapter->pdev);
 
-	if (i2c_bit_add_bus(&adapter->adapter) < 0)
-	{
+	if (i2c_bit_add_bus(&adapter->adapter) < 0) {
 		printk(KERN_ERR "i2c-philips-par: Unable to register with I2C.\n");
 		parport_unregister_device(adapter->pdev);
 		kfree(adapter);
@@ -207,10 +200,8 @@
 {
 	struct i2c_par *adapter, *prev = NULL;
 
-	for (adapter = adapter_list; adapter; adapter = adapter->next)
-	{
-		if (adapter->pdev->port == port)
-		{
+	for (adapter = adapter_list; adapter; adapter = adapter->next) {
+		if (adapter->pdev->port == port) {
 			parport_unregister_device(adapter->pdev);
 			i2c_bit_del_bus(&adapter->adapter);
 			if (prev)
@@ -224,21 +215,17 @@
 	}
 }
 
-
 static struct parport_driver i2c_driver = {
-	"i2c-philips-par",
-	i2c_parport_attach,
-	i2c_parport_detach,
-	NULL
+	.name =		"i2c-philips-par",
+	.attach =	i2c_parport_attach,
+	.detach =	i2c_parport_detach,
 };
 
 int __init i2c_bitlp_init(void)
 {
-	printk(KERN_INFO "i2c-philips-par.o: i2c Philips parallel port adapter module version %s (%s)\n", I2C_VERSION, I2C_DATE);
+	printk(KERN_INFO "i2c Philips parallel port adapter driver\n");
 
-	parport_register_driver(&i2c_driver);
-	
-	return 0;
+	return parport_register_driver(&i2c_driver);
 }
 
 void __exit i2c_bitlp_exit(void)
author
#34 lore raw

ChangeSet 1.1315.1.19, 2003/09/22 13:36:52-07:00, [email protected]

[PATCH] I2C: move i2c-elv.c driver to drivers/i2c/busses

 drivers/i2c/i2c-elv.c        |  176 -------------------------------------------
 drivers/i2c/Kconfig          |   10 --
 drivers/i2c/Makefile         |    1 
 drivers/i2c/busses/Kconfig   |   10 ++
 drivers/i2c/busses/Makefile  |    1 
 drivers/i2c/busses/i2c-elv.c |  176 +++++++++++++++++++++++++++++++++++++++++++
 6 files changed, 187 insertions(+), 187 deletions(-)
drivers/i2c/Kconfig +0 -10
diff -Nru a/drivers/i2c/Kconfig b/drivers/i2c/Kconfig
@@ -48,16 +48,6 @@
 	  This support is also available as a module.  If so, the module 
 	  will be called i2c-algo-bit.
 
-config I2C_ELV
-	tristate "ELV adapter"
-	depends on I2C_ALGOBIT && ISA
-	help
-	  This supports parallel-port I2C adapters called ELV.  Say Y if you
-	  own such an adapter.
-
-	  This support is also available as a module.  If so, the module 
-	  will be called i2c-elv.
-
 config I2C_VELLEMAN
 	tristate "Velleman K9000 adapter"
 	depends on I2C_ALGOBIT && ISA
drivers/i2c/Makefile +0 -1
diff -Nru a/drivers/i2c/Makefile b/drivers/i2c/Makefile
@@ -5,7 +5,6 @@
 obj-$(CONFIG_I2C)		+= i2c-core.o
 obj-$(CONFIG_I2C_CHARDEV)	+= i2c-dev.o
 obj-$(CONFIG_I2C_ALGOBIT)	+= i2c-algo-bit.o
-obj-$(CONFIG_I2C_ELV)		+= i2c-elv.o
 obj-$(CONFIG_I2C_VELLEMAN)	+= i2c-velleman.o
 obj-$(CONFIG_I2C_ALGOPCF)	+= i2c-algo-pcf.o
 obj-$(CONFIG_I2C_ELEKTOR)	+= i2c-elektor.o
drivers/i2c/busses/Kconfig +10 -0
diff -Nru a/drivers/i2c/busses/Kconfig b/drivers/i2c/busses/Kconfig
@@ -46,6 +46,16 @@
 	  This driver can also be built as a module.  If so, the module
 	  will be called i2c-amd8111.
 
+config I2C_ELV
+	tristate "ELV adapter"
+	depends on I2C_ALGOBIT && ISA
+	help
+	  This supports parallel-port I2C adapters called ELV.  Say Y if you
+	  own such an adapter.
+
+	  This support is also available as a module.  If so, the module 
+	  will be called i2c-elv.
+
 config I2C_I801
 	tristate "Intel 801"
 	depends on I2C && PCI && EXPERIMENTAL
drivers/i2c/busses/Makefile +1 -0
diff -Nru a/drivers/i2c/busses/Makefile b/drivers/i2c/busses/Makefile
@@ -6,6 +6,7 @@
 obj-$(CONFIG_I2C_ALI15X3)	+= i2c-ali15x3.o
 obj-$(CONFIG_I2C_AMD756)	+= i2c-amd756.o
 obj-$(CONFIG_I2C_AMD8111)	+= i2c-amd8111.o
+obj-$(CONFIG_I2C_ELV)		+= i2c-elv.o
 obj-$(CONFIG_I2C_I801)		+= i2c-i801.o
 obj-$(CONFIG_I2C_I810)		+= i2c-i810.o
 obj-$(CONFIG_I2C_ISA)		+= i2c-isa.o
drivers/i2c/busses/i2c-elv.c new file +176 -0

176 lines not on this page · raw message

drivers/i2c/i2c-elv.c deleted +0 -176

176 lines not on this page · raw message

author
#35 lore raw

ChangeSet 1.1315.1.20, 2003/09/22 13:44:13-07:00, [email protected]

[PATCH] I2C: clean up the i2c-elv.c driver a bit

 drivers/i2c/busses/i2c-elv.c |   21 +++++++++------------
 1 files changed, 9 insertions(+), 12 deletions(-)
drivers/i2c/busses/i2c-elv.c +9 -12
diff -Nru a/drivers/i2c/busses/i2c-elv.c b/drivers/i2c/busses/i2c-elv.c
@@ -21,8 +21,6 @@
 /* With some changes from Kyösti Mälkki <[email protected]> and even
    Frodo Looijaard <[email protected]> */
 
-/* $Id: i2c-elv.c,v 1.27 2003/01/21 08:08:16 kmalkki Exp $ */
-
 #include <linux/kernel.h>
 #include <linux/module.h>
 #include <linux/delay.h>
@@ -36,7 +34,7 @@
 
 #define DEFAULT_BASE 0x378
 static int base=0;
-static unsigned char PortData = 0;
+static unsigned char port_data = 0;
 
 /* ----- global defines -----------------------------------------------	*/
 #define DEB(x)		/* should be reasonable open, close &c. 	*/
@@ -57,21 +55,21 @@
 static void bit_elv_setscl(void *data, int state)
 {
 	if (state) {
-		PortData &= 0xfe;
+		port_data &= 0xfe;
 	} else {
-		PortData |=1;
+		port_data |=1;
 	}
-	outb(PortData, DATA);
+	outb(port_data, DATA);
 }
 
 static void bit_elv_setsda(void *data, int state)
 {
 	if (state) {
-		PortData &=0xfd;
+		port_data &=0xfd;
 	} else {
-		PortData |=2;
+		port_data |=2;
 	}
-	outb(PortData, DATA);
+	outb(port_data, DATA);
 } 
 
 static int bit_elv_getscl(void *data)
@@ -103,7 +101,7 @@
 		goto fail;
 	}
 
-	PortData = 0;
+	port_data = 0;
 	bit_elv_setsda((void*)base,1);
 	bit_elv_setscl((void*)base,1);
 	return 0;
@@ -129,14 +127,13 @@
 
 static struct i2c_adapter bit_elv_ops = {
 	.owner		= THIS_MODULE,
-	.id		= I2C_HW_B_ELV,
 	.algo_data	= &bit_elv_data,
 	.name		= "ELV Parallel port adaptor",
 };
 
 static int __init i2c_bitelv_init(void)
 {
-	printk(KERN_INFO "i2c-elv.o: i2c ELV parallel port adapter module version %s (%s)\n", I2C_VERSION, I2C_DATE);
+	printk(KERN_INFO "i2c ELV parallel port adapter driver\n");
 	if (base==0) {
 		/* probe some values */
 		base=DEFAULT_BASE;
author
#36 lore raw

ChangeSet 1.1315.1.21, 2003/09/22 13:57:44-07:00, [email protected]

I2C: move i2c-elektor.c driver to drivers/i2c/busses/

 drivers/i2c/i2c-elektor.c        |  286 ---------------------------------------
 drivers/i2c/Kconfig              |   10 -
 drivers/i2c/Makefile             |    1 
 drivers/i2c/busses/Kconfig       |   10 +
 drivers/i2c/busses/Makefile      |    1 
 drivers/i2c/busses/i2c-elektor.c |  286 +++++++++++++++++++++++++++++++++++++++
 6 files changed, 297 insertions(+), 297 deletions(-)
drivers/i2c/Kconfig +0 -10
diff -Nru a/drivers/i2c/Kconfig b/drivers/i2c/Kconfig
@@ -107,16 +107,6 @@
 	  This support is also available as a module.  If so, the module 
 	  will be called i2c-algo-pcf.
 
-config I2C_ELEKTOR
-	tristate "Elektor ISA card"
-	depends on I2C_ALGOPCF && BROKEN_ON_SMP
-	help
-	  This supports the PCF8584 ISA bus I2C adapter.  Say Y if you own
-	  such an adapter.
-
-	  This support is also available as a module.  If so, the module 
-	  will be called i2c-elektor.
-
 config I2C_KEYWEST
 	tristate "Powermac Keywest I2C interface"
 	depends on I2C && PPC_PMAC
drivers/i2c/Makefile +0 -1
diff -Nru a/drivers/i2c/Makefile b/drivers/i2c/Makefile
@@ -7,7 +7,6 @@
 obj-$(CONFIG_I2C_ALGOBIT)	+= i2c-algo-bit.o
 obj-$(CONFIG_I2C_VELLEMAN)	+= i2c-velleman.o
 obj-$(CONFIG_I2C_ALGOPCF)	+= i2c-algo-pcf.o
-obj-$(CONFIG_I2C_ELEKTOR)	+= i2c-elektor.o
 obj-$(CONFIG_I2C_KEYWEST)	+= i2c-keywest.o
 obj-$(CONFIG_ITE_I2C_ALGO)	+= i2c-algo-ite.o
 obj-$(CONFIG_ITE_I2C_ADAP)	+= i2c-adap-ite.o
drivers/i2c/busses/Kconfig +10 -0
diff -Nru a/drivers/i2c/busses/Kconfig b/drivers/i2c/busses/Kconfig
@@ -46,6 +46,16 @@
 	  This driver can also be built as a module.  If so, the module
 	  will be called i2c-amd8111.
 
+config I2C_ELEKTOR
+	tristate "Elektor ISA card"
+	depends on I2C_ALGOPCF && BROKEN_ON_SMP
+	help
+	  This supports the PCF8584 ISA bus I2C adapter.  Say Y if you own
+	  such an adapter.
+
+	  This support is also available as a module.  If so, the module 
+	  will be called i2c-elektor.
+
 config I2C_ELV
 	tristate "ELV adapter"
 	depends on I2C_ALGOBIT && ISA
drivers/i2c/busses/Makefile +1 -0
diff -Nru a/drivers/i2c/busses/Makefile b/drivers/i2c/busses/Makefile
@@ -6,6 +6,7 @@
 obj-$(CONFIG_I2C_ALI15X3)	+= i2c-ali15x3.o
 obj-$(CONFIG_I2C_AMD756)	+= i2c-amd756.o
 obj-$(CONFIG_I2C_AMD8111)	+= i2c-amd8111.o
+obj-$(CONFIG_I2C_ELEKTOR)	+= i2c-elektor.o
 obj-$(CONFIG_I2C_ELV)		+= i2c-elv.o
 obj-$(CONFIG_I2C_I801)		+= i2c-i801.o
 obj-$(CONFIG_I2C_I810)		+= i2c-i810.o
drivers/i2c/busses/i2c-elektor.c new file +286 -0

286 lines not on this page · raw message

drivers/i2c/i2c-elektor.c deleted +0 -286

286 lines not on this page · raw message

author
#37 lore raw

ChangeSet 1.1315.1.22, 2003/09/22 14:09:17-07:00, [email protected]

[PATCH] I2C: move i2c-velleman driver to drivers/i2c/busses

 drivers/i2c/i2c-velleman.c        |  161 --------------------------------------
 drivers/i2c/Kconfig               |   10 --
 drivers/i2c/Makefile              |    1 
 drivers/i2c/busses/Kconfig        |   10 ++
 drivers/i2c/busses/Makefile       |    1 
 drivers/i2c/busses/i2c-velleman.c |  160 +++++++++++++++++++++++++++++++++++++
 6 files changed, 171 insertions(+), 172 deletions(-)
drivers/i2c/Kconfig +0 -10
diff -Nru a/drivers/i2c/Kconfig b/drivers/i2c/Kconfig
@@ -48,16 +48,6 @@
 	  This support is also available as a module.  If so, the module 
 	  will be called i2c-algo-bit.
 
-config I2C_VELLEMAN
-	tristate "Velleman K9000 adapter"
-	depends on I2C_ALGOBIT && ISA
-	help
-	  This supports the Velleman K9000 parallel-port I2C adapter.  Say Y
-	  if you own such an adapter.
-
-	  This support is also available as a module.  If so, the module 
-	  will be called i2c-velleman.
-
 config SCx200_I2C
 	tristate "NatSemi SCx200 I2C using GPIO pins"
 	depends on SCx200 && I2C_ALGOBIT
drivers/i2c/Makefile +0 -1
diff -Nru a/drivers/i2c/Makefile b/drivers/i2c/Makefile
@@ -5,7 +5,6 @@
 obj-$(CONFIG_I2C)		+= i2c-core.o
 obj-$(CONFIG_I2C_CHARDEV)	+= i2c-dev.o
 obj-$(CONFIG_I2C_ALGOBIT)	+= i2c-algo-bit.o
-obj-$(CONFIG_I2C_VELLEMAN)	+= i2c-velleman.o
 obj-$(CONFIG_I2C_ALGOPCF)	+= i2c-algo-pcf.o
 obj-$(CONFIG_I2C_KEYWEST)	+= i2c-keywest.o
 obj-$(CONFIG_ITE_I2C_ALGO)	+= i2c-algo-ite.o
drivers/i2c/busses/Kconfig +10 -0
diff -Nru a/drivers/i2c/busses/Kconfig b/drivers/i2c/busses/Kconfig
@@ -203,6 +203,16 @@
 	  This driver can also be built as a module.  If so, the module
 	  will be called i2c-sis96x.
 
+config I2C_VELLEMAN
+	tristate "Velleman K9000 adapter"
+	depends on I2C_ALGOBIT && ISA
+	help
+	  This supports the Velleman K9000 parallel-port I2C adapter.  Say Y
+	  if you own such an adapter.
+
+	  This support is also available as a module.  If so, the module 
+	  will be called i2c-velleman.
+
 config I2C_VIA
 	tristate "VIA 82C58B"
 	depends on I2C_ALGOBIT && PCI && EXPERIMENTAL
drivers/i2c/busses/Makefile +1 -0
diff -Nru a/drivers/i2c/busses/Makefile b/drivers/i2c/busses/Makefile
@@ -19,6 +19,7 @@
 obj-$(CONFIG_I2C_SIS5595)	+= i2c-sis5595.o
 obj-$(CONFIG_I2C_SIS630)	+= i2c-sis630.o
 obj-$(CONFIG_I2C_SIS96X)	+= i2c-sis96x.o
+obj-$(CONFIG_I2C_VELLEMAN)	+= i2c-velleman.o
 obj-$(CONFIG_I2C_VIA)		+= i2c-via.o
 obj-$(CONFIG_I2C_VIAPRO)	+= i2c-viapro.o
 obj-$(CONFIG_I2C_VOODOO3)	+= i2c-voodoo3.o
drivers/i2c/busses/i2c-velleman.c new file +160 -0

160 lines not on this page · raw message

drivers/i2c/i2c-velleman.c deleted +0 -161

161 lines not on this page · raw message

author
#38 lore raw

ChangeSet 1.1315.1.23, 2003/09/22 14:21:09-07:00, [email protected]

[PATCH] I2C: move the scx200* drivers to drivers/i2c/busses

 drivers/i2c/scx200_acb.c        |  553 ----------------------------------------
 drivers/i2c/scx200_i2c.c        |  133 ---------
 drivers/i2c/Kconfig             |   38 --
 drivers/i2c/Makefile            |    2 
 drivers/i2c/busses/Kconfig      |   38 ++
 drivers/i2c/busses/Makefile     |    2 
 drivers/i2c/busses/scx200_acb.c |  553 ++++++++++++++++++++++++++++++++++++++++
 drivers/i2c/busses/scx200_i2c.c |  132 +++++++++
 8 files changed, 725 insertions(+), 726 deletions(-)
drivers/i2c/Kconfig +0 -38
diff -Nru a/drivers/i2c/Kconfig b/drivers/i2c/Kconfig
@@ -48,44 +48,6 @@
 	  This support is also available as a module.  If so, the module 
 	  will be called i2c-algo-bit.
 
-config SCx200_I2C
-	tristate "NatSemi SCx200 I2C using GPIO pins"
-	depends on SCx200 && I2C_ALGOBIT
-	help
-	  Enable the use of two GPIO pins of a SCx200 processor as an I2C bus.
-
-	  If you don't know what to do here, say N.
-
-	  This support is also available as a module.  If so, the module 
-	  will be called scx200_i2c.
-
-config SCx200_I2C_SCL
-	int "GPIO pin used for SCL"
-	depends on SCx200_I2C
-	default "12"
-	help
-	  Enter the GPIO pin number used for the SCL signal.  This value can
-	  also be specified with a module parameter.
-
-config SCx200_I2C_SDA
-	int "GPIO pin used for SDA"
-	depends on SCx200_I2C
-	default "13"
-	help
-	  Enter the GPIO pin number used for the SSA signal.  This value can
-	  also be specified with a module parameter.
-
-config SCx200_ACB
-	tristate "NatSemi SCx200 ACCESS.bus"
-	depends on I2C_ALGOBIT!=n && I2C
-	help
-	  Enable the use of the ACCESS.bus controllers of a SCx200 processor.
-
-	  If you don't know what to do here, say N.
-
-	  This support is also available as a module.  If so, the module 
-	  will be called scx200_acb.
-
 config I2C_ALGOPCF
 	tristate "I2C PCF 8584 interfaces"
 	depends on I2C
drivers/i2c/Makefile +0 -2
diff -Nru a/drivers/i2c/Makefile b/drivers/i2c/Makefile
@@ -9,8 +9,6 @@
 obj-$(CONFIG_I2C_KEYWEST)	+= i2c-keywest.o
 obj-$(CONFIG_ITE_I2C_ALGO)	+= i2c-algo-ite.o
 obj-$(CONFIG_ITE_I2C_ADAP)	+= i2c-adap-ite.o
-obj-$(CONFIG_SCx200_I2C)	+= scx200_i2c.o
-obj-$(CONFIG_SCx200_ACB)	+= scx200_acb.o
 obj-$(CONFIG_I2C_IBM_IIC)	+= i2c-ibm_iic.o
 obj-$(CONFIG_I2C_SENSOR)	+= i2c-sensor.o
 obj-$(CONFIG_I2C_IOP3XX)	+= i2c-iop3xx.o
drivers/i2c/busses/Kconfig +38 -0
diff -Nru a/drivers/i2c/busses/Kconfig b/drivers/i2c/busses/Kconfig
@@ -166,6 +166,44 @@
 	  This driver can also be built as a module.  If so, the module
 	  will be called i2c-savage4.
 
+config SCx200_I2C
+	tristate "NatSemi SCx200 I2C using GPIO pins"
+	depends on SCx200 && I2C_ALGOBIT
+	help
+	  Enable the use of two GPIO pins of a SCx200 processor as an I2C bus.
+
+	  If you don't know what to do here, say N.
+
+	  This support is also available as a module.  If so, the module 
+	  will be called scx200_i2c.
+
+config SCx200_I2C_SCL
+	int "GPIO pin used for SCL"
+	depends on SCx200_I2C
+	default "12"
+	help
+	  Enter the GPIO pin number used for the SCL signal.  This value can
+	  also be specified with a module parameter.
+
+config SCx200_I2C_SDA
+	int "GPIO pin used for SDA"
+	depends on SCx200_I2C
+	default "13"
+	help
+	  Enter the GPIO pin number used for the SSA signal.  This value can
+	  also be specified with a module parameter.
+
+config SCx200_ACB
+	tristate "NatSemi SCx200 ACCESS.bus"
+	depends on I2C_ALGOBIT!=n && I2C
+	help
+	  Enable the use of the ACCESS.bus controllers of a SCx200 processor.
+
+	  If you don't know what to do here, say N.
+
+	  This support is also available as a module.  If so, the module 
+	  will be called scx200_acb.
+
 config I2C_SIS5595
 	tristate "SiS 5595"
 	depends on I2C && PCI && EXPERIMENTAL
drivers/i2c/busses/Makefile +2 -0
diff -Nru a/drivers/i2c/busses/Makefile b/drivers/i2c/busses/Makefile
@@ -23,3 +23,5 @@
 obj-$(CONFIG_I2C_VIA)		+= i2c-via.o
 obj-$(CONFIG_I2C_VIAPRO)	+= i2c-viapro.o
 obj-$(CONFIG_I2C_VOODOO3)	+= i2c-voodoo3.o
+obj-$(CONFIG_SCx200_I2C)	+= scx200_i2c.o
+obj-$(CONFIG_SCx200_ACB)	+= scx200_acb.o
drivers/i2c/busses/scx200_acb.c new file +553 -0

553 lines not on this page · raw message

drivers/i2c/busses/scx200_i2c.c new file +132 -0

132 lines not on this page · raw message

drivers/i2c/scx200_acb.c deleted +0 -553

553 lines not on this page · raw message

drivers/i2c/scx200_i2c.c deleted +0 -133

133 lines not on this page · raw message