LinuxQuestions.org
Support LQ: Use code LQ3 and save $3 on Domain Registration
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software > Linux - Kernel
User Name
Password
Linux - Kernel This forum is for all discussion relating to the Linux kernel.

Notices

Reply
 
Search this Thread
Old 03-25-2013, 06:01 AM   #1
AnkurTank
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
nini09
Senior Member
 
Registered: Apr 2009
Posts: 1,007

Rep: Reputation: 67
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
AnkurTank
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".
 
  


Reply

Tags
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


All times are GMT -5. The time now is 09:07 PM.

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