Commit Graph

5 Commits

Author SHA1 Message Date
Zbigniew Bodek
58172d8cc0 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
2015-09-15 11:21:16 +00:00
Luiz Otavio O Souza
82a2ce4062 Fix a few cases of use of uninitialized variables. Found with -Wall.
MFC after:	1 week
2014-11-12 03:59:26 +00:00
Eitan Adler
3f028229d9 Fix warning when compiling with gcc46:
error: variable 'i2c' set but not used

Approved by:	dim, cperciva (mentor, blanket for pre-mentorship already-approved commits)
MFC after:	3 days
2012-01-20 01:38:44 +00:00
Dimitry Andric
928e797dc0 In usr.sbin/i2c/i2c.c, fix a few warnings about format strings not being
literals.

MFC after:	1 week
2011-12-17 20:12:17 +00:00
Rafal Jaworowski
477f656bb9 Introduce the I2C diagnostic utility. It let's discover and inspect slave
devices on the bus.

Reviewed by:	bms, stas
Obtained from:	Semihalf
2009-01-26 14:00:50 +00:00