mirror of
https://github.com/Telecominfraproject/OpenCellular.git
synced 2026-01-09 17:11:42 +00:00
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>
This commit is contained in:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user