<feed xmlns='http://www.w3.org/2005/Atom'>
<title>src/sys/dev/iicbus/iic.h, branch main</title>
<subtitle>FreeBSD source tree</subtitle>
<link rel='alternate' type='text/html' href='http://cgit.freebsd.org/src/'/>
<entry>
<title>compat/linux: Add Linux i2c-dev ioctl compatibility support</title>
<updated>2026-04-13T12:31:47+00:00</updated>
<author>
<name>YAO, Xin</name>
<email>mr.yaoxin@outlook.com</email>
</author>
<published>2026-04-13T12:28:48+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.freebsd.org/src/commit/?id=26740e8f80da17c78bee6fa322e6bb1f2669be5c'/>
<id>26740e8f80da17c78bee6fa322e6bb1f2669be5c</id>
<content type='text'>
Implement Linux I2C ioctl translation in the Linux compatibility layer
and wire iicbus cdevs up for in-kernel rdwr handling.
Support common i2c-dev requests including SLAVE, FUNCS, and RDWR,
while rejecting unsupported 10-bit and SMBus operations.

Signed-off-by:	YAO, Xin &lt;mr.yaoxin@outlook.com&gt;
Reviewed by:	imp, adrian, pouria
Differential Revision: https://reviews.freebsd.org/D56251
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Implement Linux I2C ioctl translation in the Linux compatibility layer
and wire iicbus cdevs up for in-kernel rdwr handling.
Support common i2c-dev requests including SLAVE, FUNCS, and RDWR,
while rejecting unsupported 10-bit and SMBus operations.

Signed-off-by:	YAO, Xin &lt;mr.yaoxin@outlook.com&gt;
Reviewed by:	imp, adrian, pouria
Differential Revision: https://reviews.freebsd.org/D56251
</pre>
</div>
</content>
</entry>
<entry>
<title>sys: Remove $FreeBSD$: two-line .h pattern</title>
<updated>2023-08-16T17:54:11+00:00</updated>
<author>
<name>Warner Losh</name>
<email>imp@FreeBSD.org</email>
</author>
<published>2023-08-16T17:54:11+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.freebsd.org/src/commit/?id=95ee2897e98f5d444f26ed2334cc7c439f9c16c6'/>
<id>95ee2897e98f5d444f26ed2334cc7c439f9c16c6</id>
<content type='text'>
Remove /^\s*\*\n \*\s+\$FreeBSD\$$\n/
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Remove /^\s*\*\n \*\s+\$FreeBSD\$$\n/
</pre>
</div>
</content>
</entry>
<entry>
<title>spdx: The BSD-2-Clause-FreeBSD identifier is obsolete, drop -FreeBSD</title>
<updated>2023-05-12T16:44:03+00:00</updated>
<author>
<name>Warner Losh</name>
<email>imp@FreeBSD.org</email>
</author>
<published>2023-05-10T15:40:58+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.freebsd.org/src/commit/?id=4d846d260e2b9a3d4d0a701462568268cbfe7a5b'/>
<id>4d846d260e2b9a3d4d0a701462568268cbfe7a5b</id>
<content type='text'>
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
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
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
</pre>
</div>
</content>
</entry>
<entry>
<title>sys/dev: further adoption of SPDX licensing ID tags.</title>
<updated>2017-11-27T14:52:40+00:00</updated>
<author>
<name>Pedro F. Giffuni</name>
<email>pfg@FreeBSD.org</email>
</author>
<published>2017-11-27T14:52:40+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.freebsd.org/src/commit/?id=718cf2ccb9956613756ab15d7a0e28f2c8e91cab'/>
<id>718cf2ccb9956613756ab15d7a0e28f2c8e91cab</id>
<content type='text'>
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.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
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.
</pre>
</div>
</content>
</entry>
<entry>
<title>iic_rdwr_data-&gt;nmsgs is uint32_t, so limit the allowable number of messages to prevent memory exhaustion and short allocations on 32-bit systems. Since iicrdwr is intended to be a workalike of a Linux i2c-dev call, use the same limit of 42 that Linux uses.</title>
<updated>2016-05-20T03:03:04+00:00</updated>
<author>
<name>Jason A. Harmening</name>
<email>jah@FreeBSD.org</email>
</author>
<published>2016-05-20T03:03:04+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.freebsd.org/src/commit/?id=523a6367e478e7dfc99134b56a541f862325ca3d'/>
<id>523a6367e478e7dfc99134b56a541f862325ca3d</id>
<content type='text'>
Also check the return value of copyin(9) to prevent unnecessary allocation in the failure case.

Submitted by:	ngie
Reviewed by:	kib
MFC after:	1 week
Differential Revision:	https://reviews.freebsd.org/D5155
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Also check the return value of copyin(9) to prevent unnecessary allocation in the failure case.

Submitted by:	ngie
Reviewed by:	kib
MFC after:	1 week
Differential Revision:	https://reviews.freebsd.org/D5155
</pre>
</div>
</content>
</entry>
<entry>
<title>Fix numerous issues in iic(4) and iicbus(4):</title>
<updated>2015-04-21T11:50:31+00:00</updated>
<author>
<name>Jason A. Harmening</name>
<email>jah@FreeBSD.org</email>
</author>
<published>2015-04-21T11:50:31+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.freebsd.org/src/commit/?id=0afebee290a603f583b1be32e150cc35a13956a5'/>
<id>0afebee290a603f583b1be32e150cc35a13956a5</id>
<content type='text'>
--Allow multiple open iic fds by storing addressing state in cdevpriv
--Fix, as much as possible, the baked-in race conditions in the iic
ioctl interface by requesting bus ownership on I2CSTART, releasing it on
I2CSTOP/I2CRSTCARD, and requiring bus ownership by the current cdevpriv
to use the I/O ioctls
--Reduce internal iic buffer size and remove 1K read/write limit by
iteratively calling iicbus_read/iicbus_write
--Eliminate dynamic allocation in I2CWRITE/I2CREAD
--Move handling of I2CRDWR to separate function and improve error handling
--Add new I2CSADDR ioctl to store address in current cdevpriv so that
I2CSTART is not needed for read(2)/write(2) to work
--Redesign iicbus_request_bus() and iicbus_release_bus():
    --iicbus_request_bus() no longer falls through if the bus is already
