[U-Boot] [RFC/PATCH] cros_ec: i2c: Group i2c write / read into single transaction

Simon Glass sjg at chromium.org
Wed Feb 8 13:02:10 UTC 2017


On 12 January 2017 at 10:47, Moritz Fischer <moritz.fischer at ettus.com> wrote:
>
> 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 at ettus.com>
> Cc: Simon Glass <sjg at chromium.org>
> Cc: u-boot at lists.denx.de
> ---
> Hi Simon,
>
> since I don't have a v2 protocol EC I couldn't test this,
> but I noticed when playing around with a v3 one, that it would simply ignore
> the packets if they don't have a repeated start condition (which from my understanding)
> you can *only* get if you use struct i2c_msg, since otherwise the driver has no way of
> knowing your intention.
>
> Do you have a v2 board around to test this?
>
> Cheers,
>
> Moritz
> ---
>  drivers/misc/cros_ec_i2c.c | 26 +++++++++++++++-----------
>  1 file changed, 15 insertions(+), 11 deletions(-)

Acked-by: Simon Glass <sjg at chromium.org>
Tested on snow:
Tested-by: Simon Glass <sjg at chromium.org>


More information about the U-Boot mailing list