* Fwd: mmc card probe not getting called [not found] <CAJ8diHTq6ayQjciiu_9fXyHYTk4DorT=5uw=759zHo7B81-e4w@mail.gmail.com> @ 2013-02-19 6:46 ` chetan cr123 2013-02-19 15:55 ` anish kumar 0 siblings, 1 reply; 4+ messages in thread From: chetan cr123 @ 2013-02-19 6:46 UTC (permalink / raw) To: linux-fsdevel; +Cc: Greg KH, linux-kernel HI All, I am working on Sd Card/Block driver I am registering it as both 1. register_blkdev()------------- BLOCK Regsiter 2. mmc_register_driver ------ MMC regsiter and filling the mmc_driver structure. I am not able to see the probe of MMC, But i see the return value of mmc_register function returning success. Kindly let me know how i make the probe of mmc getting called Thanks Chetan ^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: Fwd: mmc card probe not getting called 2013-02-19 6:46 ` Fwd: mmc card probe not getting called chetan cr123 @ 2013-02-19 15:55 ` anish kumar 2013-02-20 5:55 ` chetan cr123 0 siblings, 1 reply; 4+ messages in thread From: anish kumar @ 2013-02-19 15:55 UTC (permalink / raw) To: chetan cr123; +Cc: linux-fsdevel, Greg KH, linux-kernel On Tue, 2013-02-19 at 12:16 +0530, chetan cr123 wrote: > HI All, > > I am working on Sd Card/Block driver > > I am registering it as both > > 1. register_blkdev()------------- BLOCK Regsiter > 2. mmc_register_driver ------ MMC regsiter > > and filling the mmc_driver structure. > > I am not able to see the probe of MMC, But i see the return value of > mmc_register function returning success. I am not an expert on MMC driver but AFAIK it is no different in terms of following device/driver model. Probe of a function is only called when device name matches with driver name and when it happens driver calls your probe. So in your case even though you have registered the driver, looks like you are missing the device registration part.Do that and see the magic. If this is SOC then that is done in the board file i.e. arch/arm/plat-xyz/.... > > Kindly let me know how i make the probe of mmc getting called > > Thanks > > > Chetan > -- > To unsubscribe from this list: send the line "unsubscribe linux-kernel" in > the body of a message to majordomo@vger.kernel.org > More majordomo info at http://vger.kernel.org/majordomo-info.html > Please read the FAQ at http://www.tux.org/lkml/ ^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: Fwd: mmc card probe not getting called 2013-02-19 15:55 ` anish kumar @ 2013-02-20 5:55 ` chetan cr123 2013-02-20 6:13 ` anish kumar 0 siblings, 1 reply; 4+ messages in thread From: chetan cr123 @ 2013-02-20 5:55 UTC (permalink / raw) To: anish kumar; +Cc: linux-fsdevel, Greg KH, linux-kernel Hi Anish, Thanks for your reply, I was doing device registration for device by giving same name as driver name, This i used to do in platform driver registration, But i dont know how to do for mmc device registration, And i also want to know which part of the code(file name) is doing the string compare with the driver and device names and calling the probe function. can u please point me to that part of code. from many days i was searching from which part of code where string compare is done and calls the probe function. Kindly point me out to that part of code. On Tue, Feb 19, 2013 at 9:25 PM, anish kumar <anish198519851985@gmail.com> wrote: > On Tue, 2013-02-19 at 12:16 +0530, chetan cr123 wrote: >> HI All, >> >> I am working on Sd Card/Block driver >> >> I am registering it as both >> >> 1. register_blkdev()------------- BLOCK Regsiter >> 2. mmc_register_driver ------ MMC regsiter >> >> and filling the mmc_driver structure. >> >> I am not able to see the probe of MMC, But i see the return value of >> mmc_register function returning success. > I am not an expert on MMC driver but AFAIK it is no different in terms > of following device/driver model. > Probe of a function is only called when device name matches with driver > name and when it happens driver calls your probe. > > So in your case even though you have registered the driver, looks like > you are missing the device registration part.Do that and see the magic. > If this is SOC then that is done in the board file i.e. > arch/arm/plat-xyz/.... > >> >> Kindly let me know how i make the probe of mmc getting called >> >> Thanks >> >> >> Chetan >> -- >> To unsubscribe from this list: send the line "unsubscribe linux-kernel" in >> the body of a message to majordomo@vger.kernel.org >> More majordomo info at http://vger.kernel.org/majordomo-info.html >> Please read the FAQ at http://www.tux.org/lkml/ > > ^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: Fwd: mmc card probe not getting called 2013-02-20 5:55 ` chetan cr123 @ 2013-02-20 6:13 ` anish kumar 0 siblings, 0 replies; 4+ messages in thread From: anish kumar @ 2013-02-20 6:13 UTC (permalink / raw) To: chetan cr123; +Cc: linux-fsdevel, Greg KH, linux-kernel On Wed, 2013-02-20 at 11:25 +0530, chetan cr123 wrote: Avoiding top posting. > Hi Anish, > > Thanks for your reply, > > I was doing device registration for device by giving same name as > driver name, This i used to do in platform driver registration, > > But i dont know how to do for mmc device registration, > > And i also want to know which part of the code(file name) is doing the > string compare with the driver and device names and calling the probe > function. can u please point me to that part of code. from many days i > was searching from which part of code where string compare is done and > calls the probe function. > > > Kindly point me out to that part of code. look at drivers/base/dd.c static int really_probe(struct device *dev, struct device_driver *drv) { //snip if (dev->bus->probe) { ret = dev->bus->probe(dev); if (ret) goto probe_failed; } else if (drv->probe) { ret = drv->probe(dev); if (ret) goto probe_failed; } Tip:Whenever you want to see how some function is being called use dump_stack().This will give you the call chain leading up to your function call which you are interested in. > > > > On Tue, Feb 19, 2013 at 9:25 PM, anish kumar > <anish198519851985@gmail.com> wrote: > > On Tue, 2013-02-19 at 12:16 +0530, chetan cr123 wrote: > >> HI All, > >> > >> I am working on Sd Card/Block driver > >> > >> I am registering it as both > >> > >> 1. register_blkdev()------------- BLOCK Regsiter > >> 2. mmc_register_driver ------ MMC regsiter > >> > >> and filling the mmc_driver structure. > >> > >> I am not able to see the probe of MMC, But i see the return value of > >> mmc_register function returning success. > > I am not an expert on MMC driver but AFAIK it is no different in terms > > of following device/driver model. > > Probe of a function is only called when device name matches with driver > > name and when it happens driver calls your probe. > > > > So in your case even though you have registered the driver, looks like > > you are missing the device registration part.Do that and see the magic. > > If this is SOC then that is done in the board file i.e. > > arch/arm/plat-xyz/.... > > > >> > >> Kindly let me know how i make the probe of mmc getting called > >> > >> Thanks > >> > >> > >> Chetan > >> -- > >> To unsubscribe from this list: send the line "unsubscribe linux-kernel" in > >> the body of a message to majordomo@vger.kernel.org > >> More majordomo info at http://vger.kernel.org/majordomo-info.html > >> Please read the FAQ at http://www.tux.org/lkml/ > > > > ^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2013-02-20 6:13 UTC | newest] Thread overview: 4+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- [not found] <CAJ8diHTq6ayQjciiu_9fXyHYTk4DorT=5uw=759zHo7B81-e4w@mail.gmail.com> 2013-02-19 6:46 ` Fwd: mmc card probe not getting called chetan cr123 2013-02-19 15:55 ` anish kumar 2013-02-20 5:55 ` chetan cr123 2013-02-20 6:13 ` anish kumar
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for NNTP newsgroup(s).