[i2c] [PATCH] [2.6.21] [v3] PA Semi SMBus driver
Olof Johansson
olof at lixom.net
Fri Feb 2 21:20:36 CET 2007
Hi,
On Fri, Feb 02, 2007 at 01:51:30PM +0100, Jean Delvare wrote:
> Olof,
>
> On Wed, 31 Jan 2007 00:35:00 -0600, Olof Johansson wrote:
> > Driver for PA Semi SMBus interface.
> >
> > Signed-off-by: Olof Johansson <olof at lixom.net>
>
> This one doesn't even compile :( Please fix it.
I must not have had the config option enabled when I built a kernel right before
posting it. Sigh.
> Your original code did up to 500 udelay(1), i.e. a max of 500 us busy
> waiting, which was acceptable. Now you do up to 5000 udelay(10), i.e. a
> max of 50 ms busy waiting, which I do not think is acceptable. Was it
> your intent to do that? If you really want to wait up to 50 ms then you
> want to do so sleeping and not busy waiting. For example up to 50
> msleep(1) would be acceptable.
Good point. Turned out that with debugging disabled, there's too little
actual delay in the spin loop for at least some devices. I've changed
it to be up to 10 msleep(1) instead. The devices I have here seem to all
respond within 1ms or so.
If this is too tight for other devices (since I haven't seen that many),
feel free to increase the max loop count before you apply the patch.
(Patch posted separately)
-Olof
More information about the i2c
mailing list