Lines Matching +full:suspend +full:- +full:to +full:- +full:idle
1 // SPDX-License-Identifier: GPL-2.0-or-later
18 * arm_cpuidle_simple_enter() - a wrapper to cpu_do_idle()
23 * A trivial wrapper to allow the cpu_do_idle function to be assigned as a
37 * arm_cpuidle_suspend() - function to enter low power idle states
43 * Returns the result of the suspend callback.
49 return cpuidle_ops[cpu].suspend(index); in arm_cpuidle_suspend()
53 * arm_cpuidle_get_ops() - find a registered cpuidle_ops by name
65 for (; m->method; m++) in arm_cpuidle_get_ops()
66 if (!strcmp(m->method, method)) in arm_cpuidle_get_ops()
67 return m->ops; in arm_cpuidle_get_ops()
73 * arm_cpuidle_read_ops() - Initialize the cpuidle ops with the device tree
74 * @dn: a pointer to a struct device node corresponding to a cpu node
77 * Get the method name defined in the 'enable-method' property, retrieve the
82 * Return 0 on sucess, -ENOENT if no 'enable-method' is defined, -EOPNOTSUPP if
83 * no cpuidle_ops is registered for the 'enable-method', or if either init or
84 * suspend callback isn't defined.
91 enable_method = of_get_property(dn, "enable-method", NULL); in arm_cpuidle_read_ops()
93 return -ENOENT; in arm_cpuidle_read_ops()
97 pr_warn("%pOF: unsupported enable-method property: %s\n", in arm_cpuidle_read_ops()
99 return -EOPNOTSUPP; in arm_cpuidle_read_ops()
102 if (!ops->init || !ops->suspend) { in arm_cpuidle_read_ops()
103 pr_warn("cpuidle_ops '%s': no init or suspend callback\n", in arm_cpuidle_read_ops()
105 return -EOPNOTSUPP; in arm_cpuidle_read_ops()
110 pr_notice("cpuidle: enable-method property '%s'" in arm_cpuidle_read_ops()
117 * arm_cpuidle_init() - Initialize cpuidle_ops for a specific cpu
118 * @cpu: the cpu to be initialized
121 * the cpu's idle initialization callback. This may fail if the underlying HW
126 * -ENODEV if it fails to find the cpu node in the device tree,
127 * -EOPNOTSUPP if it does not find a registered and valid cpuidle_ops for
129 * -ENOENT if it fails to find an 'enable-method' property,
130 * -ENXIO if the HW reports a failure or a misconfiguration,
131 * -ENOMEM if the HW report an memory allocation failure
139 return -ENODEV; in arm_cpuidle_init()