FreeBSD/src ac8f374 (r328307)sys/dev/iicbus iiconf.c iiconf.h

Fix a bug introduced with recursive bus ownership support in r321584.

The recursive ownership support added in r321584 was unconditionally in
effect all the time -- whenever a given i2c slave device instance tried to
lock the i2c bus for exclusive use when it already owned the bus, the call
returned immediately without waiting.  However, many i2c slave drivers use
bus ownership to enforce that only a single thread at a time can be using
the slave device.  The recursive locking changes broke this use case.

Now there is a new flag, IIC_RECURSIVE, which can be mixed in with the
other flags passed to iicbus_acquire_bus() to allow drivers to indicate
when recursive locking is desired.  Using the flag implies that the driver
is managing concurrent access to the device by different threads in some way.

This immediately fixes all existing i2c slave drivers except for the two
i2c RTC drivers which use the recursive locking feature; those will be
fixed in a followup commit.
DeltaFile
+9-3sys/dev/iicbus/iiconf.c
+2-1sys/dev/iicbus/iiconf.h
+11-42 files

UnifiedSplitRaw