Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 5c64eb26 authored by Mathias Nyman's avatar Mathias Nyman Committed by Ben Dooks
Browse files

i2c-omap: Make sure i2c bus is free before setting it to idle



If the i2c bus receives an interrupt with both BB (bus busy) and
ARDY (register access ready) statuses set during the tranfer of the last message
the bus was put to idle while still busy.

This caused bus to timeout.

Signed-off-by: default avatarMathias Nyman <mathias.nyman@nokia.com>
Acked-by: default avatarTony Lindgren <tony@atomide.com>
Signed-off-by: default avatarBen Dooks <ben-linux@fluff.org>
parent 2422084a
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -680,6 +680,8 @@ omap_i2c_xfer(struct i2c_adapter *adap, struct i2c_msg msgs[], int num)

	if (r == 0)
		r = num;

	omap_i2c_wait_for_bb(dev);
out:
	omap_i2c_idle(dev);
	return r;