Hi there,
I am using an i2c bus adapter driver, that happens to be a platform
driver. After it registers itself w/ driver_register(), its probe
routine (initialized in the device driver structure) never gets
called. Is there anything I can do to force the platform core code to
call the probe routine of the i2v bus adapter driver?
I have tried using platform_driver_register() rather than
driver_register() but it didn't help.
Please post your code or give an URL to it, or nobody will be able to
help you.
The driver is drivers/i2c/busses/i2c-cpm2.c, but I don't think it would
have helped, as I think the problem is outside of it. What I ended up
doing was to add the following hack in my setup code. After I did this
the platform driver probe() routine gets called and the i2c bus code is
called. Not sure why I have to, but that will do for now,. I will come
back to it at a later time.
//jfas - May 2006: Hack so that the i2c bus adapter probe routine gets
called. This is located in the drivers/i2c/busses/i2c-cpm2.c driver.
static __init int add_fsl_i2c(void)
{
struct platform_device *pd;
int ret;
pd = platform_device_alloc("fsl_i2c", -1);
if (!pd)
return -ENOMEM;
ret = platform_device_add(pd);
if (ret)
platform_device_put(pd);
return ret;
}
device_initcall(add_fsl_i2c);
Thansk,
-jf simon
___________________________________________________________________________
Faites de Yahoo! votre page d'accueil sur le web pour retrouver directement vos services pr�r�: v�fiez vos nouveaux mails, lancez vos recherches et suivez l'actualit�n temps r�.
Rendez-vous sur http://fr.yahoo.com/set
--
Kernelnewbies: Help each other learn about the Linux kernel.
Archive: http://mail.nl.linux.org/kernelnewbies/
FAQ: http://kernelnewbies.org/faq/