HomeFreeBSD

MFC r348123, r348164, r348166

Description

MFC r348123, r348164, r348166

r348123:
Add pnp info to the imx_i2c driver.

r348164:
Mark i2c slave devices busy while they own the bus.

Many i2c slave drivers are in modules that can be unloaded. If they detach
while IO is in progress the bus would be hung forever. Conversely,
lower-layer drivers (iicbus and the hardware driver) also live in modules
and other kinds of bad things happen if they get detached while IO is in
progress. Because device_busy() propagates up to parents, marking the slave
device busy while it owns the bus solves both kinds of problems that come
with detaching i2c devices while IO is in progress.

r348166:
Release the bus-recovery gpio pins in detach(), so that unload then
reload of the module works without "pin already allocated" errors.

Details

Provenance
ianAuthored on
Parents
rS349310: MFC r348120:
Branches
Unknown
Tags
Unknown