linux-pm.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] iio / PM: Replace CONFIG_PM_RUNTIME with CONFIG_PM
@ 2014-12-03  2:06 Rafael J. Wysocki
  2014-12-03 16:18 ` Srinivas Pandruvada
       [not found] ` <202529361.GBbZ7zGgn8-sKB8Sp2ER+y1GS7QM15AGw@public.gmane.org>
  0 siblings, 2 replies; 6+ messages in thread
From: Rafael J. Wysocki @ 2014-12-03  2:06 UTC (permalink / raw)
  To: linux-iio-u79uwXL29TY76Z2rM5mHXA
  Cc: Jonathan Cameron, Srinivas Pandruvada, Lars-Peter Clausen,
	Hartmut Knaack, Linux PM list, Linux Kernel Mailing List

From: Rafael J. Wysocki <rafael.j.wysocki-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>

After commit b2b49ccbdd54 (PM: Kconfig: Set PM_RUNTIME if PM_SLEEP is
selected) PM_RUNTIME is always set if PM is set, so #ifdef blocks
depending on CONFIG_PM_RUNTIME may now be changed to depend on
CONFIG_PM.

Replace CONFIG_PM_RUNTIME with CONFIG_PM everywhere under
drivers/iio/.

Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>
---

Note: This depends on commit b2b49ccbdd54 (PM: Kconfig: Set PM_RUNTIME if
PM_SLEEP is selected) which is only in linux-next at the moment (via the
linux-pm tree).

Please let me know if it is OK to take this one into linux-pm.

---
 drivers/iio/accel/bmc150-accel.c |    4 ++--
 drivers/iio/accel/kxcjk-1013.c   |    4 ++--
 drivers/iio/gyro/bmg160.c        |    4 ++--
 3 files changed, 6 insertions(+), 6 deletions(-)

Index: linux-pm/drivers/iio/accel/bmc150-accel.c
===================================================================
--- linux-pm.orig/drivers/iio/accel/bmc150-accel.c
+++ linux-pm/drivers/iio/accel/bmc150-accel.c
@@ -510,7 +510,7 @@ static int bmc150_accel_get_bw(struct bm
 	return -EINVAL;
 }
 
