Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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>

authored by

Viresh Kumar and committed by
Rafael J. Wysocki
33692dc3 8f8d37b2

+6 -3
+1 -1
drivers/base/power/Makefile
··· 1 1 obj-$(CONFIG_PM) += sysfs.o generic_ops.o common.o qos.o runtime.o wakeirq.o 2 2 obj-$(CONFIG_PM_SLEEP) += main.o wakeup.o 3 3 obj-$(CONFIG_PM_TRACE_RTC) += trace.o 4 - obj-$(CONFIG_PM_OPP) += opp.o 4 + obj-$(CONFIG_PM_OPP) += opp/ 5 5 obj-$(CONFIG_PM_GENERIC_DOMAINS) += domain.o domain_governor.o 6 6 obj-$(CONFIG_HAVE_CLK) += clock_ops.o 7 7
drivers/base/power/opp.c drivers/base/power/opp/core.c
+2
drivers/base/power/opp/Makefile
··· 1 + ccflags-$(CONFIG_DEBUG_DRIVER) := -DDEBUG 2 + obj-y += core.o cpu.o
-1
drivers/cpufreq/Makefile
··· 1 1 # CPUfreq core 2 2 obj-$(CONFIG_CPU_FREQ) += cpufreq.o freq_table.o 3 - obj-$(CONFIG_PM_OPP) += cpufreq_opp.o 4 3 5 4 # CPUfreq stats 6 5 obj-$(CONFIG_CPU_FREQ_STAT) += cpufreq_stats.o
+3 -1
drivers/cpufreq/cpufreq_opp.c drivers/base/power/opp/cpu.c
··· 1 1 /* 2 - * Generic OPP helper interface for CPUFreq drivers 2 + * Generic OPP helper interface for CPU device 3 3 * 4 4 * Copyright (C) 2009-2014 Texas Instruments Incorporated. 5 5 * Nishanth Menon ··· 20 20 #include <linux/rcupdate.h> 21 21 #include <linux/slab.h> 22 22 23 + #ifdef CONFIG_CPU_FREQ 23 24 /** 24 25 * dev_pm_opp_init_cpufreq_table() - create a cpufreq table for a device 25 26 * @dev: device for which we do this operation ··· 113 112 *table = NULL; 114 113 } 115 114 EXPORT_SYMBOL_GPL(dev_pm_opp_free_cpufreq_table); 115 + #endif /* CONFIG_CPU_FREQ */