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 |
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...............:) |
Quote:
Thanks a lot for the quick answer, I will try to look into making a daemon for the job.. :) |
All times are GMT -5. The time now is 12:27 AM. |