Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1203836 > unrolled thread

[PATCH 4/6] PM / OPP: Move opp core to its own directory

Started byViresh Kumar <viresh.kumar@linaro.org>
First post2015-08-10 08:40 +0200
Last post2015-08-11 02:30 +0200
Articles 3 — 2 participants

Back to article view | Back to linux.kernel

This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by below is the oldest one visible, not the original post.


Contents

  [PATCH 4/6] PM / OPP: Move opp core to its own directory Viresh Kumar <viresh.kumar@linaro.org> - 2015-08-10 08:40 +0200
    Re: [PATCH 4/6] PM / OPP: Move opp core to its own directory Stephen Boyd <sboyd@codeaurora.org> - 2015-08-10 22:00 +0200
      Re: [PATCH 4/6] PM / OPP: Move opp core to its own directory Viresh Kumar <viresh.kumar@linaro.org> - 2015-08-11 02:30 +0200

#1203836 — [PATCH 4/6] PM / OPP: Move opp core to its own directory

FromViresh Kumar <viresh.kumar@linaro.org>
Date2015-08-10 08:40 +0200
Subject[PATCH 4/6] PM / OPP: Move opp core to its own directory
Message-ID<pVOUy-6bs-17@gated-at.bofh.it>
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.

Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>
---
 drivers/base/power/Makefile                             | 2 +-
 drivers/base/power/opp/Makefile                         | 2 ++
 drivers/base/power/{opp.c => opp/core.c}                | 0
 drivers/{cpufreq/cpufreq_opp.c => base/power/opp/cpu.c} | 4 +++-
 drivers/cpufreq/Makefile                                | 1 -
 5 files changed, 6 insertions(+), 3 deletions(-)
 create mode 100644 drivers/base/power/opp/Makefile
 rename drivers/base/power/{opp.c => opp/core.c} (100%)
 rename drivers/{cpufreq/cpufreq_opp.c => base/power/opp/cpu.c} (97%)

diff --git a/drivers/base/power/Makefile b/drivers/base/power/Makefile
index f94a6ccfe787..7ff2726dab6c 100644
--- a/drivers/base/power/Makefile
+++ b/drivers/base/power/Makefile
@@ -1,8 +1,8 @@
 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_GENERIC_DOMAINS)	+=  domain.o domain_governor.o
 obj-$(CONFIG_HAVE_CLK)	+= clock_ops.o
+obj-$(CONFIG_PM_OPP)	+= opp/
 
 ccflags-$(CONFIG_DEBUG_DRIVER) := -DDEBUG
diff --git a/drivers/base/power/opp/Makefile b/drivers/base/power/opp/Makefile
new file mode 100644
index 000000000000..33c1e18c41a4
--- /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
similarity index 100%
rename from drivers/base/power/opp.c
rename to drivers/base/power/opp/core.c
diff --git a/drivers/cpufreq/cpufreq_opp.c b/drivers/base/power/opp/cpu.c
similarity index 97%
rename from drivers/cpufreq/cpufreq_opp.c
rename to drivers/base/power/opp/cpu.c
index 0f5e6d5f6da0..0dd033016e9d 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 2169bf792db7..2ba5b7c0bed1 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
-- 
2.4.0

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[toc] | [next] | [standalone]


#1204522

FromStephen Boyd <sboyd@codeaurora.org>
Date2015-08-10 22:00 +0200
Message-ID<pW1oK-7Mw-25@gated-at.bofh.it>
In reply to#1203836
On 08/10, Viresh Kumar wrote:
> diff --git a/drivers/base/power/Makefile b/drivers/base/power/Makefile
> index f94a6ccfe787..7ff2726dab6c 100644
> --- a/drivers/base/power/Makefile
> +++ b/drivers/base/power/Makefile
> @@ -1,8 +1,8 @@
>  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_GENERIC_DOMAINS)	+=  domain.o domain_governor.o
>  obj-$(CONFIG_HAVE_CLK)	+= clock_ops.o
> +obj-$(CONFIG_PM_OPP)	+= opp/
>  
Any reason this moved from the previous location?

-- 
Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum,
a Linux Foundation Collaborative Project
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[toc] | [prev] | [next] | [standalone]


#1204644

FromViresh Kumar <viresh.kumar@linaro.org>
Date2015-08-11 02:30 +0200
Message-ID<pW5C3-5yL-3@gated-at.bofh.it>
In reply to#1204522
On 10-08-15, 12:51, Stephen Boyd wrote:
> On 08/10, Viresh Kumar wrote:
> > diff --git a/drivers/base/power/Makefile b/drivers/base/power/Makefile
> > index f94a6ccfe787..7ff2726dab6c 100644
> > --- a/drivers/base/power/Makefile
> > +++ b/drivers/base/power/Makefile
> > @@ -1,8 +1,8 @@
> >  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_GENERIC_DOMAINS)	+=  domain.o domain_governor.o
> >  obj-$(CONFIG_HAVE_CLK)	+= clock_ops.o
> > +obj-$(CONFIG_PM_OPP)	+= opp/
> >  
> Any reason this moved from the previous location?

So that all the direct file compilation lines stay at the top and the
directory thing at the bottom. Just that order, nothing else.

> -- 
> Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum,
> a Linux Foundation Collaborative Project

-- 
viresh
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[toc] | [prev] | [standalone]


Back to top | Article view | linux.kernel


csiph-web