Re: [PATCH] i2c-bfin-twi: handle faulty slave devices better

From: Mike Frysinger
Date: Sun May 09 2010 - 14:24:25 EST


On Sun, May 9, 2010 at 07:34, Ben Dooks wrote:
> On Sun, May 09, 2010 at 07:04:47AM -0400, Mike Frysinger wrote:
>> From: Michael Hennerich <michael.hennerich@xxxxxxxxxx>
>>
>> Faulty slave devices might drive SDA low after a transfer finishes. ÂSo,
>> when this scenario is detected, have the master generate up to 8 extra
>> clocks until the SDA is properly released.
>>
>> Signed-off-by: Michael Hennerich <michael.hennerich@xxxxxxxxxx>
>> Signed-off-by: Mike Frysinger <vapier@xxxxxxxxxx>
>> ---
>> Note: this requires the existing Blackfin TWI patches already sent out
>
> hmm, it is late in the -rc series for anything other than critical
> bugfixes, will update series tomorrow.

this patch is fine for 2.6.35, but the rest of the series should have
been merged for like 2.6.33 ...

>> Âdrivers/i2c/busses/i2c-bfin-twi.c | Â 22 ++++++++++++++++++++++
>> Â1 files changed, 22 insertions(+), 0 deletions(-)
>>
>> diff --git a/drivers/i2c/busses/i2c-bfin-twi.c b/drivers/i2c/busses/i2c-bfin-twi.c
>> index fb26e5c..f9c05e1 100644
>> --- a/drivers/i2c/busses/i2c-bfin-twi.c
>> +++ b/drivers/i2c/busses/i2c-bfin-twi.c
>> @@ -20,6 +20,7 @@
>> Â#include <linux/completion.h>
>> Â#include <linux/interrupt.h>
>> Â#include <linux/platform_device.h>
>> +#include <linux/delay.h>
>>
>> Â#include <asm/blackfin.h>
>> Â#include <asm/portmux.h>
>> @@ -159,6 +160,27 @@ static void bfin_twi_handle_interrupt(struct bfin_twi_iface *iface,
>> Â Â Â Â Â Â Â if (mast_stat & BUFWRERR)
>> Â Â Â Â Â Â Â Â Â Â Â dev_dbg(&iface->adap.dev, "Buffer Write Error\n");
>>
>> + Â Â Â Â Â Â /* Faulty salve devices, may drive SDA low after a transfer
> spello: slave

ok, i'll resend in a bit
-mike
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/