aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/media/common/tuners/xc5000.c
diff options
context:
space:
mode:
authorDevin Heitmueller <dheitmueller@kernellabs.com>2009-05-04 22:29:17 -0400
committerMauro Carvalho Chehab <mchehab@redhat.com>2009-06-16 17:21:07 -0400
commita37791c54066d268cb616233b699ebe275d3a888 (patch)
treecbc32b6d63415748eabb1ca4f92c4fae83be25fa /drivers/media/common/tuners/xc5000.c
parent6c99080d8eae64c51f8b44946eb47f995361c582 (diff)
V4L/DVB (11804): xc5000: poll at 5ms interval for register write command completion
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). Signed-off-by: Devin Heitmueller <dheitmueller@kernellabs.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'drivers/media/common/tuners/xc5000.c')
-rw-r--r--drivers/media/common/tuners/xc5000.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/media/common/tuners/xc5000.c b/drivers/media/common/tuners/xc5000.c
index cc829a0b6db7..d006b9772d3b 100644
--- a/drivers/media/common/tuners/xc5000.c
+++ b/drivers/media/common/tuners/xc5000.c
@@ -262,7 +262,7 @@ static int xc5000_TunerReset(struct dvb_frontend *fe)
262static int xc_write_reg(struct xc5000_priv *priv, u16 regAddr, u16 i2cData) 262static int xc_write_reg(struct xc5000_priv *priv, u16 regAddr, u16 i2cData)
263{ 263{
264 u8 buf[4]; 264 u8 buf[4];
265 int WatchDogTimer = 5; 265 int WatchDogTimer = 100;
266 int result; 266 int result;
267 267
268 buf[0] = (regAddr >> 8) & 0xFF; 268 buf[0] = (regAddr >> 8) & 0xFF;
@@ -284,7 +284,7 @@ static int xc_write_reg(struct xc5000_priv *priv, u16 regAddr, u16 i2cData)
284 /* busy flag cleared */ 284 /* busy flag cleared */
285 break; 285 break;
286 } else { 286 } else {
287 xc_wait(100); /* wait 5 ms */ 287 xc_wait(5); /* wait 5 ms */
288 WatchDogTimer--; 288 WatchDogTimer--;
289 } 289 }
290 } 290 }