Probe function not being called
Steven Scholz
steven.scholz at imc-berlin.de
Fri May 5 11:34:54 EDT 2006
Ushit,
> I am trying to implement a nor driver for a Intel strata flash chip on Linux
> 2.6.14. My problem is that the driver code is not calling the probe
> function. My declarations are as follows:
>
> static struct device_driver mm6p_flash_driver = {
> .name = "mm6p_flash",
> .bus = &platform_bus_type,
> .probe = mm6p_flash_probe,
> .remove = mm6p_flash_remove,
> };
>
> static int __init mm6p_flash_init(void)
> {
> printk("$$$$$in mm6p_flash_init$$$$$$$$$$\n");
> return driver_register(&mm6p_flash_driver);
> }
Did you register a suitable platform_device with the same name!?
Something like
struct platform_device foo_device = {
.name = "mm6p_flash",
.id = -1,
.dev = {
.platform_data = &foo_data,
},
.resource = foo_resources,
.num_resources = ARRAY_SIZE(foo_resources),
};
platform_device_register(&foo_device);
Usually in your board specific startup files.
driver and device are matched by name! So if there's no device "mm6p_flash"
registered, then there's no need to call probe in driver "mm6p_flash".
Ok?
--
Steven
More information about the linux-mtd
mailing list