Message ID | 1440484277-32675-2-git-send-email-javier@osg.samsung.com |
---|---|
State | Rejected |
Headers | show |
On Tue, Aug 25, 2015 at 08:31:11AM +0200, Javier Martinez Canillas wrote: > The I2C core always reports the MODALIAS uevent as "i2c:<modalias>" > regardless of the mechanism that was used to register the device > (i.e: OF or board code) and the table that is used later to match > the driver with the device (i.e: I2C id table or OF match table). > > So drivers needs to export the I2C id table and this be built into > the module or udev won't have the necessary information to autoload > the needed driver module when the device is added. > > Signed-off-by: Javier Martinez Canillas <javier@osg.samsung.com> The dummy driver is always loaded when the i2c core inits.
Hello Wolfram, On 08/26/2015 06:55 PM, Wolfram Sang wrote: > On Tue, Aug 25, 2015 at 08:31:11AM +0200, Javier Martinez Canillas wrote: >> The I2C core always reports the MODALIAS uevent as "i2c:<modalias>" >> regardless of the mechanism that was used to register the device >> (i.e: OF or board code) and the table that is used later to match >> the driver with the device (i.e: I2C id table or OF match table). >> >> So drivers needs to export the I2C id table and this be built into >> the module or udev won't have the necessary information to autoload >> the needed driver module when the device is added. >> >> Signed-off-by: Javier Martinez Canillas <javier@osg.samsung.com> > > The dummy driver is always loaded when the i2c core inits. > Ok, I wondered if that was the case but I was not sure so I posted it just in case. Then this patch should be dropped. Best regards,
> > The dummy driver is always loaded when the i2c core inits. > > > > Ok, I wondered if that was the case but I > was not sure so I posted it just in case. Check the source code, this part is pretty obvious...
Hello Wolfram, On 08/31/2015 10:31 PM, Wolfram Sang wrote: > >>> The dummy driver is always loaded when the i2c core inits. >>> >> >> Ok, I wondered if that was the case but I >> was not sure so I posted it just in case. > > Check the source code, this part is pretty obvious... > Yes, sorry for missing that obvious detail... Best regards,
On Tue, Sep 01, 2015 at 12:30:22AM +0200, Javier Martinez Canillas wrote: > Hello Wolfram, > > On 08/31/2015 10:31 PM, Wolfram Sang wrote: > > > >>> The dummy driver is always loaded when the i2c core inits. > >>> > >> > >> Ok, I wondered if that was the case but I > >> was not sure so I posted it just in case. > > > > Check the source code, this part is pretty obvious... > > > > Yes, sorry for missing that obvious detail... No problem, now you know :)
diff --git a/drivers/i2c/i2c-core.c b/drivers/i2c/i2c-core.c index a6780289c61d..46536834920c 100644 --- a/drivers/i2c/i2c-core.c +++ b/drivers/i2c/i2c-core.c @@ -1041,6 +1041,7 @@ static const struct i2c_device_id dummy_id[] = { { "dummy", 0 }, { }, }; +MODULE_DEVICE_TABLE(i2c, dummy_id); static int dummy_probe(struct i2c_client *client, const struct i2c_device_id *id)
The I2C core always reports the MODALIAS uevent as "i2c:<modalias>" regardless of the mechanism that was used to register the device (i.e: OF or board code) and the table that is used later to match the driver with the device (i.e: I2C id table or OF match table). So drivers needs to export the I2C id table and this be built into the module or udev won't have the necessary information to autoload the needed driver module when the device is added. Signed-off-by: Javier Martinez Canillas <javier@osg.samsung.com> --- drivers/i2c/i2c-core.c | 1 + 1 file changed, 1 insertion(+)