i2c: sh_i2c.c: check error in i2c_read and i2c_write
authorTetsuyuki Kobayashi <koba@kmckk.co.jp>
Thu, 13 Sep 2012 19:08:01 +0000 (19:08 +0000)
committerHeiko Schocher <hs@denx.de>
Tue, 16 Oct 2012 03:47:20 +0000 (05:47 +0200)
commit0e5fb33cf7fa7352e9ecf88a834dd5e178f0e80f
treec674291f208cfd65e58d627c2e1cad0182942d48
parentd042d7121b13d98bd403e7b64438ce55cfefd0d9
i2c: sh_i2c.c: check error in i2c_read and i2c_write

Before this patch, i2c_{read,write} always returned 0.
Check TACK in i2c_raw_{read,write} so that i2c_{read,write} return non-zero when error.

Acked-by: Nobuhiro Iwamatsu <nobuhiro.iwamatsu.yj@renesas.com>
Signed-off-by: Tetsuyuki Kobayashi <koba@kmckk.co.jp>
drivers/i2c/sh_i2c.c