freebsd-dev/sys/dev/iicbus
Ian Lepore 873bf31b2b Restore the ability for i2c slave devices to do IO from their probe method.
r348164 added code to iicbus_request_bus/iicbus_release_bus to automatically
call device_busy()/device_unbusy() as part of aquiring exclusive use of the
bus (so modules can't be unloaded while the bus is exclusively owned and/or
IO is in progress).  That broke the ability to do i2c IO from a slave device
probe method, because the slave isn't attached yet, so calling device_busy()
triggers a sanity-check panic for trying to busy a non-attached device.

Now we check whether the device status is < DS_ATTACHING, and if so we busy
the iicbus rather than the slave device.  I think this leaves a small window
where a module could be unloaded while probing is in progress.  But I think
that's true of all devices, and probably should be fixed by introducing a
DS_PROBING state for devices, and handling that at various points in the
newbus code.
2019-07-08 20:26:56 +00:00
..
twsi Add pnpinfo. 2019-05-23 18:19:56 +00:00
ad7417.c
ad7418.c Remove some unused header files from the ad7418 driver. 2019-06-23 17:20:39 +00:00
adm1030.c
adt746x.c Clean up OF_getprop_alloc API 2018-04-08 22:59:34 +00:00
ds13rtc.c Add pnpinfo to all i2c drivers that have FDT compat data. 2019-05-23 18:24:27 +00:00
ds1307.c Add pnpinfo to all i2c drivers that have FDT compat data. 2019-05-23 18:24:27 +00:00
ds1307reg.h
ds1631.c
ds1672.c Build the ds1672 driver as a module. Add a detach() to unregister the rtc. 2018-03-06 02:30:34 +00:00
ds1775.c
ds3231.c Switch to the new bcd_clocktime conversion routines, and add calls to the 2018-03-05 00:15:56 +00:00
ds3231reg.h
icee.c Rename IICBUS_FDT_PNPINFO -> IICBUS_FDT_PNP_INFO because all the other 2019-05-23 16:03:30 +00:00
if_ic.c
iic_recover_bus.c
iic_recover_bus.h
iic.c
iic.h
iicbb_if.m
iicbb.c
iicbus_if.m
iicbus.c revert r273728 and parts of r306589, iicbus no-stop by default feature 2019-05-29 09:08:20 +00:00
iicbus.h Restore the ability for i2c slave devices to do IO from their probe method. 2019-07-08 20:26:56 +00:00
iicoc.c
iicoc.h
iiconf.c Restore the ability for i2c slave devices to do IO from their probe method. 2019-07-08 20:26:56 +00:00
iiconf.h
iicsmb.c
isl12xx.c Add pnpinfo to all i2c drivers that have FDT compat data. 2019-05-23 18:24:27 +00:00
lm75.c
max6690.c
nxprtc.c Add pnpinfo to all i2c drivers that have FDT compat data. 2019-05-23 18:24:27 +00:00
ofw_iicbus.c
rtc8583.c Add pnpinfo to all i2c drivers that have FDT compat data. 2019-05-23 18:24:27 +00:00
s35390a.c Switch to the new bcd_clocktime conversion routines, and add calls to the 2018-03-05 00:43:53 +00:00
sy8106a.c Add pnpinfo to all i2c drivers that have FDT compat data. 2019-05-23 18:24:27 +00:00
syr827.c Add pnpinfo to all i2c drivers that have FDT compat data. 2019-05-23 18:24:27 +00:00