]> git.karo-electronics.de Git - linux-beck.git/commitdiff
[media] au0828: tune retry interval for i2c interaction
authorDevin Heitmueller <dheitmueller@kernellabs.com>
Tue, 7 Aug 2012 01:47:06 +0000 (22:47 -0300)
committerMauro Carvalho Chehab <mchehab@redhat.com>
Thu, 9 Aug 2012 23:41:03 +0000 (20:41 -0300)
Adjust the retry timeout and number of retries to speed up xc5000
firmware download.  With this change it goes from 4.2 seconds to 2.9.
The net time waited is pretty much the same, but we just poll more
often.

Tested at 250 KHz as well as 30 KHz.

Signed-off-by: Devin Heitmueller <dheitmueller@kernellabs.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
drivers/media/video/au0828/au0828-i2c.c

index d4545550e0dde25a196e4c533e1f20d9c80ae485..3bc76df5a47ac36f17bcf88ad5ec5f09ae26485a 100644 (file)
@@ -33,8 +33,8 @@ static int i2c_scan;
 module_param(i2c_scan, int, 0444);
 MODULE_PARM_DESC(i2c_scan, "scan i2c bus at insmod time");
 
-#define I2C_WAIT_DELAY 512
-#define I2C_WAIT_RETRY 64
+#define I2C_WAIT_DELAY 25
+#define I2C_WAIT_RETRY 1000
 
 static inline int i2c_slave_did_write_ack(struct i2c_adapter *i2c_adap)
 {