blob: db0127606aedac65f61cbcf9e326cebfdeca7964 [file] [log] [blame]
Daniel Lezcano54a46442013-04-23 08:54:45 +00001/*
2 * Copyright (C) 2012 Freescale Semiconductor, Inc.
3 *
4 * This program is free software; you can redistribute it and/or modify
5 * it under the terms of the GNU General Public License version 2 as
6 * published by the Free Software Foundation.
7 */
8
9#include <linux/cpuidle.h>
10#include <linux/module.h>
11#include <asm/system_misc.h>
Marco Franchi5ea2e8a2017-09-25 15:55:58 -030012#include "cpuidle.h"
Daniel Lezcano54a46442013-04-23 08:54:45 +000013
14static int imx5_cpuidle_enter(struct cpuidle_device *dev,
15 struct cpuidle_driver *drv, int index)
16{
17 arm_pm_idle();
18 return index;
19}
20
21static struct cpuidle_driver imx5_cpuidle_driver = {
22 .name = "imx5_cpuidle",
23 .owner = THIS_MODULE,
24 .states[0] = {
25 .enter = imx5_cpuidle_enter,
26 .exit_latency = 2,
27 .target_residency = 1,
Daniel Lezcano54a46442013-04-23 08:54:45 +000028 .name = "IMX5 SRPG",
29 .desc = "CPU state retained,powered off",
30 },
31 .state_count = 1,
32};
33
34int __init imx5_cpuidle_init(void)
35{
36 return cpuidle_register(&imx5_cpuidle_driver, NULL);
37}