@@ -88,6 +88,9 @@ static int init_state_node(struct cpuidle_state *idle_state,
*/
strncpy(idle_state->name, state_node->name, CPUIDLE_NAME_LEN - 1);
strncpy(idle_state->desc, desc, CPUIDLE_DESC_LEN - 1);
+
+ idle_state->of_node = state_node;
+
return 0;
}
@@ -14,6 +14,7 @@
#include <linux/percpu.h>
#include <linux/list.h>
#include <linux/hrtimer.h>
+#include <linux/of.h>
#define CPUIDLE_STATE_MAX 10
#define CPUIDLE_NAME_LEN 16
@@ -36,14 +37,15 @@ struct cpuidle_state_usage {
};
struct cpuidle_state {
- char name[CPUIDLE_NAME_LEN];
- char desc[CPUIDLE_DESC_LEN];
-
- unsigned int flags;
- unsigned int exit_latency; /* in US */
- int power_usage; /* in mW */
- unsigned int target_residency; /* in US */
- bool disabled; /* disabled on all CPUs */
+ char name[CPUIDLE_NAME_LEN];
+ char desc[CPUIDLE_DESC_LEN];
+
+ unsigned int flags;
+ unsigned int exit_latency; /* in US */
+ int power_usage; /* in mW */
+ unsigned int target_residency; /* in US */
+ bool disabled; /* disabled on all CPUs */
+ struct device_node *of_node;
int (*enter) (struct cpuidle_device *dev,
struct cpuidle_driver *drv,