cros_ec: i2c: Group i2c write / read into single transaction
authorMoritz Fischer <moritz.fischer@ettus.com>
Thu, 12 Jan 2017 17:47:30 +0000 (09:47 -0800)
committerSimon Glass <sjg@chromium.org>
Wed, 8 Feb 2017 13:07:13 +0000 (06:07 -0700)
commite9b25f2ea1ef24a648f07feeb3604888bdca43e0
tree74fc5cc863b33283478d19f2299a223c5bfa365c
parent136026f18ed7bdfadc1af1696eced2b13af003d7
cros_ec: i2c: Group i2c write / read into single transaction

Replace dm_i2c_write() / dm_i2c_read() with transaction using
struct i2c_msg[2] in order to allow for i2c controller to detect
write/read cycle to emit a repeated start condition.

Signed-off-by: Moritz Fischer <moritz.fischer@ettus.com>
Cc: Simon Glass <sjg@chromium.org>
Cc: u-boot@lists.denx.de
Acked-by: Simon Glass <sjg@chromium.org>
Tested on snow:
Tested-by: Simon Glass <sjg@chromium.org>
drivers/misc/cros_ec_i2c.c