[i2c] Client creation failed but module still loaded
Jean Delvare
khali at linux-fr.org
Sat Jun 23 12:06:24 CEST 2007
Hi Juerg,
On Fri, 22 Jun 2007 14:23:50 -0700, Juerg Haefliger wrote:
> I noticed that when the .attach_adapter callback fails, something like
> the following gets written to the log and the module is still getting
> loaded:
> i2c_adapter i2c-0: Client creation failed at 0xXY (-12)
Actually you get this message when i2c_probe() fails, not
the .attach_adapter callback itself.
> Why is the module getting loaded even though the attaching of the I2C
> client apparently failed?
You assume that there's a single I2C client involved, which isn't
necessarily true. You don't want to prevent the driver from loading if
one client failed but others succeeded.
Also note that its is possible to load the i2c chip driver first, and
the i2c bus driver second. You don't wan't to prevent the i2c bus
driver from loading because one chip driver failed while probing it.
--
Jean Delvare
More information about the i2c
mailing list