summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDino Li <Dino.Li@ite.com.tw>2017-04-24 17:30:27 +0800
committerchrome-bot <chrome-bot@chromium.org>2017-04-25 01:45:43 -0700
commitb377e7bac030069cf0b38cbdcf7572c39f046188 (patch)
treecca580096cd51f8c52aecd6db005ef34fcc96731
parent5b4decd26a47f6ce9d21c67da31762d3a78ddb8c (diff)
downloadchrome-ec-b377e7bac030069cf0b38cbdcf7572c39f046188.tar.gz
it83xx: i2c: increase clock low timeout to maximum
This timeout is described in SMBus specification (25ms). Some I2C devices may required longer clock stretch (The I2C specification does not specify any timeout conditions for clock stretching). So we increase this timeout to maximum. NOTE: Because this codebase already handle timeout of an I2C transfer, so maybe we can disable this mechanism. But we don't have any register to execute this, so we maximize the timeout. BRANCH=none BUG=none TEST=console commands: i2cscan, battery, charger, and accelinfo. Change-Id: I5025f640c027105152247212fc688388f645c5ba Signed-off-by: Dino Li <Dino.Li@ite.com.tw> Reviewed-on: https://chromium-review.googlesource.com/485203 Reviewed-by: Randall Spangler <rspangler@chromium.org>
-rw-r--r--chip/it83xx/i2c.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/chip/it83xx/i2c.c b/chip/it83xx/i2c.c
index da45735cf1..146c38294c 100644
--- a/chip/it83xx/i2c.c
+++ b/chip/it83xx/i2c.c
@@ -22,7 +22,7 @@
* The count number of the counter for 25 ms register.
* The 25 ms register is calculated by (count number *1.024 kHz).
*/
-#define I2C_CLK_LOW_TIMEOUT 25 /* ~= 25ms */
+#define I2C_CLK_LOW_TIMEOUT 255 /* ~=249 ms */
/* Default maximum time we allow for an I2C transfer */
#define I2C_TIMEOUT_DEFAULT_US (100 * MSEC)