mirror of
https://github.com/opnsense/src.git
synced 2026-04-15 14:29:58 -04:00
--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)
|
||
|---|---|---|
| .. | ||
| ad7417.c | ||
| ad7418.c | ||
| adm1030.c | ||
| adt746x.c | ||
| ds133x.c | ||
| ds1307.c | ||
| ds1307reg.h | ||
| ds1374.c | ||
| ds1631.c | ||
| ds1672.c | ||
| ds1775.c | ||
| ds3231.c | ||
| ds3231reg.h | ||
| icee.c | ||
| if_ic.c | ||
| iic.c | ||
| iic.h | ||
| iicbb.c | ||
| iicbb_if.m | ||
| iicbus.c | ||
| iicbus.h | ||
| iicbus_if.m | ||
| iicoc.c | ||
| iicoc.h | ||
| iiconf.c | ||
| iiconf.h | ||
| iicsmb.c | ||
| lm75.c | ||
| max6690.c | ||
| pcf8563.c | ||
| pcf8563reg.h | ||
| s35390a.c | ||