Main index | Section 4 | Options |
Alternatively, to load the driver as a module at boot time, place the following line in loader.conf(5):
iicmux_load="YES"
Note that it is usually not necessary to explicitly load the driver module, as it will be loaded automatically along with the driver for the specific mux hardware in use.
Generally speaking, an I2C mux is connected to an upstream I2C bus, and to one or more downstream I2C buses, and it can be commanded to connect any one of the downstream buses to the upstream bus. Some hardware may be able to connect multiple downstream buses at the same time, but that concept is not supported by iicmux.
The iicmux framework operates automatically when I2C slave devices initiate I/O. It does not require (or even allow for) any external control to select the active downstream bus.
When there is no I/O in progress, the mux is said to be in the "idle" state. Some mux hardware has the ability to disconnect all downstream buses when in an idle state. Other hardware must always have one of the downstream buses connected. Individual mux hardware drivers typically provide a way to select which downstream bus (if any) should be connected while in the idle state. In the absence of such configuration, whichever downstream bus was last used remains connected to the upstream bus.
When an I2C slave device on a bus downstream of a mux initiates I/O, it first requests exclusive use of the bus by calling iicbus_request_bus(). This request is communicated to the bus's parent, which is the iicmux framework mux driver. Once exclusive bus ownership is obtained, the mux driver connects the upstream I2C bus to the downstream bus which hosts the slave device that requested bus ownership. The mux hardware maintains that upstream-to-downstream connection until the slave device calls iicbus_release_bus(). Before releasing ownership, the mux driver returns the mux hardware to the idle state.
Drivers using the iicmux framework conform to the standard i2c/i2c-mux.txt bindings document.
hint.<driver>.<unit>.at | |
The upstream iicbus(4) the iicmux instance is attached to. | |
When configured via hints, the driver automatically adds an iicbus instance for every downstream bus supported by the chip. There is currently no way to indicate used versus unused downstream buses.
IICMUX (4) | January 1, 2020 |
Main index | Section 4 | Options |
Please direct any comments about this manual page service to Ben Bullock. Privacy policy.
“ | Did you know that 7/5 people don't know how to use fractions? | ” |