Merge tag 'sched-urgent-2020-12-27' of git://git.kernel.org/pub/scm/linux/kernel...
[linux/fpc-iii.git] / arch / arm / mach-imx / pm-imx25.c
blobf253e50194651e5dd3865162dc88b716951f76b8
1 // SPDX-License-Identifier: GPL-2.0-only
2 /*
3 * Copyright 2016 NXP Semiconductors
4 */
6 #include <linux/kernel.h>
7 #include <linux/suspend.h>
8 #include <linux/io.h>
10 static int imx25_suspend_enter(suspend_state_t state)
12 if (!IS_ENABLED(CONFIG_PM))
13 return 0;
15 switch (state) {
16 case PM_SUSPEND_MEM:
17 cpu_do_idle();
18 break;
19 default:
20 return -EINVAL;
23 return 0;
26 static const struct platform_suspend_ops imx25_suspend_ops = {
27 .enter = imx25_suspend_enter,
28 .valid = suspend_valid_only_mem,
31 void __init imx25_pm_init(void)
33 suspend_set_ops(&imx25_suspend_ops);