]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
Perform I2C transmission in a single burst when mode is "none" or not set
authorzbb <zbb@FreeBSD.org>
Tue, 15 Sep 2015 11:21:16 +0000 (11:21 +0000)
committerzbb <zbb@FreeBSD.org>
Tue, 15 Sep 2015 11:21:16 +0000 (11:21 +0000)
commit3eb40986b7f76c9070fa8ce35e7a585953729214
treebde93375d8312a8b285fbc4555fad38be9f4631f
parentb533e5b8f64b999e1b189d61730a757f21255b01
Perform I2C transmission in a single burst when mode is "none" or not set

Some more automated I2C controllers cannot explicitly create
START/STOP/etc. conditions on the bus.
Instead, the correct condition is set automatically according
to the pending transfer status.
This particular behavior can cause trouble if some I2C slave
requires sending address offset within the chip followed by
the actual data or command. In that case we cannot assume that
the driver will not STOP immediately after sending
offset.

To avoid that, do not split offset transfer from data transfer
for default transmission modes and do exactly that if requested
in command line (stop-start and repeated-start modes).
This more generic approach should cover special cases like
the one described.

Reviewed by:   imp
Submitted by:  Marcin Mazurek <mma@semihalf.com>
Obtained from: Semihalf
usr.sbin/i2c/i2c.c