mirror of
https://github.com/Telecominfraproject/OpenCellular.git
synced 2026-01-15 00:56:22 +00:00
If the I2C port is completely broken then there is no point in trying to continue with the transaction. This can happen if the pull-ups on the bus are not working because they are in a power domain which is not currently enabled. Check the return value from i2c_unwedge() and return if it doesn't work. Tidy up a few comments at the same time. BUG=b:72129419 BRANCH=none TEST=manually remove the check AP being off in sb_tsi_get_val() and see that it quickly fails now, rather than hanging the EC for a while trying the transaction. Change-Id: I66ab52943459726537dfc74355f8aeaa5817dba5 Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/956017 Reviewed-by: Edward Hill <ecgh@chromium.org> Reviewed-by: Aaron Durbin <adurbin@google.com>