Thread (19 messages) 19 messages, 6 authors, 2014-07-02
STALE4377d

[PATCH 1/2] cpufreq: Add support for per-policy driver data

From: viresh.kumar@linaro.org (Viresh Kumar)
Date: 2014-06-25 08:43:08
Also in: linux-arm-msm, linux-pm, lkml
Subsystem: cpu frequency scaling framework, the rest · Maintainers: "Rafael J. Wysocki", Viresh Kumar, Linus Torvalds

Drivers supporting multiple clusters or multiple 'struct cpufreq_policy'
instances may need to keep some per-policy data. If the core doesn't support
them, they might do it in the most unoptimized way: per-cpu data.

This patch adds another field in 'struct cpufreq_policy': driver_data. It isn't
accessed by core and is completely for driver's internal use.

Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>
---
 include/linux/cpufreq.h | 3 +++
 1 file changed, 3 insertions(+)
diff --git a/include/linux/cpufreq.h b/include/linux/cpufreq.h
index ec4112d..d4b1108 100644
--- a/include/linux/cpufreq.h
+++ b/include/linux/cpufreq.h
@@ -112,6 +112,9 @@ struct cpufreq_policy {
 	spinlock_t		transition_lock;
 	wait_queue_head_t	transition_wait;
 	struct task_struct	*transition_task; /* Task which is doing the transition */
+
+	/* For cpufreq driver's internal use */
+	void			*driver_data;
 };
 
 /* Only for ACPI */
-- 
2.0.0.rc2
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help