Hi,

while writing a driver for a cardbus card which is supposed to use the
bit-banging algorithm I noticed that communication with the I2C slave
(Philips TDA10046) would fail without this patch. It forces SDA to high
for every bit in i2c_inb() instead of once per byte. Can this patch go
into the mainline kernel or will this break other drivers? I am using
Kernel version 2.6.10.

Signed-off-by: Andreas Oberritter <[EMAIL PROTECTED]>

--- linux-2.6/drivers/i2c/algos/i2c-algo-bit.c.orig     2005-02-27 
04:39:33.663444536 +0100
+++ linux-2.6/drivers/i2c/algos/i2c-algo-bit.c  2005-02-27 04:39:54.978204200 
+0100
@@ -197,8 +197,8 @@ static int i2c_inb(struct i2c_adapter *i
        struct i2c_algo_bit_data *adap = i2c_adap->algo_data;
 
        /* assert: scl is low */
-       sdahi(adap);
        for (i=0;i<8;i++) {
+               sdahi(adap);
                if (sclhi(adap)<0) { /* timeout */
                        DEB2(printk(KERN_DEBUG " i2c_inb: timeout at bit 
#%d\n", 7-i));
                        return -ETIMEDOUT;
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Reply via email to