Loading...
1// SPDX-License-Identifier: GPL-2.0-only
2/*
3 * Copyright 2016 NXP Semiconductors
4 */
5
6#include <linux/kernel.h>
7#include <linux/suspend.h>
8#include <linux/io.h>
9#include "common.h"
10
11static int imx25_suspend_enter(suspend_state_t state)
12{
13 if (!IS_ENABLED(CONFIG_PM))
14 return 0;
15
16 switch (state) {
17 case PM_SUSPEND_MEM:
18 cpu_do_idle();
19 break;
20 default:
21 return -EINVAL;
22 }
23
24 return 0;
25}
26
27static const struct platform_suspend_ops imx25_suspend_ops = {
28 .enter = imx25_suspend_enter,
29 .valid = suspend_valid_only_mem,
30};
31
32void __init imx25_pm_init(void)
33{
34 suspend_set_ops(&imx25_suspend_ops);
35}
1// SPDX-License-Identifier: GPL-2.0-only
2/*
3 * Copyright 2016 NXP Semiconductors
4 */
5
6#include <linux/kernel.h>
7#include <linux/suspend.h>
8#include <linux/io.h>
9
10static int imx25_suspend_enter(suspend_state_t state)
11{
12 if (!IS_ENABLED(CONFIG_PM))
13 return 0;
14
15 switch (state) {
16 case PM_SUSPEND_MEM:
17 cpu_do_idle();
18 break;
19 default:
20 return -EINVAL;
21 }
22
23 return 0;
24}
25
26static const struct platform_suspend_ops imx25_suspend_ops = {
27 .enter = imx25_suspend_enter,
28 .valid = suspend_valid_only_mem,
29};
30
31void __init imx25_pm_init(void)
32{
33 suspend_set_ops(&imx25_suspend_ops);
34}