Lines Matching +full:suspend +full:- +full:to +full:- +full:idle

1 // SPDX-License-Identifier: GPL-2.0-or-later
8 * Based on arch/powerpc/platforms/44x/idle.c:
16 * See file CREDITS for list of people who contributed to this
24 #include <linux/suspend.h>
26 #include <asm/dcr-native.h>
43 unsigned int suspend; member
64 * unconditionally put to sleep when the corresponding CPM bit is in cpm_set()
66 * put to sleep, they will. Here we do not verify, we just in cpm_set()
67 * set them and expect them to eventually go off when they can. in cpm_set()
72 /* return old state, to restore later if needed */ in cpm_set()
87 /* return to initial state */ in cpm_idle_wait()
99 /* go to wait state so that CPM0_ER[CPU] can take effect */ in cpm_idle_sleep()
137 *(s-1) = '\n'; /* convert the last space to a newline */ in cpm_idle_show()
139 return s - buf; in cpm_idle_show()
151 len = p ? p - buf : n; in cpm_idle_store()
160 return -EINVAL; in cpm_idle_store()
164 __ATTR(idle, 0644, cpm_idle_show, cpm_idle_store);
173 ret = sysfs_create_file(&dev->kobj, in cpm_idle_config_sysfs()
177 "cpm: failed to create idle sysfs entry\n"); in cpm_idle_config_sysfs()
194 return !!cpm.suspend; in cpm_suspend_valid()
208 /* go to sleep state */ in cpm_suspend_standby()
222 cpm_suspend_standby(cpm.suspend); in cpm_suspend_enter()
259 ret = -EINVAL; in cpm_init()
269 ret = -EINVAL; in cpm_init()
276 printk(KERN_ERR "cpm: failed to map dcr property for %pOF\n", in cpm_init()
278 ret = -EINVAL; in cpm_init()
288 if (cpm_get_uint_property(np, "er-offset") == 0) { in cpm_init()
298 /* Now let's see what IPs to turn off for the following modes */ in cpm_init()
300 cpm.unused = cpm_get_uint_property(np, "unused-units"); in cpm_init()
301 cpm.idle_doze = cpm_get_uint_property(np, "idle-doze"); in cpm_init()
303 cpm.suspend = cpm_get_uint_property(np, "suspend"); in cpm_init()
317 if (cpm.standby || cpm.suspend) in cpm_init()