[U-Boot] [PATCH V2] cmd_i2c: Provide option for bulk 'i2c write' in one transaction
Simon Glass
sjg at chromium.org
Wed Nov 26 20:43:09 CET 2014
+Heiko
Hi,
On 26 November 2014 at 12:37, Lubomir Popov <lpopov at mm-sol.com> wrote:
> Hi Simon,
>
> [snip]
>
>>> + while (length-- > 0) {
>>> + if (i2c_write(chip, devaddr++, alen, memaddr++, 1) != 0)
>>> + return i2c_report_err(-1, I2C_ERR_WRITE);
>>> /*
>>> * No write delay with FRAM devices.
>>> */
>
>>Should this be indented?
>
>>> #if !defined(CONFIG_SYS_I2C_FRAM)
>>> - udelay(11000);
>>> + udelay(11000);
>>> #endif
>>> + }
>
> [snip]
>
> Which indent do you mean? The udelay() is within the while loop, so it should. The
> comment above your note - I kept it as is, aligned with the #if/#endif.
It was hard to tell in my emailed, but yes i see, you have kept it
where it was, which is fine.
I added Heiko (I2C maintainer) to cc. As mentioned, but in more
detail, with driver model 'i2c flags 2' will select this behaviour for
any i2c access, not just for this command. See u-boot-dm/i2c-working2
file i2c-uclass.c.
Regards,
Simon
More information about the U-Boot
mailing list