]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
cpufreq: Add support for per-policy driver data
authorViresh Kumar <viresh.kumar@linaro.org>
Thu, 28 Aug 2014 05:52:23 +0000 (11:22 +0530)
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>
Mon, 8 Sep 2014 23:44:40 +0000 (01:44 +0200)
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>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
include/linux/cpufreq.h

index 7d1955afa62c7c319b4467bd98139f270ed004e4..138336b6bb0437f4cc0972f7c4ce34a59bf9b2ec 100644 (file)
@@ -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 */