HomeFreeBSD

twsi: make data receiving code safer

Description

twsi: make data receiving code safer

Assert that we are not receiving data beyond the requested length.
Assert that we have not NACK-ed incoming data prematurely.
Abort the current transfer if the incoming data is NACK-ed or not
NACK-ed unexpectedly.

Add debug logging of received data to complement logging of sent data.

(cherry picked from commit 00c07d9559c6197957b00811a0b29876a5c8b573)

Details

Provenance
avgAuthored on Nov 26 2021, 8:34 AM
Parents
rG0b7df7aa093d: twsi: remove redundant write of control register
Branches
Unknown
Tags
Unknown