linux-pm.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH V2] PM / OPP: Move the OPP directory out of power/
@ 2017-09-26 22:12 Viresh Kumar
  2017-09-27 17:22 ` Rafael J. Wysocki
  2017-09-27 22:15 ` Stephen Boyd
  0 siblings, 2 replies; 6+ messages in thread
From: Viresh Kumar @ 2017-09-26 22:12 UTC (permalink / raw)
  To: Rafael Wysocki, Greg Kroah-Hartman, Viresh Kumar, Nishanth Menon,
	Stephen Boyd
  Cc: Viresh Kumar, linux-pm, Vincent Guittot, linux-kernel

The drivers/base/power/ directory is special and contains code related
to power management core like system suspend/resume, hibernation, etc.
It was fine to keep the OPP code inside it when we had just one file for
it, but it is growing now and already has a directory for itself.

Lets move it directly under drivers/ directory, just like cpufreq and
cpuidle.

Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>
---
V1->V2:
- Update maintainers and add a Kconfig file in drivers/opp/.

 MAINTAINERS                            |  2 +-
 drivers/Kconfig                        |  2 ++
 drivers/Makefile                       |  1 +
 drivers/base/power/Makefile            |  1 -
 drivers/opp/Kconfig                    | 13 +++++++++++++
 drivers/{base/power => }/opp/Makefile  |  0
 drivers/{base/power => }/opp/core.c    |  0
 drivers/{base/power => }/opp/cpu.c     |  0
 drivers/{base/power => }/opp/debugfs.c |  0
 drivers/{base/power => }/opp/of.c      |  0
 drivers/{base/power => }/opp/opp.h     |  0
 kernel/power/Kconfig                   | 14 --------------
 12 files changed, 17 insertions(+), 16 deletions(-)
 create mode 100644 drivers/opp/Kconfig
 rename drivers/{base/power => }/opp/Makefile (100%)
 rename drivers/{base/power => }/opp/core.c (100%)
 rename drivers/{base/power => }/opp/cpu.c (100%)
 rename drivers/{base/power => }/opp/debugfs.c (100%)
 rename drivers/{base/power => }/opp/of.c (100%)
 rename drivers/{base/power => }/opp/opp.h (100%)

diff --git a/MAINTAINERS b/MAINTAINERS
index 6671f375f7fc..d4efd224c967 100644
--- a/MAINTAINERS
+++ b/MAINTAINERS
@@ -10037,7 +10037,7 @@ M:	Stephen Boyd <sboyd@codeaurora.org>
 L:	linux-pm@vger.kernel.org
 S:	Maintained
 T:	git git://git.kernel.org/pub/scm/linux/kernel/git/vireshk/pm.git
-F:	drivers/base/power/opp/
+F:	drivers/opp/
 F:	include/linux/pm_opp.h
 F:	Documentation/power/opp.txt
 F:	Documentation/devicetree/bindings/opp/
diff --git a/drivers/Kconfig b/drivers/Kconfig
index 505c676fa9c7..9e264d410c23 100644
--- a/drivers/Kconfig
+++ b/drivers/Kconfig
@@ -208,4 +208,6 @@ source "drivers/tee/Kconfig"
 
 source "drivers/mux/Kconfig"
 
+source "drivers/opp/Kconfig"
+
 endmenu
diff --git a/drivers/Makefile b/drivers/Makefile
index d90fdc413648..dd718a3007e9 100644
--- a/drivers/Makefile
+++ b/drivers/Makefile
@@ -125,6 +125,7 @@ obj-$(CONFIG_ACCESSIBILITY)	+= accessibility/
 obj-$(CONFIG_ISDN)		+= isdn/
 obj-$(CONFIG_EDAC)		+= edac/
 obj-$(CONFIG_EISA)		+= eisa/
+obj-$(CONFIG_PM_OPP)		+= opp/
 obj-$(CONFIG_CPU_FREQ)		+= cpufreq/
 obj-$(CONFIG_CPU_IDLE)		+= cpuidle/
 obj-y				+= mmc/
diff --git a/drivers/base/power/Makefile b/drivers/base/power/Makefile
index 5998c53280f5..73a1cffc0a5f 100644
--- a/drivers/base/power/Makefile
+++ b/drivers/base/power/Makefile
@@ -1,7 +1,6 @@
 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/
 obj-$(CONFIG_PM_GENERIC_DOMAINS)	+=  domain.o domain_governor.o
 obj-$(CONFIG_HAVE_CLK)	+= clock_ops.o
 