owned by the requesting device.  Multiple threads on the same device may
want exclusive access.  Also, iicbus_release_bus() was never
device-recursive anyway.
    --Previously, if IICBUS_CALLBACK failed in iicbus_release_bus(), but
the following iicbus_poll() call succeeded, IICBUS_CALLBACK would not be
issued again
    --Do not hold iicbus mtx during IICBUS_CALLBACK call.  There are
several drivers that may sleep in IICBUS_CALLBACK, if IIC_WAIT is passed.
    --Do not loop in iicbus_request_bus if IICBUS_CALLBACK returns
EWOULDBLOCK; instead pass that to the caller so that it can retry if so
desired.

Differential Revision:	https://reviews.freebsd.org/D2140
Reviewed by:	imp, jhb, loos
Approved by:	kib (mentor)
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
--Allow multiple open iic fds by storing addressing state in cdevpriv
--Fix, as much as possible, the baked-in race conditions in the iic
ioctl interface by requesting bus ownership on I2CSTART, releasing it on
I2CSTOP/I2CRSTCARD, and requiring bus ownership by the current cdevpriv
to use the I/O ioctls
--Reduce internal iic buffer size and remove 1K read/write limit by
iteratively calling iicbus_read/iicbus_write
--Eliminate dynamic allocation in I2CWRITE/I2CREAD
--Move handling of I2CRDWR to separate function and improve error handling
--Add new I2CSADDR ioctl to store address in current cdevpriv so that
I2CSTART is not needed for read(2)/write(2) to work
--Redesign iicbus_request_bus() and iicbus_release_bus():
    --iicbus_request_bus() no longer falls through if the bus is already
owned by the requesting device.  Multiple threads on the same device may
want exclusive access.  Also, iicbus_release_bus() was never
device-recursive anyway.
    --Previously, if IICBUS_CALLBACK failed in iicbus_release_bus(), but
the following iicbus_poll() call succeeded, IICBUS_CALLBACK would not be
issued again
    --Do not hold iicbus mtx during IICBUS_CALLBACK call.  There are
several drivers that may sleep in IICBUS_CALLBACK, if IIC_WAIT is passed.
    --Do not loop in iicbus_request_bus if IICBUS_CALLBACK returns
EWOULDBLOCK; instead pass that to the caller so that it can retry if so
desired.

Differential Revision:	https://reviews.freebsd.org/D2140
Reviewed by:	imp, jhb, loos
Approved by:	kib (mentor)
</pre>
</div>
</content>
</entry>
<entry>
<title>Revert r268543.</title>
<updated>2014-07-12T06:23:42+00:00</updated>
<author>
<name>Rui Paulo</name>
<email>rpaulo@FreeBSD.org</email>
</author>
<published>2014-07-12T06:23:42+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.freebsd.org/src/commit/?id=efce3748f32e713bcb1fba45b021e843760e6fac'/>
<id>efce3748f32e713bcb1fba45b021e843760e6fac</id>
<content type='text'>
We should probably fix sys/gpio.h instead.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
We should probably fix sys/gpio.h instead.
</pre>
</div>
</content>
</entry>
<entry>
<title>Move iic.h to sys/ so that it's automatically installed in /usr/include/sys.</title>
<updated>2014-07-12T01:04:10+00:00</updated>
<author>
<name>Rui Paulo</name>
<email>rpaulo@FreeBSD.org</email>
</author>
<published>2014-07-12T01:04:10+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.freebsd.org/src/commit/?id=bd08cbb81ad64a1646ff5309565747aa1946410c'/>
<id>bd08cbb81ad64a1646ff5309565747aa1946410c</id>
<content type='text'>
This lets us call iic(4) ioctls without needing the kernel source code
and follows the same model of GPIO.

MFC after:	3 weeks
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This lets us call iic(4) ioctls without needing the kernel source code
and follows the same model of GPIO.

MFC after:	3 weeks
</pre>
</div>
</content>
</entry>
<entry>
<title>Fix typo in comment.</title>
<updated>2010-08-07T08:31:32+00:00</updated>
<author>
<name>Joel Dahl</name>
<email>joel@FreeBSD.org</email>
</author>
<published>2010-08-07T08:31:32+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.freebsd.org/src/commit/?id=7f22a6d334cbc416f5d0d0b6f7a77198475e3da5'/>
<id>7f22a6d334cbc416f5d0d0b6f7a77198475e3da5</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>Add two new flags (IIC_M_NOSTOP and IIC_M_NOSTART) to struct iic_msg to</title>
<updated>2010-06-05T17:48:26+00:00</updated>
<author>
<name>Nathan Whitehorn</name>
<email>nwhitehorn@FreeBSD.org</email>
</author>
<published>2010-06-05T17:48:26+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.freebsd.org/src/commit/?id=fed318596ca45b303efad99ae4117ea65f2e23cb'/>
<id>fed318596ca45b303efad99ae4117ea65f2e23cb</id>
<content type='text'>
allow consumers of iicbus_transfer() to send messages with repeated starts.

Reviewed by:	imp
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
allow consumers of iicbus_transfer() to send messages with repeated starts.

Reviewed by:	imp
</pre>
</div>
</content>
</entry>
</feed>
