History log of /freebsd/usr.sbin/i2c/i2c.c (Results 1 – 25 of 52)
Revision (<<< Hide revision tags) (Show revision tags >>>) Date Author Comments
Revision tags: release/13.4.0, release/14.1.0
# 14980d69 23-May-2024 John F. Carr <jfc@mit.edu>

i2c: Don't print uninitialized data when verbose

i2c -sv or i2c -rv prints an uninitialized field i2c_opt.addr.
Suppress the verbose message entirely for scan and reset,
where it provides no informa

i2c: Don't print uninitialized data when verbose

i2c -sv or i2c -rv prints an uninitialized field i2c_opt.addr.
Suppress the verbose message entirely for scan and reset,
where it provides no information, and zero initialize the field.

See https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=279261

Reviewed by: imp
Pull Request: https://github.com/freebsd/freebsd-src/pull/1345

show more ...


Revision tags: release/13.3.0, release/14.0.0
# 1d386b48 16-Aug-2023 Warner Losh <imp@FreeBSD.org>

Remove $FreeBSD$: one-line .c pattern

Remove /^[\s*]*__FBSDID\("\$FreeBSD\$"\);?\s*\n/


# 4d846d26 10-May-2023 Warner Losh <imp@FreeBSD.org>

spdx: The BSD-2-Clause-FreeBSD identifier is obsolete, drop -FreeBSD

The SPDX folks have obsoleted the BSD-2-Clause-FreeBSD identifier. Catch
up to that fact and revert to their recommended match of

spdx: The BSD-2-Clause-FreeBSD identifier is obsolete, drop -FreeBSD

The SPDX folks have obsoleted the BSD-2-Clause-FreeBSD identifier. Catch
up to that fact and revert to their recommended match of BSD-2-Clause.

Discussed with: pfg
MFC After: 3 days
Sponsored by: Netflix

show more ...


Revision tags: release/13.2.0, release/12.4.0, release/13.1.0, release/12.3.0
# 67bceb38 07-Oct-2021 Martin Birgmeier <d8zNeCFG@aon.at>

i2c(8): fix option handling

Recognize the '-o' option when processing command line arguments.

Fixes: 9c10d00bf8cd ("i2c(8): Add interpreted mode for batch/scripted...")
PR: 258572


# 9c10d00b 19-May-2021 Poul-Henning Kamp <phk@FreeBSD.org>

i2c(8): Add interpreted mode for batch/scripted i2c operations


# e32b2bcf 19-May-2021 Poul-Henning Kamp <phk@FreeBSD.org>

i2c(8): Change default mode to "transfer", which should work everywhere¹

¹ According to @ian


# f4583eba 19-May-2021 Poul-Henning Kamp <phk@FreeBSD.org>

i2c(8): Polish: sort switches, dont confuse address & offset


# b23362af 13-May-2021 Poul-Henning Kamp <phk@FreeBSD.org>

Final pass of cleanup: Get rid of gotos and general polish.

NB: This changes the outputs, in particular in error conditions,
in various subtle ways to be more systematic and usable.


# 63c8d31e 13-May-2021 Poul-Henning Kamp <phk@FreeBSD.org>

Rewrite and simplify the -n argument processing.


# 7183d96e 13-May-2021 Poul-Henning Kamp <phk@FreeBSD.org>

Refactor argument processing.


# 29c6e6e2 12-May-2021 Poul-Henning Kamp <phk@FreeBSD.org>

More refactoring & polishing.

Do not call usage() without telling why.

Extract '-a' mode into a function, and sanitize hexdumping.

Revise manpage to match reality of code.


# 5ab41ff8 12-May-2021 Poul-Henning Kamp <phk@FreeBSD.org>

More refactoring:

Extract the '-a' mode into a separate function, and simplify the
hexdumping logic.

Dont call usage() without telling why.


# e06874f3 12-May-2021 Poul-Henning Kamp <phk@FreeBSD.org>

Centralize offset width handling, and make it possible to specify explicit endianess.


# 38a4732f 12-May-2021 Poul-Henning Kamp <phk@FreeBSD.org>

Centralize open/close of /dev/iic%d devices


# b2ae176d 12-May-2021 Poul-Henning Kamp <phk@FreeBSD.org>

Sixteen bit I2c addresses are always little endian.


# 9db7da1f 12-May-2021 Poul-Henning Kamp <phk@FreeBSD.org>

Polish source to WARNS=6