diff --git a/drivers/opp/Kconfig b/drivers/opp/Kconfig
new file mode 100644
index 000000000000..a7fbb93f302c
--- /dev/null
+++ b/drivers/opp/Kconfig
@@ -0,0 +1,13 @@
+config PM_OPP
+	bool
+	select SRCU
+	---help---
+	  SOCs have a standard set of tuples consisting of frequency and
+	  voltage pairs that the device will support per voltage domain. This
+	  is called Operating Performance Point or OPP. The actual definitions
+	  of OPP varies over silicon within the same family of devices.
+
+	  OPP layer organizes the data internally using device pointers
+	  representing individual voltage domains and provides SOC
+	  implementations a ready to use framework to manage OPPs.
+	  For more information, read <file:Documentation/power/opp.txt>
diff --git a/drivers/base/power/opp/Makefile b/drivers/opp/Makefile
similarity index 100%
rename from drivers/base/power/opp/Makefile
rename to drivers/opp/Makefile
diff --git a/drivers/base/power/opp/core.c b/drivers/opp/core.c
similarity index 100%
rename from drivers/base/power/opp/core.c
rename to drivers/opp/core.c
diff --git a/drivers/base/power/opp/cpu.c b/drivers/opp/cpu.c
similarity index 100%
rename from drivers/base/power/opp/cpu.c
rename to drivers/opp/cpu.c
diff --git a/drivers/base/power/opp/debugfs.c b/drivers/opp/debugfs.c
similarity index 100%
rename from drivers/base/power/opp/debugfs.c
rename to drivers/opp/debugfs.c
diff --git a/drivers/base/power/opp/of.c b/drivers/opp/of.c
similarity index 100%
rename from drivers/base/power/opp/of.c
rename to drivers/opp/of.c
diff --git a/drivers/base/power/opp/opp.h b/drivers/opp/opp.h
similarity index 100%
rename from drivers/base/power/opp/opp.h
rename to drivers/opp/opp.h
diff --git a/kernel/power/Kconfig b/kernel/power/Kconfig
index e8517b63eb37..e880ca22c5a5 100644
--- a/kernel/power/Kconfig
+++ b/kernel/power/Kconfig
@@ -259,20 +259,6 @@ config APM_EMULATION
 	  anything, try disabling/enabling this option (or disabling/enabling
 	  APM in your BIOS).
 
-config PM_OPP
-	bool
-	select SRCU
-	---help---
-	  SOCs have a standard set of tuples consisting of frequency and
-	  voltage pairs that the device will support per voltage domain. This
-	  is called Operating Performance Point or OPP. The actual definitions
-	  of OPP varies over silicon within the same family of devices.
-
-	  OPP layer organizes the data internally using device pointers
-	  representing individual voltage domains and provides SOC
-	  implementations a ready to use framework to manage OPPs.
-	  For more information, read <file:Documentation/power/opp.txt>
-
 config PM_CLK
 	def_bool y
 	depends on PM && HAVE_CLK
-- 
2.7.4

^ permalink raw reply related	[flat|nested] 6+ messages in thread

* Re: [PATCH V2] PM / OPP: Move the OPP directory out of power/
  2017-09-26 22:12 [PATCH V2] PM / OPP: Move the OPP directory out of power/ Viresh Kumar
@ 2017-09-27 17:22 ` Rafael J. Wysocki
  2017-09-27 17:27   ` Viresh Kumar
  2017-09-27 22:15 ` Stephen Boyd
  1 sibling, 1 reply; 6+ messages in thread
From: Rafael J. Wysocki @ 2017-09-27 17:22 UTC (permalink / raw)
  To: Viresh Kumar
  Cc: Rafael Wysocki, Greg Kroah-Hartman, Viresh Kumar, Nishanth Menon,
	Stephen Boyd, Linux PM, Vincent Guittot,
	Linux Kernel Mailing List

On Wed, Sep 27, 2017 at 12:12 AM, Viresh Kumar <viresh.kumar@linaro.org> wrote:
> The drivers/base/power/ directory is special and contains code related
> to power management core like system suspend/resume, hibernation, etc.
> It was fine to keep the OPP code inside it when we had just one file for
> it, but it is growing now and already has a directory for itself.
>
> Lets move it directly under drivers/ directory, just like cpufreq and
> cpuidle.
>
> Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>
> ---
> V1->V2:
> - Update maintainers and add a Kconfig file in drivers/opp/.

OK, but I need an ACK from Stephen here.

And while we are at it, you, Stephen and Nishanth Menon are listed as
maintainers for it and I'm not, but I still apply OPP patches, so
maybe one of you can set up a git repo for this and send pull requests
to me instead?

Thanks,
Rafael

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH V2] PM / OPP: Move the OPP directory out of power/
  2017-09-27 17:22 ` Rafael J. Wysocki
@ 2017-09-27 17:27   ` Viresh Kumar
  2017-09-27 17:49     ` Rafael J. Wysocki
  0 siblings, 1 reply; 6+ messages in thread
From: Viresh Kumar @ 2017-09-27 17:27 UTC (permalink / raw)
  To: Rafael J. Wysocki
  Cc: Rafael Wysocki, Greg Kroah-Hartman, Viresh Kumar, Nishanth Menon,
	Stephen Boyd, Linux PM, Vincent Guittot,
	Linux Kernel Mailing List

