summaryrefslogtreecommitdiff
path: root/drivers/cpufreq/cpufreq-dt-platdev.c
diff options
context:
space:
mode:
authorViresh Kumar <viresh.kumar@linaro.org>2016-09-09 16:48:08 +0530
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>2016-09-13 02:39:12 +0200
commit297a66221d2bed61e7d74d11bf071c7b489fc33d (patch)
treee5547e9a3c08c930f1919f33e1ca32e03373db0e /drivers/cpufreq/cpufreq-dt-platdev.c
parent33cc4fc1b2147ee3cf36d02c1106456cb276c043 (diff)
cpufreq: dt: Support governor tunables per policy
The cpufreq-dt driver is also used for systems with multiple clock/voltage domains for CPUs, i.e. multiple cpufreq policies in a system. And in such cases the platform users may want to enable "governor tunables per policy". Support that via platform data, as not all users of the driver would want that behavior. Reported-by: Juri Lelli <Juri.Lelli@arm.com> Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org> Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Diffstat (limited to 'drivers/cpufreq/cpufreq-dt-platdev.c')
-rw-r--r--drivers/cpufreq/cpufreq-dt-platdev.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/drivers/cpufreq/cpufreq-dt-platdev.c b/drivers/cpufreq/cpufreq-dt-platdev.c
index 276378a43321..d2637e1a5710 100644
--- a/drivers/cpufreq/cpufreq-dt-platdev.c
+++ b/drivers/cpufreq/cpufreq-dt-platdev.c
@@ -11,6 +11,8 @@
#include <linux/of.h>
#include <linux/platform_device.h>
+#include "cpufreq-dt.h"
+
static const struct of_device_id machines[] __initconst = {
{ .compatible = "allwinner,sun4i-a10", },
{ .compatible = "allwinner,sun5i-a10s", },
@@ -93,7 +95,8 @@ static int __init cpufreq_dt_platdev_init(void)
if (!match)
return -ENODEV;
- return PTR_ERR_OR_ZERO(platform_device_register_simple("cpufreq-dt", -1,
- NULL, 0));
+ return PTR_ERR_OR_ZERO(platform_device_register_data(NULL, "cpufreq-dt",
+ -1, match->data,
+ sizeof(struct cpufreq_dt_platform_data)));
}
device_initcall(cpufreq_dt_platdev_init);