i2c: img-scb: support repeated starts on IP v3.3
authorSifan Naeem <sifan.naeem@imgtec.com>
Thu, 19 Nov 2015 09:35:17 +0000 (09:35 +0000)
committerWolfram Sang <wsa@the-dreams.de>
Sat, 2 Jan 2016 21:05:21 +0000 (22:05 +0100)
commitc20821a7f0a55377eccd88c89bd76a2cca22a1b4
tree5875ac7438196809303b3a7741270e7cb02ffdd0
parentc7b0a7c10752fa9a30f719848f4350fa02fdb8e5
i2c: img-scb: support repeated starts on IP v3.3

In version 3.3 of the IP when transaction halt is set, an interrupt
will be generated after each byte of a transfer instead of after
every transfer but before the stop bit.
Due to this behaviour we have to be careful that every time we
release the transaction halt we have to re-enable it straight away
so that we only process a single byte, not doing so will result in
all remaining bytes been processed and a stop bit being issued,
which will prevent us having a repeated start.

This change will have no effect on earlier versions of the IP.

Signed-off-by: Sifan Naeem <sifan.naeem@imgtec.com>
Acked-by: James Hogan <james.hogan@imgtec.com>
Reviewed-by: James Hartley <james.hartley@imgtec.com>
Signed-off-by: Wolfram Sang <wsa@the-dreams.de>
drivers/i2c/busses/i2c-img-scb.c