]> git.kernelconcepts.de Git - karo-tx-uboot.git/commitdiff
i2c: s3c24x0: reduce transmission status timeout
authorPrzemyslaw Marczak <p.marczak@samsung.com>
Tue, 27 Jan 2015 12:36:35 +0000 (13:36 +0100)
committerLothar Waßmann <LW@KARO-electronics.de>
Tue, 1 Sep 2015 11:50:44 +0000 (13:50 +0200)
If no device is connected to I2C bus, the i2c probe command
can take a lot of time for probe each address. This commit
reduces the busy timeout to 10ms for standard and high speed
modes. This doesn't break the transmission an also allow for
properly probe the devices.

Signed-off-by: Przemyslaw Marczak <p.marczak@samsung.com>
Changes v3:
- new commit, after split the next one
Tested-by: Simon Glass <sjg@chromium.org>
drivers/i2c/s3c24x0_i2c.c

index 0dd1abcf80fcfe0e87fdb09323907244b3033e15..b4ee33f7daccf52a4dfced6a52dbcbc61f02f93b 100644 (file)
 #define I2C_START_STOP 0x20    /* START / STOP */
 #define I2C_TXRX_ENA   0x10    /* I2C Tx/Rx enable */
 
-#define I2C_TIMEOUT_MS 1000            /* 1 second */
+#define I2C_TIMEOUT_MS 10              /* 10 ms */
 
-#define        HSI2C_TIMEOUT_US 100000 /* 100 ms, finer granularity */
+#define        HSI2C_TIMEOUT_US 10000 /* 10 ms, finer granularity */
 
 
 /* To support VCMA9 boards and other who dont define max_i2c_num */