HomeFreeBSD

twsi: unify error handling, explicitly handle more conditions

Description

twsi: unify error handling, explicitly handle more conditions

twsi_error() is a new function that stops the current transfer and sets
up softc when an error condition is detected.
TWSI_STATUS_DATA_WR_NACK, TWSI_STATUS_BUS_ERROR and
TWSI_STATUS_ARBITRATION_LOST are now handled explicitly rather than
via the catch-all unknown status.

Also, twsi_intr() now calls wakeup() in a single place when the
transfer is finished.

(cherry picked from commit a4fe8922085dfc1e5e6a6bac73ccc738e373165f)

Details

Provenance
avgAuthored on Nov 26 2021, 7:44 AM
Parents
rG035813ba1554: twsi: improve a handful of debug messages
Branches
Unknown
Tags
Unknown