HomeFreeBSD

rk_i2c: keep sending bytes until all bytes are sent

Description

rk_i2c: keep sending bytes until all bytes are sent

Previously the code would decalre the transfer complete after sending
first 31 bytes (plus the slave address) of a larger I2C write transfer.

That was tested using a large write to an EEPROM with 32-byte write page
size and a 2-byte address type. Such a transaction needed to send 34
bytes, 2 bytes for an offset and 32 bytes of actual data.

(cherry picked from commit 7dc8a0e5dff4ad4c9c10442bef5228a91a98d5d6)

Details

Provenance
avgAuthored on Dec 15 2021, 8:51 AM
Parents
rGf8258670cab5: rk_i2c_transfer: fix off-by-one in check for last message
Branches
Unknown
Tags
Unknown