mirror of
https://github.com/Telecominfraproject/OpenCellular.git
synced 2026-01-02 13:14:51 +00:00
Must wait on I2C controller before checking status
We have to wait until the controller is no longer busy before we announce that we're done. Just waiting for the first interrupt isn't enough, because that's often just an error indicator and the controller still has to stop. BUG=none TEST=none Change-Id: I065c049111d7de276bf8f7cd0eed39c3f5cff5f4
This commit is contained in:
@@ -26,7 +26,7 @@ static int wait_idle(int port)
|
||||
int wait_msg;
|
||||
|
||||
i = LM4_I2C_MCS(port);
|
||||
if (i & 0x01) {
|
||||
while (i & 0x01) {
|
||||
/* Port is busy, so wait for the interrupt */
|
||||
task_waiting_on_port[port] = task_get_current();
|
||||
LM4_I2C_MIMR(port) = 0x03;
|
||||
|
||||
Reference in New Issue
Block a user