pinctrl: cherryview: Prevent possible interrupt storm on resume
[linux/fpc-iii.git] / arch / arm / mach-tango / pm.c
blobb05c6d6f99d072b5ef006004475776d14513745c
1 #include <linux/init.h>
2 #include <linux/suspend.h>
3 #include <asm/suspend.h>
4 #include "smc.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);
18 return -EINVAL;
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);
29 return 0;
32 late_initcall(tango_pm_init);