mirror of
https://github.com/Telecominfraproject/OpenCellular.git
synced 2025-12-28 02:35:28 +00:00
and when the bus seems wedged at i2c_init(). BUG=chrome-os-partner:19286 TEST=Manual test on peach pit. Tried the following wedged cases: (1) Bit bang a transaction but only read part of the response. (Refer to https://chromium-review.googlesource.com/#/c/66389) Command to wedge: i2cwedge 0x90 0 2 2 (2) Bit bang a transaction to do a "write" and stop while the other side is acking. (Refer to https://chromium-review.googlesource.com/#/c/66389) Command to wedge: i2cwedge 0x90 0 1 (3) Same as (1) but do a reboot instead of returning and see that the unwedge works at init time w/ no cancelled transactions. (Refer to https://chromium-review.googlesource.com/#/c/66389) Command to wedge: i2cwedge 0x90 0 6 2 (4) Same as (2) but do a reboot instead of returning and see that the unwedge works at init time w/ no cancelled transactions. (Refer to https://chromium-review.googlesource.com/#/c/66389) Command to wedge: i2cwedge 0x90 0 5 (5) Manually pull down on SCL. (Refer to https://chromium-review.googlesource.com/#/c/66063) All five cases successfully wedged the bus and were recovered by this change. BRANCH=pit [dianders: made sure we don't change SCL after SCL high, misc other bits] Change-Id: I23f16fcaa2a76ea37025f8204ab1cdb27e9ef6d1 Signed-off-by: Hung-ying Tyan <tyanh@chromium.org> Signed-off-by: Doug Anderson <dianders@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/66915