diff mbox

[V3,01/10] cpufreq: Add support for per-policy driver data

Message ID d42f24a1f00b830b17bc6d21360b6f8faf692c79.1409201048.git.viresh.kumar@linaro.org (mailing list archive)
State New, archived
Headers show

Commit Message

Viresh Kumar Aug. 28, 2014, 5:52 a.m. UTC
Drivers supporting multiple clusters or multiple 'struct cpufreq_policy'
instances may need to keep per-policy data. If the core doesn't provide support
for that, 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 for driver's internal use only.

Tested-by: Stephen Boyd <sboyd@codeaurora.org>
Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>
 include/linux/cpufreq.h | 3 +++
 1 file changed, 3 insertions(+)
diff mbox


diff --git a/include/linux/cpufreq.h b/include/linux/cpufreq.h
index 7d1955a..138336b 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 */