/*1* Copyright (C) 2010 Freescale Semiconductor, Inc.2*3* This program is free software; you can redistribute it and/or modify4* it under the terms of the GNU General Public License as published by5* the Free Software Foundation; either version 2 of the License, or6* (at your option) any later version.7*8* This program is distributed in the hope that it will be useful,9* but WITHOUT ANY WARRANTY; without even the implied warranty of10* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the11* GNU General Public License for more details.12*/1314#include <linux/kernel.h>15#include <linux/suspend.h>16#include <linux/io.h>17#include <mach/system.h>1819static int mxs_suspend_enter(suspend_state_t state)20{21switch (state) {22case PM_SUSPEND_MEM:23arch_idle();24break;2526default:27return -EINVAL;28}29return 0;30}3132static struct platform_suspend_ops mxs_suspend_ops = {33.enter = mxs_suspend_enter,34.valid = suspend_valid_only_mem,35};3637static int __init mxs_pm_init(void)38{39suspend_set_ops(&mxs_suspend_ops);40return 0;41}42device_initcall(mxs_pm_init);434445