mirror of
https://github.com/Telecominfraproject/OpenCellular.git
synced 2026-01-10 17:41:54 +00:00
In rare case, if a bus error indicates a conflict on the data line (SDA) is detected during transmission of the byte. (i.e., SDA is toggling during holding data period.) and SDAST are set at the same time, the i2c driver is not good enough to handle it. Ec will get stuck in i2c ISR forever since SDAST util watchdog reset occurs. This CL includes: 1. Do a dummy read to make sure i2c slave doesn't hold i2c bus. It makes sure i2c master can generate STOP successfully. 2. Disable smb's interrupts in "A Bus Error has been identified". Once bus error occurred, it's better to forbid ec to enter ISR again. Let i2c_recovery() disable the module and reset hardware state machine to the default. BRANCH=none BUG=chrome-os-partner:59294 TEST=test i2c console commands on wheatley for hours. Change-Id: Iecadcd866e115e31b18dfd68359a018867cac40e Signed-off-by: Mulin Chao <mlchao@nuvoton.com> Reviewed-on: https://chromium-review.googlesource.com/428482 Reviewed-by: Shawn N <shawnn@chromium.org>