i2c: generic recovery: check SCL before SDA
Move the check for a stuck SCL before the check for a high SDA. This prevent false positives in the specific case that SDA is fine and SCL is stuck, which previously returned 0. Also check SDA again after the loop, if we can. Together, these changes should lead to a lot more failed recoveries being caught and returning error codes. Signed-off-by: NClaudio Foellmi <claudio.foellmi@ergon.ch> Signed-off-by: NWolfram Sang <wsa@the-dreams.de>
Showing
想要评论请 注册 或 登录