We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent e270cec commit 9f0eca0Copy full SHA for 9f0eca0
drivers/i2c/busses/i2c-bcm2708.c
@@ -67,10 +67,9 @@
67
#define BSC_S_DONE 0x00000002
68
#define BSC_S_TA 0x00000001
69
70
-#define I2C_TIMEOUT_MS 150
71
-#define I2C_WAIT_LOOP_COUNT 40
+#define I2C_WAIT_LOOP_COUNT 200
72
73
-#define DRV_NAME "bcm2708_i2c"
+#define DRV_NAME "bcm2708_i2c"
74
75
static unsigned int baudrate = CONFIG_I2C_BCM2708_BAUDRATE;
76
module_param(baudrate, uint, S_IRUSR | S_IWUSR | S_IRGRP | S_IWGRP);
@@ -305,7 +304,7 @@ static int bcm2708_i2c_master_xfer(struct i2c_adapter *adap,
305
304
goto error_timeout;
306
}
307
308
- ret = wait_for_completion_timeout(&bi->done, msecs_to_jiffies(I2C_TIMEOUT_MS));
+ ret = wait_for_completion_timeout(&bi->done, adap->timeout);
309
if (ret == 0) {
310
dev_err(&adap->dev, "transfer timed out\n");
311
0 commit comments