]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
twsi: Fix for > Allwinner A20
authormanu <manu@FreeBSD.org>
Wed, 8 Jul 2020 19:14:44 +0000 (19:14 +0000)
committermanu <manu@FreeBSD.org>
Wed, 8 Jul 2020 19:14:44 +0000 (19:14 +0000)
commita23cee9f49f4596a595feb021eb759785bd92f72
tree3f38e7dc0a288d129ca50538a3a848bfd13faf83
parentd26241a22688f9b027a5c6e8b435ad2973029568
twsi: Fix for > Allwinner A20

Every revision of twsi after the A20 have a bug where we need to
write again the control register after each interrupts. We also need
to add some delay before writing to this register, a simple read of the
same register does the job so do that.
Also fix the case when we have finish sending all the bytes, it only worked
for 1 byte transfer (the same kind that we do for talking to the PMIC on A20
boards).
While here add more debug messages and rework some of them.

This was tested by talking to a AT23C32 eeprom and a DS3231 RTC from an
H3 and A20 board.

PR: 247576
Reported by: Manuel Stühn (freebsd@justmail.de)
MFC after: 1 week
sys/dev/iicbus/twsi/twsi.c