On 27-09-17, 19:22, Rafael J. Wysocki wrote:
> On Wed, Sep 27, 2017 at 12:12 AM, Viresh Kumar <viresh.kumar@linaro.org> wrote:
> > The drivers/base/power/ directory is special and contains code related
> > to power management core like system suspend/resume, hibernation, etc.
> > It was fine to keep the OPP code inside it when we had just one file for
> > it, but it is growing now and already has a directory for itself.
> >
> > Lets move it directly under drivers/ directory, just like cpufreq and
> > cpuidle.
> >
> > Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>
> > ---
> > V1->V2:
> > - Update maintainers and add a Kconfig file in drivers/opp/.
> 
> OK, but I need an ACK from Stephen here.

Sure.

> And while we are at it, you, Stephen and Nishanth Menon are listed as
> maintainers for it and I'm not, but I still apply OPP patches, so
> maybe one of you can set up a git repo for this and send pull requests
> to me instead?

Yeah, I will setup one.

-- 
viresh

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH V2] PM / OPP: Move the OPP directory out of power/
  2017-09-27 17:27   ` Viresh Kumar
@ 2017-09-27 17:49     ` Rafael J. Wysocki
  2017-09-28  4:23       ` Viresh Kumar
  0 siblings, 1 reply; 6+ messages in thread
From: Rafael J. Wysocki @ 2017-09-27 17:49 UTC (permalink / raw)
  To: Viresh Kumar
  Cc: Rafael J. Wysocki, Rafael Wysocki, Greg Kroah-Hartman,
	Viresh Kumar, Nishanth Menon, Stephen Boyd, Linux PM,
	Vincent Guittot, Linux Kernel Mailing List

On Wed, Sep 27, 2017 at 7:27 PM, Viresh Kumar <viresh.kumar@linaro.org> wrote:
> On 27-09-17, 19:22, Rafael J. Wysocki wrote:
>> On Wed, Sep 27, 2017 at 12:12 AM, Viresh Kumar <viresh.kumar@linaro.org> wrote:
>> > The drivers/base/power/ directory is special and contains code related
>> > to power management core like system suspend/resume, hibernation, etc.
>> > It was fine to keep the OPP code inside it when we had just one file for
>> > it, but it is growing now and already has a directory for itself.
>> >
>> > Lets move it directly under drivers/ directory, just like cpufreq and
>> > cpuidle.
>> >
>> > Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>
>> > ---
>> > V1->V2:
>> > - Update maintainers and add a Kconfig file in drivers/opp/.
>>
>> OK, but I need an ACK from Stephen here.
>
> Sure.
>
>> And while we are at it, you, Stephen and Nishanth Menon are listed as
>> maintainers for it and I'm not, but I still apply OPP patches, so
>> maybe one of you can set up a git repo for this and send pull requests
>> to me instead?
>
> Yeah, I will setup one.

Actually, it is even listed in that MAINTAINERS entry already, unless
you prefer to use a different one that is. :-)

Thanks,
Rafael

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH V2] PM / OPP: Move the OPP directory out of power/
  2017-09-26 22:12 [PATCH V2] PM / OPP: Move the OPP directory out of power/ Viresh Kumar
  2017-09-27 17:22 ` Rafael J. Wysocki
@ 2017-09-27 22:15 ` Stephen Boyd
  1 sibling, 0 replies; 6+ messages in thread
From: Stephen Boyd @ 2017-09-27 22:15 UTC (permalink / raw)
  To: Viresh Kumar
  Cc: Rafael Wysocki, Greg Kroah-Hartman, Viresh Kumar, Nishanth Menon,
	linux-pm, Vincent Guittot, linux-kernel

On 09/26, Viresh Kumar wrote:
> The drivers/base/power/ directory is special and contains code related
> to power management core like system suspend/resume, hibernation, etc.
> It was fine to keep the OPP code inside it when we had just one file for
> it, but it is growing now and already has a directory for itself.
> 
> Lets move it directly under drivers/ directory, just like cpufreq and
> cpuidle.
> 
> Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>
> ---

Acked-by: Stephen Boyd <sboyd@codeaurora.org>

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

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH V2] PM / OPP: Move the OPP directory out of power/
  2017-09-27 17:49     ` Rafael J. Wysocki
@ 2017-09-28  4:23       ` Viresh Kumar
  0 siblings, 0 replies; 6+ messages in thread
From: Viresh Kumar @ 2017-09-28  4:23 UTC (permalink / raw)
  To: Rafael J. Wysocki
  Cc: Rafael Wysocki, Greg Kroah-Hartman, Viresh Kumar, Nishanth Menon,
	Stephen Boyd, Linux PM, Vincent Guittot,
	Linux Kernel Mailing List

On 27-09-17, 19:49, Rafael J. Wysocki wrote:
> Actually, it is even listed in that MAINTAINERS entry already, unless
> you prefer to use a different one that is. :-)

Yeah, that will remain the same. Thanks.

-- 
viresh

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2017-09-28  4:23 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-09-26 22:12 [PATCH V2] PM / OPP: Move the OPP directory out of power/ Viresh Kumar
2017-09-27 17:22 ` Rafael J. Wysocki
2017-09-27 17:27   ` Viresh Kumar
2017-09-27 17:49     ` Rafael J. Wysocki
2017-09-28  4:23       ` Viresh Kumar
2017-09-27 22:15 ` Stephen Boyd

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).