]> git.neil.brown.name Git - history.git/commitdiff
[ARM] Add LDM suspend/resume support to SA1100 suspend code.
authorRussell King <rmk@flint.arm.linux.org.uk>
Mon, 30 Sep 2002 21:32:40 +0000 (22:32 +0100)
committerRussell King <rmk@flint.arm.linux.org.uk>
Mon, 30 Sep 2002 21:32:40 +0000 (22:32 +0100)
arch/arm/mach-sa1100/pm.c

index 1a7cebd8d28c994705eadd8ebc3cca24845f9de9..01368f31c8ceaa2f95defd6c612c89676d96b2f3 100644 (file)
@@ -193,11 +193,29 @@ static int sysctl_pm_do_suspend(void)
 {
        int retval;
 
+       /*
+        * Suspend "legacy" devices.
+        */
        retval = pm_send_all(PM_SUSPEND, (void *)3);
-
        if (retval == 0) {
+               /*
+                * Suspend LDM devices.
+                */
+               device_suspend(4, SUSPEND_NOTIFY);
+               device_suspend(4, SUSPEND_SAVE_STATE);
+               device_suspend(4, SUSPEND_DISABLE);
+
                retval = pm_do_suspend();
 
+               /*
+                * Resume LDM devices.
+                */
+               device_resume(RESUME_RESTORE_STATE);
+               device_resume(RESUME_ENABLE);
+
+               /*
+                * Resume "legacy" devices.
+                */
                pm_send_all(PM_RESUME, (void *)0);
        }