[PATCH] misc: i2c_eeprom: consider pagesize when writing to eeprom

Tom Rini trini at konsulko.com
Wed Oct 25 01:15:43 CEST 2023


On Thu, Sep 21, 2023 at 12:29:45PM +0000, Michel Alex wrote:

> Calculate the maximum length of the buffer when writing
> accross the page boundary. If the buffer length exceeds
> the page boundary, split it. Use this length instead of
> comparing the length with the pagesize, because the write
> start address can be somewhere in the middle of a page.
> 
> Signed-off-by: Alex Michel <alex.michel at wiedemann-group.com>
> ---
>  drivers/misc/i2c_eeprom.c | 13 ++++++++++++-
>  1 file changed, 12 insertions(+), 1 deletion(-)

Please fix the checkpatch.pl errors with this patch, thanks.

-- 
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 659 bytes
Desc: not available
URL: <https://lists.denx.de/pipermail/u-boot/attachments/20231024/f6bdccb7/attachment.sig>


More information about the U-Boot mailing list