|
@@ -183,8 +183,21 @@
|
|
|
|
|
|
#define EM28XX_INTERLACED_DEFAULT 1
|
|
|
|
|
|
-/* time in msecs to wait for i2c writes to finish */
|
|
|
-#define EM2800_I2C_XFER_TIMEOUT 20
|
|
|
+/*
|
|
|
+ * Time in msecs to wait for i2c xfers to finish.
|
|
|
+ * 35ms is the maximum time a SMBUS device could wait when
|
|
|
+ * clock stretching is used. As the transfer itself will take
|
|
|
+ * some time to happen, set it to 35 ms.
|
|
|
+ *
|
|
|
+ * Ok, I2C doesn't specify any limit. So, eventually, we may need
|
|
|
+ * to increase this timeout.
|
|
|
+ *
|
|
|
+ * FIXME: this assumes that an I2C message is not longer than 1ms.
|
|
|
+ * This is actually dependent on the I2C bus speed, although most
|
|
|
+ * devices use a 100kHz clock. So, this assumtion is true most of
|
|
|
+ * the time.
|
|
|
+ */
|
|
|
+#define EM28XX_I2C_XFER_TIMEOUT 36
|
|
|
|
|
|
/* time in msecs to wait for AC97 xfers to finish */
|
|
|
#define EM28XX_AC97_XFER_TIMEOUT 100
|