mirror of
https://github.com/Telecominfraproject/OpenCellular.git
synced 2026-01-03 21:49:32 +00:00
lm4: decrease i2c timeout
The i2c timeout on lm4 is currently 1 second, which is very long. This changes it to 100ms. Note, the biggest transfer we might every do is probably ~256 bytes to do a flash program using a host command over i2c. And the slowest bus speed is ~100kHz. So, worst case, the transaction shouldn't be more than about 25ms. Decreasing the timeout is useful when peripherals are not plugged in. For example, the ALS is sampled in the hooks task every second. We don't want the ALS sampling to be delayed for a second because it will throw off all of our other hooks. BUG=chrome-os-partner:29003 BRANCH=none TEST=ran on a samus and tested i2c commands to various peripherals Change-Id: I5e1b6d0f8b100cbcb6cd9209c6198e31d99bb085 Signed-off-by: Alec Berg <alecaberg@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/202515 Reviewed-by: Bill Richardson <wfrichar@chromium.org> Reviewed-by: Vincent Palatin <vpalatin@chromium.org> Reviewed-by: Randall Spangler <rspangler@chromium.org>
This commit is contained in:
committed by
chrome-internal-fetch
parent
46e9d7b468
commit
eac695e983
@@ -48,7 +48,7 @@
|
||||
#define I2C_IDLE_US 500
|
||||
|
||||
/* Maximum time we allow for an I2C transfer */
|
||||
#define I2C_TIMEOUT_US SECOND
|
||||
#define I2C_TIMEOUT_US (100*MSEC)
|
||||
|
||||
/* IRQ for each port */
|
||||
static const uint32_t i2c_irqs[] = {LM4_IRQ_I2C0, LM4_IRQ_I2C1, LM4_IRQ_I2C2,
|
||||
|
||||
Reference in New Issue
Block a user