Page MenuHomeFreeBSD

rk_i2c bug fix
ClosedPublic

Authored by br on Nov 8 2020, 1:26 PM.
Tags
None
Referenced Files
Unknown Object (File)
Jan 22 2024, 11:34 PM
Unknown Object (File)
Jan 21 2024, 9:01 PM
Unknown Object (File)
Jan 14 2024, 5:04 AM
Unknown Object (File)
Dec 24 2023, 1:17 PM
Unknown Object (File)
Dec 20 2023, 6:12 AM
Unknown Object (File)
Nov 11 2023, 1:45 PM
Unknown Object (File)
Sep 15 2023, 8:40 AM
Unknown Object (File)
Aug 17 2023, 9:02 PM
Subscribers

Details

Summary

o Support for transfers > 32 bytes
o Fix slave address setting

Diff Detail

Lint
Lint Skipped
Unit
Tests Skipped

Event Timeline

br requested review of this revision.Nov 8 2020, 1:26 PM
sys/arm64/rockchip/rk_i2c.c
535

Mhm, that should be | LSB I think.

sys/arm64/rockchip/rk_i2c.c
535

yes, but does not matter, since controller sets this bit internally depending on mode

sys/arm64/rockchip/rk_i2c.c
363

That will not work if the transfer is not for a multiple of 32.

sys/arm64/rockchip/rk_i2c.c
363

why?

sys/arm64/rockchip/rk_i2c.c
363

If I understand correctly if you try to do a transfer with a len of 48 bytes the first 32 bytes will be transmitted first (as it's the max length that this controller can support) but on the second transfer instead of setting TXCOUNT to 16 we will set it to 32 as you check sc->msg->len and not taking into account what have been transmitted already.

o Consider amount of bytes already transferred
o Add a small delay (not sure why it is needed, maybe another bug)

fix transfer_len for reading as well. I think eliminate a need of delay

sys/arm64/rockchip/rk_i2c.c
363

You are right, thanks!
I think driver works for me just fine now

This revision is now accepted and ready to land.May 26 2021, 7:11 AM