2019-06-04 11:11:33 +03:00
|
|
|
// SPDX-License-Identifier: GPL-2.0-only
|
2013-04-23 12:54:45 +04:00
|
|
|
/*
|
|
|
|
* Copyright (C) 2012 Freescale Semiconductor, Inc.
|
|
|
|
*/
|
|
|
|
|
|
|
|
#include <linux/cpuidle.h>
|
|
|
|
#include <linux/module.h>
|
|
|
|
#include <asm/system_misc.h>
|
2017-09-25 21:55:58 +03:00
|
|
|
#include "cpuidle.h"
|
2013-04-23 12:54:45 +04:00
|
|
|
|
|
|
|
static int imx5_cpuidle_enter(struct cpuidle_device *dev,
|
|
|
|
struct cpuidle_driver *drv, int index)
|
|
|
|
{
|
|
|
|
arm_pm_idle();
|
|
|
|
return index;
|
|
|
|
}
|
|
|
|
|
|
|
|
static struct cpuidle_driver imx5_cpuidle_driver = {
|
|
|
|
.name = "imx5_cpuidle",
|
|
|
|
.owner = THIS_MODULE,
|
|
|
|
.states[0] = {
|
|
|
|
.enter = imx5_cpuidle_enter,
|
|
|
|
.exit_latency = 2,
|
|
|
|
.target_residency = 1,
|
|
|
|
.name = "IMX5 SRPG",
|
|
|
|
.desc = "CPU state retained,powered off",
|
|
|
|
},
|
|
|
|
.state_count = 1,
|
|
|
|
};
|
|
|
|
|
|
|
|
int __init imx5_cpuidle_init(void)
|
|
|
|
{
|
|
|
|
return cpuidle_register(&imx5_cpuidle_driver, NULL);
|
|
|
|
}
|