sorry....i may be wrong.....everyone has a "FIRST-TIME".....
just some remarks:
a. LCD using OMAP? there is a subdirectory drivers/vide/omap which
have a few implementation for LCD drivers. one of them (quite simple
to understand.....because lots of DO-NOTHING....) is lcd_sx1.c......
b. from lcd_sx1.c, the device is seemingly added AFTER
platform_driver _register() is called....contrary to your statement.
c. just the essential shown here:
first the module
struct platform_driver sx1_panel_driver = {
.probe = sx1_panel_probe,
.remove = sx1_panel_remove,
.suspend = sx1_panel_suspend,
.resume = sx1_panel_resume,
.driver = {
.name = "lcd_sx1",
.owner = THIS_MODULE,
},
};
static int sx1_panel_drv_init(void)
{
return platform_driver_register(&sx1_panel_driver);
}
The above will register the probe function. And device registration
is done in probe function:
static int sx1_panel_probe(struct platform_device *pdev)
{
omapfb_register_panel(&sx1_panel);
return 0;
}
Does that answer your query?
On Mon, Nov 10, 2008 at 3:49 AM, Sudipta GHOSH <[EMAIL PROTECTED]> wrote:
> thanks Peter and yogesh.
>
> I understand.
>
> Is it necessary to add the device in board init?
>
> Can I do it in the driver itself before calling platform_driver _register?
>
> -SG
>
> On Sun, Nov 9, 2008 at 5:34 PM, Peter Teoh <[EMAIL PROTECTED]> wrote:
>> how about this fix:
>>
>> http://www.infradead.org/pipermail/linux-mtd/2006-May/015444.html
>>
>> ???
>>
>> On Sat, Nov 8, 2008 at 9:24 PM, Sudipta GHOSH <[EMAIL PROTECTED]> wrote:
>>> Hi,
>>>
>>> I am writting a lcd driver based on omap.
>>>
>>> in omapfb_main.cpp, in module init there is a call platform_driver_register.
>>>
>>> But after that .probe is NOT getting called.
>>>
>>> -SG
>>>
>>> --
>>> To unsubscribe from this list: send an email with
>>> "unsubscribe kernelnewbies" to [EMAIL PROTECTED]
>>> Please read the FAQ at http://kernelnewbies.org/FAQ
>>>
>>>
>>
>>
>>
>> --
>> Regards,
>> Peter Teoh
>>
>
--
Regards,
Peter Teoh
--
To unsubscribe from this list: send an email with
"unsubscribe kernelnewbies" to [EMAIL PROTECTED]
Please read the FAQ at http://kernelnewbies.org/FAQ