-#ifdef CONFIG_PM_RUNTIME
+#ifdef CONFIG_PM
 static int bmc150_accel_get_startup_times(struct bmc150_accel_data *data)
 {
 	int i;
@@ -1349,7 +1349,7 @@ static int bmc150_accel_resume(struct de
 }
 #endif
 
-#ifdef CONFIG_PM_RUNTIME
+#ifdef CONFIG_PM
 static int bmc150_accel_runtime_suspend(struct device *dev)
 {
 	struct iio_dev *indio_dev = i2c_get_clientdata(to_i2c_client(dev));
Index: linux-pm/drivers/iio/accel/kxcjk-1013.c
===================================================================
--- linux-pm.orig/drivers/iio/accel/kxcjk-1013.c
+++ linux-pm/drivers/iio/accel/kxcjk-1013.c
@@ -358,7 +358,7 @@ static int kxcjk1013_chip_init(struct kx
 	return 0;
 }
 
-#ifdef CONFIG_PM_RUNTIME
+#ifdef CONFIG_PM
 static int kxcjk1013_get_startup_times(struct kxcjk1013_data *data)
 {
 	int i;
@@ -1357,7 +1357,7 @@ static int kxcjk1013_resume(struct devic
 }
 #endif
 
-#ifdef CONFIG_PM_RUNTIME
+#ifdef CONFIG_PM
 static int kxcjk1013_runtime_suspend(struct device *dev)
 {
 	struct iio_dev *indio_dev = i2c_get_clientdata(to_i2c_client(dev));
Index: linux-pm/drivers/iio/gyro/bmg160.c
===================================================================
--- linux-pm.orig/drivers/iio/gyro/bmg160.c
+++ linux-pm/drivers/iio/gyro/bmg160.c
@@ -237,7 +237,7 @@ static int bmg160_chip_init(struct bmg16
 
 static int bmg160_set_power_state(struct bmg160_data *data, bool on)
 {
-#ifdef CONFIG_PM_RUNTIME
+#ifdef CONFIG_PM
 	int ret;
 
 	if (on)
@@ -1164,7 +1164,7 @@ static int bmg160_resume(struct device *
 }
 #endif
 
-#ifdef CONFIG_PM_RUNTIME
+#ifdef CONFIG_PM
 static int bmg160_runtime_suspend(struct device *dev)
 {
 	struct iio_dev *indio_dev = i2c_get_clientdata(to_i2c_client(dev));

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

* Re: [PATCH] iio / PM: Replace CONFIG_PM_RUNTIME with CONFIG_PM
  2014-12-03  2:06 [PATCH] iio / PM: Replace CONFIG_PM_RUNTIME with CONFIG_PM Rafael J. Wysocki
@ 2014-12-03 16:18 ` Srinivas Pandruvada
       [not found]   ` <1417623491.2043.320.camel-hINH/TbAiWppyMZ9rn1DP+ejPoqOX1/hEvhb3Hwu1Ks@public.gmane.org>
       [not found] ` <202529361.GBbZ7zGgn8-sKB8Sp2ER+y1GS7QM15AGw@public.gmane.org>
  1 sibling, 1 reply; 6+ messages in thread
From: Srinivas Pandruvada @ 2014-12-03 16:18 UTC (permalink / raw)
  To: Rafael J. Wysocki
  Cc: linux-iio, Jonathan Cameron, Lars-Peter Clausen, Hartmut Knaack,
	Linux PM list, Linux Kernel Mailing List

On Wed, 2014-12-03 at 03:06 +0100, Rafael J. Wysocki wrote: 
> From: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
> 
> After commit b2b49ccbdd54 (PM: Kconfig: Set PM_RUNTIME if PM_SLEEP is
> selected) PM_RUNTIME is always set if PM is set, so #ifdef blocks
> depending on CONFIG_PM_RUNTIME may now be changed to depend on
> CONFIG_PM.
> 
> Replace CONFIG_PM_RUNTIME with CONFIG_PM everywhere under
> drivers/iio/.
> 
> Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Acked-by: Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com>

> ---
> 
> Note: This depends on commit b2b49ccbdd54 (PM: Kconfig: Set PM_RUNTIME if
> PM_SLEEP is selected) which is only in linux-next at the moment (via the
> linux-pm tree).
> 
> Please let me know if it is OK to take this one into linux-pm.

There are some other drivers using this define, we need to change all
those.

Thanks,
Srinivas

> 
> ---
>  drivers/iio/accel/bmc150-accel.c |    4 ++--
>  drivers/iio/accel/kxcjk-1013.c   |    4 ++--
>  drivers/iio/gyro/bmg160.c        |    4 ++--
>  3 files changed, 6 insertions(+), 6 deletions(-)
> 
> Index: linux-pm/drivers/iio/accel/bmc150-accel.c
> ===================================================================
> --- linux-pm.orig/drivers/iio/accel/bmc150-accel.c
> +++ linux-pm/drivers/iio/accel/bmc150-accel.c
> @@ -510,7 +510,7 @@ static int bmc150_accel_get_bw(struct bm
>  	return -EINVAL;
>  }
>  
> -#ifdef CONFIG_PM_RUNTIME
> +#ifdef CONFIG_PM
>  static int bmc150_accel_get_startup_times(struct bmc150_accel_data *data)
>  {
>  	int i;
> @@ -1349,7 +1349,7 @@ static int bmc150_accel_resume(struct de
>  }
>  #endif
>  
> -#ifdef CONFIG_PM_RUNTIME
> +#ifdef CONFIG_PM
>  static int bmc150_accel_runtime_suspend(struct device *dev)
>  {
>  	struct iio_dev *indio_dev = i2c_get_clientdata(to_i2c_client(dev));
> Index: linux-pm/drivers/iio/accel/kxcjk-1013.c
> ===================================================================
> --- linux-pm.orig/drivers/iio/accel/kxcjk-1013.c
> +++ linux-pm/drivers/iio/accel/kxcjk-1013.c
> @@ -358,7 +358,7 @@ static int kxcjk1013_chip_init(struct kx
>  	return 0;
>  }
>  
> -#ifdef CONFIG_PM_RUNTIME
> +#ifdef CONFIG_PM
>  static int kxcjk1013_get_startup_times(struct kxcjk1013_data *data)
>  {
>  	int i;
> @@ -1357,7 +1357,7 @@ static int kxcjk1013_resume(struct devic
>  }
>  #endif
>  
> -#ifdef CONFIG_PM_RUNTIME
> +#ifdef CONFIG_PM
>  static int kxcjk1013_runtime_suspend(struct device *dev)
>  {
>  	struct iio_dev *indio_dev = i2c_get_clientdata(to_i2c_client(dev));
> Index: linux-pm/drivers/iio/gyro/bmg160.c
> ===================================================================
> --- linux-pm.orig/drivers/iio/gyro/bmg160.c
> +++ linux-pm/drivers/iio/gyro/bmg160.c
> @@ -237,7 +237,7 @@ static int bmg160_chip_init(struct bmg16
>  
>  static int bmg160_set_power_state(struct bmg160_data *data, bool on)
>  {
> -#ifdef CONFIG_PM_RUNTIME
> +#ifdef CONFIG_PM
>  	int ret;
>  
>  	if (on)
> @@ -1164,7 +1164,7 @@ static int bmg160_resume(struct device *
>  }
>  #endif
>  
> -#ifdef CONFIG_PM_RUNTIME
> +#ifdef CONFIG_PM
>  static int bmg160_runtime_suspend(struct device *dev)
>  {
>  	struct iio_dev *indio_dev = i2c_get_clientdata(to_i2c_client(dev));
> 

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

* Re: [PATCH] iio / PM: Replace CONFIG_PM_RUNTIME with CONFIG_PM
       [not found]   ` <1417623491.2043.320.camel-hINH/TbAiWppyMZ9rn1DP+ejPoqOX1/hEvhb3Hwu1Ks@public.gmane.org>
@ 2014-12-03 22:46     ` Rafael J. Wysocki
  0 siblings, 0 replies; 6+ messages in thread
From: Rafael J. Wysocki @ 2014-12-03 22:46 UTC (permalink / raw)
  To: Srinivas Pandruvada
  Cc: linux-iio-u79uwXL29TY76Z2rM5mHXA, Jonathan Cameron,
	Lars-Peter Clausen, Hartmut Knaack, Linux PM list,
	Linux Kernel Mailing List

On Wednesday, December 03, 2014 08:18:11 AM Srinivas Pandruvada wrote:
> On Wed, 2014-12-03 at 03:06 +0100, Rafael J. Wysocki wrote: 
> > From: Rafael J. Wysocki <rafael.j.wysocki-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>
> > 
> > After commit b2b49ccbdd54 (PM: Kconfig: Set PM_RUNTIME if PM_SLEEP is
> > selected) PM_RUNTIME is always set if PM is set, so #ifdef blocks
> > depending on CONFIG_PM_RUNTIME may now be changed to depend on
> > CONFIG_PM.
> > 
> > Replace CONFIG_PM_RUNTIME with CONFIG_PM everywhere under
> > drivers/iio/.
> > 
> > Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>
> Acked-by: Srinivas Pandruvada <srinivas.pandruvada-VuQAYsv1563Yd54FQh9/CA@public.gmane.org>
> 
> > ---
> > 
> > Note: This depends on commit b2b49ccbdd54 (PM: Kconfig: Set PM_RUNTIME if
> > PM_SLEEP is selected) which is only in linux-next at the moment (via the
> > linux-pm tree).
> > 
> > Please let me know if it is OK to take this one into linux-pm.
> 
> There are some other drivers using this define, we need to change all
> those.

Yes, I'm doing this everywhere, this patch is just one part of it.

-- 
I speak only for myself.
Rafael J. Wysocki, Intel Open Source Technology Center.

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

* Re: [PATCH] iio / PM: Replace CONFIG_PM_RUNTIME with CONFIG_PM
       [not found] ` <202529361.GBbZ7zGgn8-sKB8Sp2ER+y1GS7QM15AGw@public.gmane.org>
@ 2014-12-12 12:29   ` Jonathan Cameron
  2014-12-12 14:59     ` Rafael J. Wysocki
  0 siblings, 1 reply; 6+ messages in thread
From: Jonathan Cameron @ 2014-12-12 12:29 UTC (permalink / raw)
  To: Rafael J. Wysocki, linux-iio-u79uwXL29TY76Z2rM5mHXA
  Cc: Srinivas Pandruvada, Lars-Peter Clausen, Hartmut Knaack,
	Linux PM list, Linux Kernel Mailing List

On 03/12/14 02:06, Rafael J. Wysocki wrote:
> From: Rafael J. Wysocki <rafael.j.wysocki-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>
> 
> After commit b2b49ccbdd54 (PM: Kconfig: Set PM_RUNTIME if PM_SLEEP is
> selected) PM_RUNTIME is always set if PM is set, so #ifdef blocks
> depending on CONFIG_PM_RUNTIME may now be changed to depend on
> CONFIG_PM.
> 
> Replace CONFIG_PM_RUNTIME with CONFIG_PM everywhere under
> drivers/iio/.
> 
> Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>
Acked-by: Jonathan Cameron <jic23-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>
> ---
> 
> Note: This depends on commit b2b49ccbdd54 (PM: Kconfig: Set PM_RUNTIME if
> PM_SLEEP is selected) which is only in linux-next at the moment (via the
> linux-pm tree).
> 
> Please let me know if it is OK to take this one into linux-pm.
It is.  If I took too long to reply and the dependency merged
in the current window, I can take these through IIO if you'd prefer?

Thanks,

Jonathan
> 
> ---
>  drivers/iio/accel/bmc150-accel.c |    4 ++--
>  drivers/iio/accel/kxcjk-1013.c   |    4 ++--
>  drivers/iio/gyro/bmg160.c        |    4 ++--
>  3 files changed, 6 insertions(+), 6 deletions(-)
> 
> Index: linux-pm/drivers/iio/accel/bmc150-accel.c
> ===================================================================
> --- linux-pm.orig/drivers/iio/accel/bmc150-accel.c
> +++ linux-pm/drivers/iio/accel/bmc150-accel.c
> @@ -510,7 +510,7 @@ static int bmc150_accel_get_bw(struct bm
>  	return -EINVAL;
>  }
>  
> -#ifdef CONFIG_PM_RUNTIME
> +#ifdef CONFIG_PM
>  static int bmc150_accel_get_startup_times(struct bmc150_accel_data *data)
>  {
>  	int i;
> @@ -1349,7 +1349,7 @@ static int bmc150_accel_resume(struct de
>  }
>  #endif
>  
> -#ifdef CONFIG_PM_RUNTIME
> +#ifdef CONFIG_PM
>  static int bmc150_accel_runtime_suspend(struct device *dev)
>  {
>  	struct iio_dev *indio_dev = i2c_get_clientdata(to_i2c_client(dev));
> Index: linux-pm/drivers/iio/accel/kxcjk-1013.c
> ===================================================================
> --- linux-pm.orig/drivers/iio/accel/kxcjk-1013.c
> +++ linux-pm/drivers/iio/accel/kxcjk-1013.c
> @@ -358,7 +358,7 @@ static int kxcjk1013_chip_init(struct kx
>  	return 0;
>  }
>  
> -#ifdef CONFIG_PM_RUNTIME
> +#ifdef CONFIG_PM
>  static int kxcjk1013_get_startup_times(struct kxcjk1013_data *data)
>  {
>  	int i;
> @@ -1357,7 +1357,7 @@ static int kxcjk1013_resume(struct devic
>  }
>  #endif
>  
> -#ifdef CONFIG_PM_RUNTIME
> +#ifdef CONFIG_PM
>  static int kxcjk1013_runtime_suspend(struct device *dev)
>  {
>  	struct iio_dev *indio_dev = i2c_get_clientdata(to_i2c_client(dev));
> Index: linux-pm/drivers/iio/gyro/bmg160.c
> ===================================================================
> --- linux-pm.orig/drivers/iio/gyro/bmg160.c
> +++ linux-pm/drivers/iio/gyro/bmg160.c
> @@ -237,7 +237,7 @@ static int bmg160_chip_init(struct bmg16
>  
>  static int bmg160_set_power_state(struct bmg160_data *data, bool on)
>  {
> -#ifdef CONFIG_PM_RUNTIME
> +#ifdef CONFIG_PM
>  	int ret;
>  
>  	if (on)
> @@ -1164,7 +1164,7 @@ static int bmg160_resume(struct device *
>  }
>  #endif
>  
> -#ifdef CONFIG_PM_RUNTIME
> +#ifdef CONFIG_PM
>  static int bmg160_runtime_suspend(struct device *dev)
>  {
>  	struct iio_dev *indio_dev = i2c_get_clientdata(to_i2c_client(dev));
> 

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

* Re: [PATCH] iio / PM: Replace CONFIG_PM_RUNTIME with CONFIG_PM
  2014-12-12 12:29   ` Jonathan Cameron
@ 2014-12-12 14:59     ` Rafael J. Wysocki
  2014-12-12 15:26       ` Jonathan Cameron
  0 siblings, 1 reply; 6+ messages in thread
From: Rafael J. Wysocki @ 2014-12-12 14:59 UTC (permalink / raw)
  To: Jonathan Cameron
  Cc: linux-iio, Srinivas Pandruvada, Lars-Peter Clausen,
	Hartmut Knaack, Linux PM list, Linux Kernel Mailing List

On Friday, December 12, 2014 12:29:46 PM Jonathan Cameron wrote:
> On 03/12/14 02:06, Rafael J. Wysocki wrote:
> > From: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
> > 
> > After commit b2b49ccbdd54 (PM: Kconfig: Set PM_RUNTIME if PM_SLEEP is
> > selected) PM_RUNTIME is always set if PM is set, so #ifdef blocks
> > depending on CONFIG_PM_RUNTIME may now be changed to depend on
> > CONFIG_PM.
> > 
> > Replace CONFIG_PM_RUNTIME with CONFIG_PM everywhere under
> > drivers/iio/.
> > 
> > Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
> Acked-by: Jonathan Cameron <jic23@kernel.org>

Thanks!

> > ---
> > 
> > Note: This depends on commit b2b49ccbdd54 (PM: Kconfig: Set PM_RUNTIME if
> > PM_SLEEP is selected) which is only in linux-next at the moment (via the
> > linux-pm tree).
> > 
> > Please let me know if it is OK to take this one into linux-pm.
> It is.  If I took too long to reply and the dependency merged
> in the current window, I can take these through IIO if you'd prefer?

I guess it still will be more convenient to take them through linux-pm,
as I'm going to follow up with a patch that removes CONFIG_PM_RUNTIME
entirely when I'm done with all of the users of it.


-- 
I speak only for myself.
Rafael J. Wysocki, Intel Open Source Technology Center.

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

* Re: [PATCH] iio / PM: Replace CONFIG_PM_RUNTIME with CONFIG_PM
  2014-12-12 14:59     ` Rafael J. Wysocki
@ 2014-12-12 15:26       ` Jonathan Cameron
  0 siblings, 0 replies; 6+ messages in thread
From: Jonathan Cameron @ 2014-12-12 15:26 UTC (permalink / raw)
  To: Rafael J. Wysocki
  Cc: linux-iio, Srinivas Pandruvada, Lars-Peter Clausen,
	Hartmut Knaack, Linux PM list, Linux Kernel Mailing List

On 12/12/14 14:59, Rafael J. Wysocki wrote:
> On Friday, December 12, 2014 12:29:46 PM Jonathan Cameron wrote:
>> On 03/12/14 02:06, Rafael J. Wysocki wrote:
>>> From: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
>>>
>>> After commit b2b49ccbdd54 (PM: Kconfig: Set PM_RUNTIME if PM_SLEEP is
>>> selected) PM_RUNTIME is always set if PM is set, so #ifdef blocks
>>> depending on CONFIG_PM_RUNTIME may now be changed to depend on
>>> CONFIG_PM.
>>>
>>> Replace CONFIG_PM_RUNTIME with CONFIG_PM everywhere under
>>> drivers/iio/.
>>>
>>> Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
>> Acked-by: Jonathan Cameron <jic23@kernel.org>
> 
> Thanks!
> 
>>> ---
>>>
>>> Note: This depends on commit b2b49ccbdd54 (PM: Kconfig: Set PM_RUNTIME if
>>> PM_SLEEP is selected) which is only in linux-next at the moment (via the
>>> linux-pm tree).
>>>
>>> Please let me know if it is OK to take this one into linux-pm.
>> It is.  If I took too long to reply and the dependency merged
>> in the current window, I can take these through IIO if you'd prefer?
> 
> I guess it still will be more convenient to take them through linux-pm,
> as I'm going to follow up with a patch that removes CONFIG_PM_RUNTIME
> entirely when I'm done with all of the users of it.
Fine with me.
> 
> 

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

end of thread, other threads:[~2014-12-12 15:26 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-12-03  2:06 [PATCH] iio / PM: Replace CONFIG_PM_RUNTIME with CONFIG_PM Rafael J. Wysocki
2014-12-03 16:18 ` Srinivas Pandruvada
     [not found]   ` <1417623491.2043.320.camel-hINH/TbAiWppyMZ9rn1DP+ejPoqOX1/hEvhb3Hwu1Ks@public.gmane.org>
2014-12-03 22:46     ` Rafael J. Wysocki
     [not found] ` <202529361.GBbZ7zGgn8-sKB8Sp2ER+y1GS7QM15AGw@public.gmane.org>
2014-12-12 12:29   ` Jonathan Cameron
2014-12-12 14:59     ` Rafael J. Wysocki
2014-12-12 15:26       ` Jonathan Cameron

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).