1 #include <linux/init.h>
2 #include <linux/suspend.h>
3 #include <asm/suspend.h>
6 static int tango_pm_powerdown(unsigned long arg
)
8 tango_suspend(virt_to_phys(cpu_resume
));
10 return -EIO
; /* tango_suspend has failed */
13 static int tango_pm_enter(suspend_state_t state
)
15 if (state
== PM_SUSPEND_MEM
)
16 return cpu_suspend(0, tango_pm_powerdown
);
21 static const struct platform_suspend_ops tango_pm_ops
= {
22 .enter
= tango_pm_enter
,
23 .valid
= suspend_valid_only_mem
,
26 static int __init
tango_pm_init(void)
28 suspend_set_ops(&tango_pm_ops
);
32 late_initcall(tango_pm_init
);