LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
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 09-24-2012, 03:43 AM   #1
Qw_freak
LQ Newbie
 
Registered: Jun 2012
Location: Denmark
Distribution: Fedora 17
Posts: 5

Rep: Reputation: Disabled
Question How do I reload a kernel driver on an embedded device (i.MX53)?


Being new and all with linux, I have a spi driver, which needs to be reloaded every time the system goes into suspend mode and wakes up again, to get my screen to work on my embedded device.

So my question may have two parts:

Can i reload a kernel driver?? (Not a module)

if not, how could i, fx in the spi driver, make sure a setup sequence is run every time the system wakes up??

Thank in advance..
-QW
 
Old 09-24-2012, 07:03 AM   #2
SIG_SEGV
Member
 
Registered: Jul 2012
Location: Banglore, INDIA
Distribution: Fedora-Core
Posts: 70

Rep: Reputation: 11
You cannot reload a kernel driver unless it has called a 'clean_up module' (releasing all the resources its using) and follows a remove module (rmmod) process. So, I think of an idea.....
1.First compile the inbuilt Kernel Driver itself as a LOADABLE KERNEL MODULE (LKM).
2. Create a daemon so, it polls for system suspend event.
3. At system suspend time call 'clean_up module' and then disconnect driver from kernel.
4. Back at system wake up, Reload the driver and Vice-versa....

Hope this helps at the worst case...............
 
Old 09-25-2012, 01:50 AM   #3
Qw_freak
LQ Newbie
 
Registered: Jun 2012
Location: Denmark
Distribution: Fedora 17
Posts: 5

Original Poster
Rep: Reputation: Disabled
Quote:
You cannot reload a kernel driver unless it has called a 'clean_up module' (releasing all the resources its using) and follows a remove module (rmmod) process. So, I think of an idea.....
1.First compile the inbuilt Kernel Driver itself as a LOADABLE KERNEL MODULE (LKM).
2. Create a daemon so, it polls for system suspend event.
3. At system suspend time call 'clean_up module' and then disconnect driver from kernel.
4. Back at system wake up, Reload the driver and Vice-versa....

Hope this helps at the worst case...............
Well, that complicates it a great deal, unfortunately..

Thanks a lot for the quick answer, I will try to look into making a daemon for the job..
 
  


Reply



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
what is the difference between a linux embedded and a device driver programer ? pradiptart Programming 9 08-27-2012 12:32 AM
boot linux kernel for embedded device fariborz Linux - Newbie 1 04-14-2008 02:42 AM
Device driver for embedded board zvivered Linux - Kernel 1 10-22-2007 05:20 PM
linux kernel install on embedded device sensational Linux - General 2 08-23-2005 04:13 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software > Linux - Kernel

All times are GMT -5. The time now is 02:15 AM.

Main Menu
Advertisement
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
Open Source Consulting | Domain Registration