public inbox for linux-mtd@lists.infradead.org
 help / color / mirror / Atom feed
From: Steven Scholz <steven.scholz@imc-berlin.de>
To: Ushit Kumar <ukumar@neomagic.com>
Cc: linux-mtd@lists.infradead.org
Subject: Re: Probe function not being called
Date: Fri, 05 May 2006 17:34:54 +0200	[thread overview]
Message-ID: <445B709E.6090008@imc-berlin.de> (raw)
In-Reply-To: <FE01084Ikv3ySjWrywN00012b68@mX1.Myoutlookonline.com>

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

      reply	other threads:[~2006-05-05 15:35 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-05-05 14:08 Probe function not being called Ushit Kumar
2006-05-05 15:34 ` Steven Scholz [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=445B709E.6090008@imc-berlin.de \
    --to=steven.scholz@imc-berlin.de \
    --cc=linux-mtd@lists.infradead.org \
    --cc=ukumar@neomagic.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox