public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* I2C updates for 2.4.31-pre1
@ 2005-05-01 16:52 Jean Delvare
  2005-05-01 17:15 ` [PATCH 2.4] I2C updates for 2.4.31-pre1 (1/3) Jean Delvare
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Jean Delvare @ 2005-05-01 16:52 UTC (permalink / raw)
  To: Marcelo Tosatti; +Cc: LKML, LM Sensors

Hi Marcelo, hi all,

I have a number of I2C updates for 2.4.31-pre1 waiting. All are
backports from Linux 2.6 and are already present in i2c 2.9.1.

Individual patches follow, please apply.

Thanks,
-- 
Jean Delvare

^ permalink raw reply	[flat|nested] 4+ messages in thread

* [PATCH 2.4] I2C updates for 2.4.31-pre1 (1/3)
  2005-05-01 16:52 I2C updates for 2.4.31-pre1 Jean Delvare
@ 2005-05-01 17:15 ` Jean Delvare
  2005-05-01 17:50 ` [PATCH 2.4] I2C updates for 2.4.31-pre1 (2/3) Jean Delvare
  2005-05-01 18:03 ` [PATCH 2.4] I2C updates for 2.4.31-pre1 (3/3) Jean Delvare
  2 siblings, 0 replies; 4+ messages in thread
From: Jean Delvare @ 2005-05-01 17:15 UTC (permalink / raw)
  To: Marcelo Tosatti; +Cc: LKML, LM Sensors, Corey Minyard

Fix a typo in a comment in i2c.h. It was originally fixed by Corey
Minyard in Linux 2.6.

http://linux.bkbits.net:8080/linux-2.5/diffs/include/linux/i2c.h@1.48

--- linux-2.4.30-rc1/include/linux/i2c.h.orig	2005-03-19 13:16:55.000000000 +0100
+++ linux-2.4.30-rc1/include/linux/i2c.h	2005-03-19 13:17:40.000000000 +0100
@@ -193,7 +193,7 @@
 	char name[32];				/* textual description 	*/
 	unsigned int id;
 
-	/* If an adapter algorithm can't to I2C-level access, set master_xfer
+	/* If an adapter algorithm can't do I2C-level access, set master_xfer
 	   to NULL. If an adapter algorithm can do SMBus access, set 
 	   smbus_xfer. If set to NULL, the SMBus protocol is simulated
 	   using common I2C messages */


-- 
Jean Delvare

^ permalink raw reply	[flat|nested] 4+ messages in thread

