diff options
author | Devin Heitmueller <dheitmueller@kernellabs.com> | 2009-05-04 22:29:17 -0400 |
---|---|---|
committer | Devin Heitmueller <dheitmueller@kernellabs.com> | 2009-05-04 22:29:17 -0400 |
commit | c69585fadf77969b8eb7eee245fcb38f300227dd (patch) | |
tree | 134e01a2342d749334691160d5f84288c1ab8699 /linux/drivers/media | |
parent | 4cca9aa01782049817d8d9abf78e683e3c7dfd0e (diff) | |
download | mediapointer-dvb-s2-c69585fadf77969b8eb7eee245fcb38f300227dd.tar.gz mediapointer-dvb-s2-c69585fadf77969b8eb7eee245fcb38f300227dd.tar.bz2 |
xc5000: poll at 5ms interval for register write command completion
From: Devin Heitmueller <dheitmueller@kernellabs.com>
Instead of polling at 100ms intervals for register writes, poll at 5ms
intervals. This is consistent with the xc5000 specification, and improves
tuning time by up to 500 ms on devices that such as the au0828 which do not
properly implement i2c clock stretching (since the five register writes that
occur for a tuning request often do not complete immediately but do complete
far before 100ms has gone by).
The net amount of time we wait before timing out is unchanged (500ms).
Priority: normal
Signed-off-by: Devin Heitmueller <dheitmueller@kernellabs.com>
Diffstat (limited to 'linux/drivers/media')
-rw-r--r-- | linux/drivers/media/common/tuners/xc5000.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/linux/drivers/media/common/tuners/xc5000.c b/linux/drivers/media/common/tuners/xc5000.c index 8428e341a..c8c586b64 100644 --- a/linux/drivers/media/common/tuners/xc5000.c +++ b/linux/drivers/media/common/tuners/xc5000.c @@ -262,7 +262,7 @@ static int xc5000_TunerReset(struct dvb_frontend *fe) static int xc_write_reg(struct xc5000_priv *priv, u16 regAddr, u16 i2cData) { u8 buf[4]; - int WatchDogTimer = 5; + int WatchDogTimer = 100; int result; buf[0] = (regAddr >> 8) & 0xFF; @@ -284,7 +284,7 @@ static int xc_write_reg(struct xc5000_priv *priv, u16 regAddr, u16 i2cData) /* busy flag cleared */ break; } else { - xc_wait(100); /* wait 5 ms */ + xc_wait(5); /* wait 5 ms */ WatchDogTimer--; } } |