2 * CPUIdle support code for SH-Mobile ARM
4 * Copyright (C) 2011 Magnus Damm
6 * This file is subject to the terms and conditions of the GNU General Public
7 * License. See the file "COPYING" in the main directory of this archive
12 #include <linux/cpuidle.h>
13 #include <linux/suspend.h>
14 #include <linux/module.h>
15 #include <linux/err.h>
16 #include <asm/cpuidle.h>
19 static struct cpuidle_driver shmobile_cpuidle_default_driver = {
20 .name = "shmobile_cpuidle",
22 .states[0] = ARM_CPUIDLE_WFI_STATE,
23 .safe_state_index = 0, /* C1 */
27 static struct cpuidle_driver *cpuidle_drv = &shmobile_cpuidle_default_driver;
29 void __init shmobile_cpuidle_set_driver(struct cpuidle_driver *drv)
34 int __init shmobile_cpuidle_init(void)
36 return cpuidle_register(cpuidle_drv, NULL);