]> git.karo-electronics.de Git - linux-beck.git/commitdiff
PM / OPP: Move opp core to its own directory
authorViresh Kumar <viresh.kumar@linaro.org>
Fri, 4 Sep 2015 08:17:25 +0000 (13:47 +0530)
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>
Tue, 15 Sep 2015 00:03:16 +0000 (02:03 +0200)
OPP code is expanding and is already present in multiple directories
(cpufreq and power). Lets move it to its own directory, to manage it
better.

This also moves/renames the cpufreq_opp file to cpu.c, as it will
contain helpers for cpu device. Its not just about cpufreq, other
frameworks can use OPPs as well.

Reviewed-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>
drivers/base/power/Makefile
drivers/base/power/opp/Makefile [new file with mode: 0644]
drivers/base/power/opp/core.c [moved from drivers/base/power/opp.c with 100% similarity]
drivers/base/power/opp/cpu.c [moved from drivers/cpufreq/cpufreq_opp.c with 97% similarity]
drivers/cpufreq/Makefile

index f94a6ccfe78710bb386ca17d8032f9b9f2a5dd7f..5998c53280f547cc5854a6449d41ccb95fa99c75 100644 (file)
@@ -1,7 +1,7 @@
 obj-$(CONFIG_PM)       += sysfs.o generic_ops.o common.o qos.o runtime.o wakeirq.o
 obj-$(CONFIG_PM_SLEEP) += main.o wakeup.o
 obj-$(CONFIG_PM_TRACE_RTC)     += trace.o
-obj-$(CONFIG_PM_OPP)   += opp.o
+obj-$(CONFIG_PM_OPP)   += opp/
 obj-$(CONFIG_PM_GENERIC_DOMAINS)       +=  domain.o domain_governor.o
 obj-$(CONFIG_HAVE_CLK) += clock_ops.o
 
diff --git a/drivers/base/power/opp/Makefile b/drivers/base/power/opp/Makefile
new file mode 100644 (file)
index 0000000..33c1e18
--- /dev/null
@@ -0,0 +1,2 @@
+ccflags-$(CONFIG_DEBUG_DRIVER) := -DDEBUG
+obj-y                          += core.o cpu.o
similarity index 97%
rename from drivers/cpufreq/cpufreq_opp.c
rename to drivers/base/power/opp/cpu.c
index 0f5e6d5f6da0a6d29788a79eb37cc51d2430140b..0dd033016e9d72ba6b3f275e1a2e78a17a788e0a 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Generic OPP helper interface for CPUFreq drivers
+ * Generic OPP helper interface for CPU device
  *
  * Copyright (C) 2009-2014 Texas Instruments Incorporated.
  *     Nishanth Menon
@@ -20,6 +20,7 @@
 #include <linux/rcupdate.h>
 #include <linux/slab.h>
 
+#ifdef CONFIG_CPU_FREQ
 /**
  * dev_pm_opp_init_cpufreq_table() - create a cpufreq table for a device
  * @dev:       device for which we do this operation
@@ -112,3 +113,4 @@ void dev_pm_opp_free_cpufreq_table(struct device *dev,
        *table = NULL;
 }
 EXPORT_SYMBOL_GPL(dev_pm_opp_free_cpufreq_table);
+#endif /* CONFIG_CPU_FREQ */
index 41340384f11f291c4fe93e96e73559926f4f59b1..be46ce0a358ec615a9c9ef9e9bcab3f7ba7e56bb 100644 (file)
@@ -1,6 +1,5 @@
 # CPUfreq core
 obj-$(CONFIG_CPU_FREQ)                 += cpufreq.o freq_table.o
-obj-$(CONFIG_PM_OPP)                   += cpufreq_opp.o
 
 # CPUfreq stats
 obj-$(CONFIG_CPU_FREQ_STAT)             += cpufreq_stats.o