From 8e4bff4cab0ddac6060645b0715210484d02ff40 Mon Sep 17 00:00:00 2001 From: Yuval Adam <_@yuv.al> Date: Wed, 30 Aug 2017 08:25:59 +0000 Subject: Initial file dump from open source release --- arch/arm/mach-shmobile/cpuidle.c | 37 +++++++++++++++++++++++++++++++++++++ 1 file changed, 37 insertions(+) create mode 100644 arch/arm/mach-shmobile/cpuidle.c (limited to 'arch/arm/mach-shmobile/cpuidle.c') diff --git a/arch/arm/mach-shmobile/cpuidle.c b/arch/arm/mach-shmobile/cpuidle.c new file mode 100644 index 00000000..0afeb5c7 --- /dev/null +++ b/arch/arm/mach-shmobile/cpuidle.c @@ -0,0 +1,37 @@ +/* + * CPUIdle support code for SH-Mobile ARM + * + * Copyright (C) 2011 Magnus Damm + * + * This file is subject to the terms and conditions of the GNU General Public + * License. See the file "COPYING" in the main directory of this archive + * for more details. + */ + +#include +#include +#include +#include +#include +#include +#include + +static struct cpuidle_driver shmobile_cpuidle_default_driver = { + .name = "shmobile_cpuidle", + .owner = THIS_MODULE, + .states[0] = ARM_CPUIDLE_WFI_STATE, + .safe_state_index = 0, /* C1 */ + .state_count = 1, +}; + +static struct cpuidle_driver *cpuidle_drv = &shmobile_cpuidle_default_driver; + +void __init shmobile_cpuidle_set_driver(struct cpuidle_driver *drv) +{ + cpuidle_drv = drv; +} + +int __init shmobile_cpuidle_init(void) +{ + return cpuidle_register(cpuidle_drv, NULL); +} -- cgit v1.3.1