]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
twsi: Fix for > Allwinner A20
authorEmmanuel Vadot <manu@FreeBSD.org>
Wed, 8 Jul 2020 19:14:44 +0000 (19:14 +0000)
committerEmmanuel Vadot <manu@FreeBSD.org>
Wed, 8 Jul 2020 19:14:44 +0000 (19:14 +0000)
commite18c80bcb6be66b1e3b6f4676ed681143b53f876
tree3f38e7dc0a288d129ca50538a3a848bfd13faf83
parent537976d1909fd0b1626a8576e12bf2dcde7b4887
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