Hi Marek, > >> for (tries = 50; tries; --tries) { > >> - if (readl(i2c->regs + S3C2410_IICCON) > >> - & S3C2410_IICCON_IRQPEND) { > >> + unsigned long tmp = readl(i2c->regs + S3C2410_IICCON); > >> + > >> + if (!(tmp & S3C2410_IICCON_ACKEN)) { > >> + usleep_range(100, 200); > > Trivial question, but is there any hardware specification related to sleeping for 100-200 microseconds? If any then it would be nice to use const variable instead and add some description about why sleeping here is needed. > > > Well, this is a bit magic value I got from my experiments. There is some > delay needed there to let hardware to clear that bit and the values I > proposed worked. If You don't like that, I can reuse the delay value > that is already present in that loop: usleep_range(1000, 2000). I also wanted to comment on this... please, then, add a comment saying how you got to this range. Andi