summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorViresh Kumar <viresh.kumar@linaro.org>2015-09-04 13:47:25 +0530
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>2015-09-15 02:03:16 +0200
commit33692dc381f9b89ddfc408631bf670ac2fd08ffc (patch)
treef5b66650807dc06131d56bb352cd68977e12ef2d
parent8f8d37b2537a28b5b2e3cb60dfc85a2a1303f99b (diff)
downloadop-kernel-dev-33692dc381f9b89ddfc408631bf670ac2fd08ffc.zip
op-kernel-dev-33692dc381f9b89ddfc408631bf670ac2fd08ffc.tar.gz
PM / OPP: Move opp core to its own directory
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>
-rw-r--r--drivers/base/power/Makefile2
-rw-r--r--drivers/base/power/opp/Makefile2
-rw-r--r--drivers/base/power/opp/core.c (renamed from drivers/base/power/opp.c)0
-rw-r--r--drivers/base/power/opp/cpu.c (renamed from drivers/cpufreq/cpufreq_opp.c)4
-rw-r--r--drivers/cpufreq/Makefile1
5 files changed, 6 insertions, 3 deletions
diff --git a/drivers/base/power/Makefile b/drivers/base/power/Makefile
index f94a6cc..5998c53 100644
--- a/drivers/base/power/Makefile
+++ b/drivers/base/power/Makefile
@@ -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
index 0000000..33c1e18
--- /dev/null
+++ b/drivers/base/power/opp/Makefile
@@ -0,0 +1,2 @@
+ccflags-$(CONFIG_DEBUG_DRIVER) := -DDEBUG
+obj-y += core.o cpu.o
diff --git a/drivers/base/power/opp.c b/drivers/base/power/opp/core.c
index aeff1cf..aeff1cf 100644
--- a/drivers/base/power/opp.c
+++ b/drivers/base/power/opp/core.c
diff --git a/drivers/cpufreq/cpufreq_opp.c b/drivers/base/power/opp/cpu.c
index 0f5e6d5..0dd0330 100644
--- a/drivers/cpufreq/cpufreq_opp.c
+++ b/drivers/base/power/opp/cpu.c
@@ -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 */
diff --git a/drivers/cpufreq/Makefile b/drivers/cpufreq/Makefile
index 4134038..be46ce0 100644
--- a/drivers/cpufreq/Makefile
+++ b/drivers/cpufreq/Makefile
@@ -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
OpenPOWER on IntegriCloud