Welcome to the most active Linux Forum on the web.
Go Back > Forums > Linux Forums > Linux - Software > Linux - Kernel
User Name
Linux - Kernel This forum is for all discussion relating to the Linux kernel.


  Search this Thread
Old 03-25-2013, 06:01 AM   #1
LQ Newbie
Registered: Oct 2012
Posts: 13

Rep: Reputation: Disabled
Question module_init and probe function call

Actually i am asking below questions to decide between registering my driver as
character driver or
platform driver
1. my first question is at what point of booting module_init of device driver is called?

2.Second one : In my understanding for non hot-plugable device can also be registered as platform device. And we can put platform_driver_register() function in init function to register device. [Dont know if my understanding is fully correct]
My questions regarding this are
a. Will call to platform_driver_register will result into calling probe of the same driver or
b. probe function of driver will be called at later stage when probe for all SOC device is called.

My assumption is probe is called later i.e. after init functions of all driver is done.(assuming driver is compiled into Linux kernel).

My intention is reduce booting time by reducing code in init function of my driver.
Old 04-04-2013, 02:19 PM   #2
Senior Member
Registered: Apr 2009
Posts: 1,497

Rep: Reputation: 136Reputation: 136
The module_init of device driver is called when modprobe is called.
You can register platform driver in other module.
Old 04-05-2013, 12:03 AM   #3
LQ Newbie
Registered: Oct 2012
Posts: 13

Original Poster
Rep: Reputation: Disabled
Thank you nini09 for reply,
But i didn't understand your reply "You can register platform driver in other module".


driver, init, probe

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
mdio probe function not called. rashyd80 Programming 3 07-20-2010 01:45 AM
who will call the probe function of the pci driver in x86 processor joslyn Linux - Software 0 05-17-2010 07:24 AM
[SOLVED] g++ error message no matching function for call to some function Jerry Mcguire Programming 6 04-13-2010 08:37 PM
Compilation issue when Function is parameter in function call on LINUX sa20358 Linux - Software 2 07-24-2008 10:19 PM
USB driver won't call probe function linux=future Linux - Kernel 2 01-13-2007 04:47 PM > Forums > Linux Forums > Linux - Software > Linux - Kernel

All times are GMT -5. The time now is 08:07 AM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration