Home
last modified time | relevance | path

Searched hist:d2c05e201f2ad287fd1bc68c9a94f3c23f63224a (Results 1 – 1 of 1) sorted by relevance

/freebsd/sys/arm/freescale/imx/
H A Dimx_i2c.cdiff d2c05e201f2ad287fd1bc68c9a94f3c23f63224a Sat Oct 10 00:28:56 CEST 2015 Ian Lepore <ian@FreeBSD.org> Mostly rewrite the imx i2c driver. This started out as an attempt to fix
one specific problem: the driver didn't check for ACK/NAK after writing a
slave address byte to the bus, and some slaves signal that they are busy
(such as when completing an internal write to flash memory) by sending a
NAK in response to being addressed.

While working on that problem I discovered that the driver's handling of
error conditions in general didn't match the state transition diagram in
the reference manual, and making that right resulted in a lot of code
reorganization.

Along the way various other changes also happened...

- Remove a mutex that wasn't protecting anything.
- Remove some mystery DELAY()s, document the few that remain.
- Use pause_sbt(9) to yield the processor for the bulk of the time it
takes to transfer each byte rather than busy-polling the whole time.
- Disable the controller when no transfers are in progress; since we
don't operate in slave mode, there's no reason to run the hardware.
- Remove a bunch of unecessary code from probe().