Back to home page

OSCL-LXR

 
 

    


0001 // SPDX-License-Identifier: GPL-2.0-or-later
0002 /*
0003  * Copyright (C) 2010 Freescale Semiconductor, Inc.
0004  */
0005 
0006 #include <linux/kernel.h>
0007 #include <linux/suspend.h>
0008 #include <linux/io.h>
0009 #include "pm.h"
0010 
0011 static int mxs_suspend_enter(suspend_state_t state)
0012 {
0013     switch (state) {
0014     case PM_SUSPEND_MEM:
0015         cpu_do_idle();
0016         break;
0017 
0018     default:
0019         return -EINVAL;
0020     }
0021     return 0;
0022 }
0023 
0024 static const struct platform_suspend_ops mxs_suspend_ops = {
0025     .enter = mxs_suspend_enter,
0026     .valid = suspend_valid_only_mem,
0027 };
0028 
0029 void __init mxs_pm_init(void)
0030 {
0031     suspend_set_ops(&mxs_suspend_ops);
0032 }