i2c-au1550: properly terminate zero-byte transfers
authorManuel Lauss <mano@roarinelk.homelinux.net>
Sun, 27 Jan 2008 17:14:52 +0000 (18:14 +0100)
committerJean Delvare <khali@hyperion.delvare>
Sun, 27 Jan 2008 17:14:52 +0000 (18:14 +0100)
commit91f27958d686da713c3b0a1dc205288898e44124
treeb59d826d3972f8cc58e587b437e4993bfe7da2b8
parent4bd28ebda2d48f16c1f16ff936a6927a4ef2194d
i2c-au1550: properly terminate zero-byte transfers

Zero-bytes transfers would leave the bus transaction unfinished
(no i2c stop is sent), with the following transfer actually
sending the slave address to the previously addressed device,
resulting in weird device failures (e.g. reset minute register
values in my RTC).
This patch instructs the controller to send an I2C STOP right after
the slave address in case of a zero-byte transfer.

Signed-off-by: Manuel Lauss <mano@roarinelk.homelinux.net>
Signed-off-by: Jean Delvare <khali@linux-fr.org>
drivers/i2c/busses/i2c-au1550.c