[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: driver_register() - probe routine
On Thu, Apr 06, 2006 at 08:46:35PM +0200, jfaslist wrote:
> Greg KH wrote:
>
> >>Hi,
> >>Using linux 2.6, I have problem with an i2c bus driver. The driver does
> >>a driver_register() call in its init entry point.
> >>In that process it registers a probe routine, but this one never gets
> >>called. As a result the i2c bus is not working, since the i2c bus driver
> >>never got a chance to register itself w/ the i2c_add_adapter() function
> >>as described in the linux journal article:
> >>http://www.linuxjournal.com/article/7136
> >>
> >>
> >
> >Try looking at the documentation for the i2c core in Documentation/i2c/
> >and look at the existing i2c drivers, as the api has changed a bit since
> >I wrote that old article.
> >
> >If you still have questions, try posting the patch on the sensors
> >mailing list, as that is the best place for this.
> >
> >
> >
> Thanks. But I believe my problem has to do with a driver model issue
> more than i2c. The driver registers itself w/ driver_register() but the
> subsequent probe routine never gets called. I am not sure what triggers
> the probe to be called. I will keep looking in the code.
A driver should never be calling "driver_register" on its own. That's
probably the problem right there :)
Use an existing bus, if you don't have a bus, use the platform_device
interface.
thanks,
greg k-h
--
Kernelnewbies: Help each other learn about the Linux kernel.
Archive: http://mail.nl.linux.org/kernelnewbies/
FAQ: http://kernelnewbies.org/faq/