diff options
author | Oliver Endriss <o.endriss@gmx.de> | 2006-10-27 18:02:01 -0300 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@infradead.org> | 2006-11-02 23:58:11 -0300 |
commit | 9bb6e2593ad4cb94944f547154baee64b4734598 (patch) | |
tree | a53a2c6b074c92752eef2ebab0ff3aa91e6c78c8 /drivers/media/common/saa7146_i2c.c | |
parent | 588f98312c7fd1d86290583189d2eb24da70f752 (diff) | |
download | kernel_samsung_tuna-9bb6e2593ad4cb94944f547154baee64b4734598.zip kernel_samsung_tuna-9bb6e2593ad4cb94944f547154baee64b4734598.tar.gz kernel_samsung_tuna-9bb6e2593ad4cb94944f547154baee64b4734598.tar.bz2 |
V4L/DVB (4784): [saa7146_i2c] short_delay mode fixed for fast machines
TT DVB-C 2300 runs at 137 kHz I2C speed. short_delay mode did not work
reliably on fast machines with that speed. Increased max loop count from
20 to 50. Moved dummy access out of the loop.
Signed-off-by: Oliver Endriss <o.endriss@gmx.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
Diffstat (limited to 'drivers/media/common/saa7146_i2c.c')
-rw-r--r-- | drivers/media/common/saa7146_i2c.c | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/drivers/media/common/saa7146_i2c.c b/drivers/media/common/saa7146_i2c.c index d9953f7..5297a36 100644 --- a/drivers/media/common/saa7146_i2c.c +++ b/drivers/media/common/saa7146_i2c.c @@ -217,11 +217,9 @@ static int saa7146_i2c_writeout(struct saa7146_dev *dev, u32* dword, int short_d } /* wait until we get a transfer done or error */ timeout = jiffies + HZ/100 + 1; /* 10ms */ + /* first read usually delivers bogus results... */ + saa7146_i2c_status(dev); while(1) { - /** - * first read usually delivers bogus results... - */ - saa7146_i2c_status(dev); status = saa7146_i2c_status(dev); if ((status & 0x3) != 1) break; @@ -232,10 +230,10 @@ static int saa7146_i2c_writeout(struct saa7146_dev *dev, u32* dword, int short_d DEB_I2C(("saa7146_i2c_writeout: timed out waiting for end of xfer\n")); return -EIO; } - if ((++trial < 20) && short_delay) + if (++trial < 50 && short_delay) udelay(10); else - msleep(1); + msleep(1); } } |