[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Question on platform_driver probe in backlight driver
Hi,
Claudio Nieder wrote:
>
> The corgi_bl.c doesn't do that. Instead its init function calls
> platform_driver_register passing it a platform_driver struct. This in turn
> references a probe function which does the backlight_device_register.
>
> So I did the same in my source, and it does not work as I would expect.
> The init function is called and I see the printk output in syslog. But the
> probe function is never called, no printk output in syslog and also the
> files in /sys/class/backlight never appear.
>
> Now I wonder, what am I missing. What must be done, so that the probe
> function is called?
>
You need to create corresponding platform_device structure for your
->probe() method to run. Corgi creates corresponding platform_device
structure elsewhere; you might need to add it directly to your driver.
Hope this helps.
--
Dmitry
--
Kernelnewbies: Help each other learn about the Linux kernel.
Archive: http://mail.nl.linux.org/kernelnewbies/
FAQ: http://kernelnewbies.org/faq/