i2c: rk3x: fix 0 length write transfers
authorAlexandru M Stan <amstan@chromium.org>
Wed, 1 Oct 2014 17:40:41 +0000 (10:40 -0700)
committerWolfram Sang <wsa@the-dreams.de>
Fri, 3 Oct 2014 01:18:53 +0000 (03:18 +0200)
commitcf27020d2f253bac6457d6833b97141030f0122a
treec31e71866926e58330752eb3d11763c588db5414
parentfe82dcec644244676d55a1384c958d5f67979adb
i2c: rk3x: fix 0 length write transfers

i2cdetect -q was broken (everything was a false positive, and no transfers were
actually being sent over i2c). The way it works is by sending a 0 length write
request and checking for NACK. This patch fixes the 0 length writes and actually
sends them.

Reported-by: Doug Anderson <dianders@chromium.org>
Signed-off-by: Alexandru M Stan <amstan@chromium.org>
Tested-by: Doug Anderson <dianders@chromium.org>
Tested-by: Max Schwarz <max.schwarz@online.de>
Signed-off-by: Wolfram Sang <wsa@the-dreams.de>
Cc: stable@kernel.org
drivers/i2c/busses/i2c-rk3x.c