* [PATCH 2.4] I2C updates for 2.4.31-pre1 (2/3)
  2005-05-01 16:52 I2C updates for 2.4.31-pre1 Jean Delvare
  2005-05-01 17:15 ` [PATCH 2.4] I2C updates for 2.4.31-pre1 (1/3) Jean Delvare
@ 2005-05-01 17:50 ` Jean Delvare
  2005-05-01 18:03 ` [PATCH 2.4] I2C updates for 2.4.31-pre1 (3/3) Jean Delvare
  2 siblings, 0 replies; 4+ messages in thread
From: Jean Delvare @ 2005-05-01 17:50 UTC (permalink / raw)
  To: Marcelo Tosatti; +Cc: LKML, LM Sensors, Corey Minyard

Fix I2C_FUNC_* defines in i2c.h. These defines lack surrounding
parentheses, which might cause unexpected results where used. These were
originally fixed by Corey Minyard in Linux 2.6.

http://marc.theaimsgroup.com/?l=linux-kernel&m=110928784629301
http://linux.bkbits.net:8080/linux-2.5/diffs/include/linux/i2c.h@1.48

--- linux-2.4.30-rc1/include/linux/i2c.h.orig	2005-03-19 13:17:40.000000000 +0100
+++ linux-2.4.30-rc1/include/linux/i2c.h	2005-03-19 13:22:52.000000000 +0100
@@ -390,23 +390,23 @@
 #define I2C_FUNC_SMBUS_READ_I2C_BLOCK	0x04000000 /* New I2C-like block */
 #define I2C_FUNC_SMBUS_WRITE_I2C_BLOCK	0x08000000 /* transfer */
 
-#define I2C_FUNC_SMBUS_BYTE I2C_FUNC_SMBUS_READ_BYTE | \
-                            I2C_FUNC_SMBUS_WRITE_BYTE
-#define I2C_FUNC_SMBUS_BYTE_DATA I2C_FUNC_SMBUS_READ_BYTE_DATA | \
-                                 I2C_FUNC_SMBUS_WRITE_BYTE_DATA
-#define I2C_FUNC_SMBUS_WORD_DATA I2C_FUNC_SMBUS_READ_WORD_DATA | \
-                                 I2C_FUNC_SMBUS_WRITE_WORD_DATA
-#define I2C_FUNC_SMBUS_BLOCK_DATA I2C_FUNC_SMBUS_READ_BLOCK_DATA | \
-                                  I2C_FUNC_SMBUS_WRITE_BLOCK_DATA
-#define I2C_FUNC_SMBUS_I2C_BLOCK I2C_FUNC_SMBUS_READ_I2C_BLOCK | \
-                                  I2C_FUNC_SMBUS_WRITE_I2C_BLOCK
-
-#define I2C_FUNC_SMBUS_EMUL I2C_FUNC_SMBUS_QUICK | \
-                            I2C_FUNC_SMBUS_BYTE | \
-                            I2C_FUNC_SMBUS_BYTE_DATA | \
-                            I2C_FUNC_SMBUS_WORD_DATA | \
-                            I2C_FUNC_SMBUS_PROC_CALL | \
-                            I2C_FUNC_SMBUS_WRITE_BLOCK_DATA
+#define I2C_FUNC_SMBUS_BYTE (I2C_FUNC_SMBUS_READ_BYTE | \
+                             I2C_FUNC_SMBUS_WRITE_BYTE)
+#define I2C_FUNC_SMBUS_BYTE_DATA (I2C_FUNC_SMBUS_READ_BYTE_DATA | \
+                                  I2C_FUNC_SMBUS_WRITE_BYTE_DATA)
+#define I2C_FUNC_SMBUS_WORD_DATA (I2C_FUNC_SMBUS_READ_WORD_DATA | \
+                                  I2C_FUNC_SMBUS_WRITE_WORD_DATA)
+#define I2C_FUNC_SMBUS_BLOCK_DATA (I2C_FUNC_SMBUS_READ_BLOCK_DATA | \
+                                   I2C_FUNC_SMBUS_WRITE_BLOCK_DATA)
+#define I2C_FUNC_SMBUS_I2C_BLOCK (I2C_FUNC_SMBUS_READ_I2C_BLOCK | \
+                                  I2C_FUNC_SMBUS_WRITE_I2C_BLOCK)
+
+#define I2C_FUNC_SMBUS_EMUL (I2C_FUNC_SMBUS_QUICK | \
+                             I2C_FUNC_SMBUS_BYTE | \
+                             I2C_FUNC_SMBUS_BYTE_DATA | \
+                             I2C_FUNC_SMBUS_WORD_DATA | \
+                             I2C_FUNC_SMBUS_PROC_CALL | \
+                             I2C_FUNC_SMBUS_WRITE_BLOCK_DATA)
 
 /* 
  * Data for SMBus Messages 


-- 
Jean Delvare

^ permalink raw reply	[flat|nested] 4+ messages in thread

* [PATCH 2.4] I2C updates for 2.4.31-pre1 (3/3)
  2005-05-01 16:52 I2C updates for 2.4.31-pre1 Jean Delvare
  2005-05-01 17:15 ` [PATCH 2.4] I2C updates for 2.4.31-pre1 (1/3) Jean Delvare
  2005-05-01 17:50 ` [PATCH 2.4] I2C updates for 2.4.31-pre1 (2/3) Jean Delvare
@ 2005-05-01 18:03 ` Jean Delvare
  2 siblings, 0 replies; 4+ messages in thread
From: Jean Delvare @ 2005-05-01 18:03 UTC (permalink / raw)
  To: Marcelo Tosatti; +Cc: LKML, LM Sensors

Fix an iteration bug in the handling of i2c client module parameters.
The "force" module parameter is a list of adapter, address pairs, not
triplets. The current code would only handle the first, fourth, seventh
etc. pairs properly. I guess that nobody ever needed more than one pair,
or the bug would have been noticed way earlier. This bug was originally
fixed by myself in Linux 2.6.

http://marc.theaimsgroup.com/?l=linux-kernel&m=111231616107325
http://linux.bkbits.net:8080/linux-2.5/diffs/drivers/i2c/i2c-core.c@1.66

--- linux-2.4.30-rc1/drivers/i2c/i2c-core.c.orig	2005-03-10 19:57:34.000000000 +0100
+++ linux-2.4.30-rc1/drivers/i2c/i2c-core.c	2005-03-27 19:09:46.000000000 +0200
@@ -851,7 +851,7 @@
 		   at all */
 		found = 0;
 
-		for (i = 0; !found && (address_data->force[i] != I2C_CLIENT_END); i += 3) {
+		for (i = 0; !found && (address_data->force[i] != I2C_CLIENT_END); i += 2) {
 			if (((adap_id == address_data->force[i]) || 
 			     (address_data->force[i] == ANY_I2C_BUS)) &&
 			     (addr == address_data->force[i+1])) {


-- 
Jean Delvare

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2005-05-01 18:02 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-05-01 16:52 I2C updates for 2.4.31-pre1 Jean Delvare
2005-05-01 17:15 ` [PATCH 2.4] I2C updates for 2.4.31-pre1 (1/3) Jean Delvare
2005-05-01 17:50 ` [PATCH 2.4] I2C updates for 2.4.31-pre1 (2/3) Jean Delvare
2005-05-01 18:03 ` [PATCH 2.4] I2C updates for 2.4.31-pre1 (3/3) Jean Delvare

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox