Linux hibernation support for loadable drivers

Greg KH greg at kroah.com
Fri Apr 11 10:23:05 EDT 2014


On Fri, Apr 11, 2014 at 06:28:40PM +0530, AYAN KUMAR HALDER wrote:
> Hi,
> 
> I am working with the linux hibernation code( swsusp hibernation
> framework) on an ARM based custom SOC. I am using some drivers like
> Nand Flash Controller driver as loadable modules.
> 
> As per my understanding , during hibernation kernel calls suspend for
> all the drivers while creating a snapshot. During resume, after the
> kernel resumes the snapshot (from late_initcall - software_resme) ,
> the kernel calls resume for all the drivers.
> 
> As nand and some other drivers do not support suspend/resume, thus
> they fail to work on system resume. So is it fine to call
> driver_unregister/driver_register during hibernation/resume for the
> drivers which do not support suspend/resume. I do not want the user to
> manually remove/insert the drivers on suspend/resume.

Don't call unregister/register for suspend/resume, that's overkill and
isn't right.  Have you taken a look at all of the in-kernel
documentation about suspend/resume that is in the Documentation/
directory?  If not, please do so, it should answer these questions for
you as to how to fix up your drivers.

Hope this helps,

greg k-h



More information about the Kernelnewbies mailing list