From mboxrd@z Thu Jan 1 00:00:00 1970 From: Mike Frysinger Subject: Re: [PATCH] i2c-bfin-twi: handle faulty slave devices better Date: Sun, 9 May 2010 14:23:58 -0400 Message-ID: References: <1273403087-3326-1-git-send-email-vapier@gentoo.org> <20100509113420.GB2589@trinity.fluff.org> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: QUOTED-PRINTABLE Return-path: In-Reply-To: <20100509113420.GB2589-SMNkleLxa3Z6Wcw2j4pizdi2O/JbrIOy@public.gmane.org> Sender: linux-i2c-owner-u79uwXL29TY76Z2rM5mHXA@public.gmane.org To: Ben Dooks Cc: linux-i2c-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, Andrew Morton , uclinux-dist-devel-ZG0+EudsQA8dtHy/vicBwGD2FQJk+8+b@public.gmane.org, Michael Hennerich List-Id: linux-i2c@vger.kernel.org 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 >> >> Faulty slave devices might drive SDA low after a transfer finishes. = =C2=A0So, >> when this scenario is detected, have the master generate up to 8 ext= ra >> clocks until the SDA is properly released. >> >> Signed-off-by: Michael Hennerich >> Signed-off-by: Mike Frysinger >> --- >> Note: this requires the existing Blackfin TWI patches already sent o= ut > > 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 ... >> =C2=A0drivers/i2c/busses/i2c-bfin-twi.c | =C2=A0 22 ++++++++++++++++= ++++++ >> =C2=A01 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 @@ >> =C2=A0#include >> =C2=A0#include >> =C2=A0#include >> +#include >> >> =C2=A0#include >> =C2=A0#include >> @@ -159,6 +160,27 @@ static void bfin_twi_handle_interrupt(struct bf= in_twi_iface *iface, >> =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 if (mast_stat & BUF= WRERR) >> =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0= =C2=A0 dev_dbg(&iface->adap.dev, "Buffer Write Error\n"); >> >> + =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 /* Faulty salve devices,= may drive SDA low after a transfer > spello: slave ok, i'll resend in a bit -mike