Re: Order of Loading mmc driver modules.

2007-12-27 Thread Pierre Ossman
On Wed, 26 Dec 2007 10:40:22 -0800
"raki john" <[EMAIL PROTECTED]> wrote:

> Hi All,
> 
> I am working with pxamci driver(2.6.22.1). I have made , core and host
> as  separate modules.
> 
> what is the correct order of loading the modules
> 
> i am doing in this order first core (mmc_core.ko), then card(mmc_block.ko)
> after that host driver ( pxamci.ko). Is this correct.
> 

If you're using just insmod, then yes, this is a valid order. The only thing 
that is crucial is that mmc_core is loaded before any of the other. If you use 
modprobe that will happen automatically.

> I do not know much about Linux device model.
> 

There's lots of info on the web and in the Documentation/ directory of the 
kernel source if you want to indulge yourself.

> i saw that pxamci.ko driver registers it self as platform_driver. When
> does its probe function is called. Is it called immediately  after
> platform_driver_register(_driver) is called.
> 

For pxamci, yes. More specifically, the probe function is called when there is 
both a driver (created by platform_driver_register()) and a device 
(platform_device_register()) available. But since the device is added very 
early in the pxamci case, the magic will happen when the driver registers.

> also in card driver (mmc_block.ko) in block.c  file i saw a probe
> function(mmc_blk_probe). How does it is invoked .
> 

When the corresponding device is registered. In this case it is whenever a card 
is detected and initialized.

Rgds
Pierre


signature.asc
Description: PGP signature


Re: Order of Loading mmc driver modules.

2007-12-27 Thread Pierre Ossman
On Wed, 26 Dec 2007 10:40:22 -0800
raki john [EMAIL PROTECTED] wrote:

 Hi All,
 
 I am working with pxamci driver(2.6.22.1). I have made , core and host
 as  separate modules.
 
 what is the correct order of loading the modules
 
 i am doing in this order first core (mmc_core.ko), then card(mmc_block.ko)
 after that host driver ( pxamci.ko). Is this correct.
 

If you're using just insmod, then yes, this is a valid order. The only thing 
that is crucial is that mmc_core is loaded before any of the other. If you use 
modprobe that will happen automatically.

 I do not know much about Linux device model.
 

There's lots of info on the web and in the Documentation/ directory of the 
kernel source if you want to indulge yourself.

 i saw that pxamci.ko driver registers it self as platform_driver. When
 does its probe function is called. Is it called immediately  after
 platform_driver_register(pxamci_driver) is called.
 

For pxamci, yes. More specifically, the probe function is called when there is 
both a driver (created by platform_driver_register()) and a device 
(platform_device_register()) available. But since the device is added very 
early in the pxamci case, the magic will happen when the driver registers.

 also in card driver (mmc_block.ko) in block.c  file i saw a probe
 function(mmc_blk_probe). How does it is invoked .
 

When the corresponding device is registered. In this case it is whenever a card 
is detected and initialized.

Rgds
Pierre


signature.asc
Description: PGP signature


Order of Loading mmc driver modules.

2007-12-26 Thread raki john
Hi All,

I am working with pxamci driver(2.6.22.1). I have made , core and host
as  separate modules.

what is the correct order of loading the modules

i am doing in this order first core (mmc_core.ko), then card(mmc_block.ko)
after that host driver ( pxamci.ko). Is this correct.

I do not know much about Linux device model.

i saw that pxamci.ko driver registers it self as platform_driver. When
does its probe function is called. Is it called immediately  after
platform_driver_register(_driver) is called.

also in card driver (mmc_block.ko) in block.c  file i saw a probe
function(mmc_blk_probe). How does it is invoked .

Thanks in advance for your help.


--
Thanks
raki
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Order of Loading mmc driver modules.

2007-12-26 Thread raki john
Hi All,

I am working with pxamci driver(2.6.22.1). I have made , core and host
as  separate modules.

what is the correct order of loading the modules

i am doing in this order first core (mmc_core.ko), then card(mmc_block.ko)
after that host driver ( pxamci.ko). Is this correct.

I do not know much about Linux device model.

i saw that pxamci.ko driver registers it self as platform_driver. When
does its probe function is called. Is it called immediately  after
platform_driver_register(pxamci_driver) is called.

also in card driver (mmc_block.ko) in block.c  file i saw a probe
function(mmc_blk_probe). How does it is invoked .

Thanks in advance for your help.


--
Thanks
raki
--
To unsubscribe from this list: send the line unsubscribe linux-kernel in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/