Revision tags: release/13.0.0, release/12.2.0, release/11.4.0
# 21697a7a 17-Nov-2019 Alex Richardson <arichardson@FreeBSD.org>

Fix error found by new clang operator precendence warning

error: operator '?:' has lower precedence than '|'; '|' will be evaluated first

I discovered this in CheriBSD after updating our fork of cl

Fix error found by new clang operator precendence warning

error: operator '?:' has lower precedence than '|'; '|' will be evaluated first

I discovered this in CheriBSD after updating our fork of clang to the latest
upstream master.

Reviewed By: ian
Differential Revision: https://reviews.freebsd.org/D22433

show more ...


Revision tags: release/12.1.0, release/11.3.0
# 0269ae4c 06-Jun-2019 Alan Somers <asomers@FreeBSD.org>

MFHead @348740

Sponsored by: The FreeBSD Foundation


# a3055557 22-May-2019 Ian Lepore <ian@FreeBSD.org>

Add a new 'tr' (transfer) mode to i2c(8) to support more i2c controllers.

Some i2c controller hardware does not provide a way to do individual START,
REPEAT-START and STOP actions on the i2c bus. I

Add a new 'tr' (transfer) mode to i2c(8) to support more i2c controllers.

Some i2c controller hardware does not provide a way to do individual START,
REPEAT-START and STOP actions on the i2c bus. Instead, they can only do
a complete transfer as a single operation. Typically they can do either
START-data-STOP or START-data-REPEATSTART-data-STOP. In the i2c driver
framework, this corresponds to the iicbus_transfer method. In the userland
interface they are initiated with the I2CRDWR ioctl command.

These changes add a new 'tr' mode which can be specified with the '-m'
command line option. This mode should work on all hardware; when an i2c
controller driver doesn't directly support the iicbus_transfer method,
code in the i2c driver framework uses the lower-level START/REPEAT/STOP
methods to implement the transfer. After this new mode has gotten some
testing on various hardware, the 'tr' mode should probably become the
new default mode.

PR: 189914

show more ...


Revision tags: release/12.0.0, release/11.2.0
# 1de7b4b8 27-Nov-2017 Pedro F. Giffuni <pfg@FreeBSD.org>

various: general adoption of SPDX licensing ID tags.

Mainly focus on files that use BSD 2-Clause license, however the tool I
was using misidentified many licenses so this was mostly a manual - error

various: general adoption of SPDX licensing ID tags.

Mainly focus on files that use BSD 2-Clause license, however the tool I
was using misidentified many licenses so this was mostly a manual - error
prone - task.

The Software Package Data Exchange (SPDX) group provides a specification
to make it easier for automated tools to detect and summarize well known
opensource licenses. We are gradually adopting the specification, noting
that the tags are considered only advisory and do not, in any way,
superceed or replace the license texts.

No functional change intended.

show more ...


# c2c014f2 07-Nov-2017 Hans Petter Selasky <hselasky@FreeBSD.org>

Merge ^/head r323559 through r325504.


# 0a8f81bc 22-Oct-2017 Enji Cooper <ngie@FreeBSD.org>

MFhead@r324837

While here, diff reduce some of the changes in sys/boot by moving
MK_COVERAGE=no to sys/boot/Makefile.inc .


# 668f9cbe 13-Oct-2017 Andriy Gapon <avg@FreeBSD.org>

i2c(8): clean up and clarify read operation

The code went to a lot of trouble to issue either a start+stop condition
or a repeated start condition only to follow it with a stop condition
and a read(

i2c(8): clean up and clarify read operation

The code went to a lot of trouble to issue either a start+stop condition
or a repeated start condition only to follow it with a stop condition
and a read(2) call that issues a new start condition.
So, fix the read in I2C_MODE_REPEATED_START mode by using I2CREAD ioctl
within the running transaction. This obviously requires that the slave
address has the read bit set which was not required before.

Another problem was with width parameter of zero and
I2C_MODE_REPEATED_START mode. In that case we issued a repeated start
without any preceding start.

While here, remove the redundant (unused) argument to I2CSTOP throughout
the program.
Also, clarify the meaning of -w option, especially "-w 0", in the manual
page.

Reviewed by: no one
Differential Revision: https://reviews.freebsd.org/D12331

show more ...


Revision tags: release/10.4.0
# 8fcbcc2d 16-Sep-2017 Enji Cooper <ngie@FreeBSD.org>

MFhead@r323635


# b754c279 13-Sep-2017 Navdeep Parhar <np@FreeBSD.org>

MFH @ r323558.


123