All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH/RFC] platform_bus: Allow runtime PM by default
@ 2010-03-26 17:42 Mark Brown
  0 siblings, 0 replies; 8+ messages in thread
From: Mark Brown @ 2010-03-26 17:42 UTC (permalink / raw)
  To: Greg Kroah-Hartman; +Cc: linux-pm, Mark Brown, linux-kernel

Currently the default runtime PM callbacks for platform devices return
-ENOSYS, preventing the use of runtime PM platforms until they have
provided at least a default implementation. This hinders the use of
runtime PM by devices which work with many platforms such as memory
mapped devices, MFDs and on chip IPs shared by multiple architectures.

Change the default implementation to the standard pm_generic_runtime
one, allowing drivers to use runtime PM without per-architecture
changes.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
---

I'm not 100% sure why the curret implementation returns -ENOSYS - I've
got a horrible feeling I might be breaking something somewhere.

 drivers/base/platform.c |    6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/drivers/base/platform.c b/drivers/base/platform.c
index 43479a9..eb0f8d9 100644
--- a/drivers/base/platform.c
+++ b/drivers/base/platform.c
@@ -967,17 +967,17 @@ static int platform_pm_restore_noirq(struct device *dev)
 
 int __weak platform_pm_runtime_suspend(struct device *dev)
 {
-	return -ENOSYS;
+	return pm_generic_runtime_suspend(dev);
 };
 
 int __weak platform_pm_runtime_resume(struct device *dev)
 {
-	return -ENOSYS;
+	return pm_generic_runtime_resume(dev);
 };
 
 int __weak platform_pm_runtime_idle(struct device *dev)
 {
-	return -ENOSYS;
+	return pm_generic_runtime_idle(dev);
 };
 
 #else /* !CONFIG_PM_RUNTIME */
-- 
1.7.0.2

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

* Re: [PATCH/RFC] platform_bus: Allow runtime PM by default
  2010-03-27 19:41   ` Mark Brown
  2010-03-27 23:32     ` Rafael J. Wysocki
@ 2010-03-27 23:32     ` Rafael J. Wysocki
  1 sibling, 0 replies; 8+ messages in thread
From: Rafael J. Wysocki @ 2010-03-27 23:32 UTC (permalink / raw)
  To: Mark Brown; +Cc: Greg Kroah-Hartman, linux-kernel, linux-pm

On Saturday 27 March 2010, Mark Brown wrote:
> On 26 Mar 2010, at 22:35, "Rafael J. Wysocki" <rjw@sisk.pl> wrote:
> 
> > On Friday 26 March 2010, Mark Brown wrote:
> >> Currently the default runtime PM callbacks for platform devices  
> >> return
> >> -ENOSYS, preventing the use of runtime PM platforms until they have
> >> provided at least a default implementation. This hinders the use of
> >> runtime PM by devices which work with many platforms such as memory
> >> mapped devices, MFDs and on chip IPs shared by multiple  
> >> architectures.
> >>
> >> Change the default implementation to the standard pm_generic_runtime
> >> one, allowing drivers to use runtime PM without per-architecture
> >> changes.
> >>
> >> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
> >
> > Acked-by: Rafael J. Wysocki <rjw@sisk.pl>
> >
> > Is it very urgent?
> 
> Not especially - worst case you just don't get devices suspending  
> which isn't the end of the world and there's no build time  
> dependencies introduced.

OK, so I guess it will be sufficient if Greg queues it for .35.

Rafael

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

* Re: [PATCH/RFC] platform_bus: Allow runtime PM by default
  2010-03-27 19:41   ` Mark Brown
@ 2010-03-27 23:32     ` Rafael J. Wysocki
  2010-03-27 23:32     ` Rafael J. Wysocki
  1 sibling, 0 replies; 8+ messages in thread
From: Rafael J. Wysocki @ 2010-03-27 23:32 UTC (permalink / raw)
  To: Mark Brown; +Cc: linux-pm, Greg Kroah-Hartman, linux-kernel

On Saturday 27 March 2010, Mark Brown wrote:
> On 26 Mar 2010, at 22:35, "Rafael J. Wysocki" <rjw@sisk.pl> wrote:
> 
> > On Friday 26 March 2010, Mark Brown wrote:
> >> Currently the default runtime PM callbacks for platform devices  
> >> return
> >> -ENOSYS, preventing the use of runtime PM platforms until they have
> >> provided at least a default implementation. This hinders the use of
> >> runtime PM by devices which work with many platforms such as memory
> >> mapped devices, MFDs and on chip IPs shared by multiple  
> >> architectures.
> >>
> >> Change the default implementation to the standard pm_generic_runtime
> >> one, allowing drivers to use runtime PM without per-architecture
> >> changes.
> >>
> >> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
> >
> > Acked-by: Rafael J. Wysocki <rjw@sisk.pl>
> >
> > Is it very urgent?
> 
> Not especially - worst case you just don't get devices suspending  
> which isn't the end of the world and there's no build time  
> dependencies introduced.

OK, so I guess it will be sufficient if Greg queues it for .35.

Rafael

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

* Re: [PATCH/RFC] platform_bus: Allow runtime PM by default
  2010-03-26 22:35 ` Rafael J. Wysocki
@ 2010-03-27 19:41   ` Mark Brown
  2010-03-27 23:32     ` Rafael J. Wysocki
  2010-03-27 23:32     ` Rafael J. Wysocki
  2010-03-27 19:41   ` Mark Brown
  1 sibling, 2 replies; 8+ messages in thread
From: Mark Brown @ 2010-03-27 19:41 UTC (permalink / raw)
  To: Rafael J. Wysocki; +Cc: Greg Kroah-Hartman, linux-kernel, linux-pm

On 26 Mar 2010, at 22:35, "Rafael J. Wysocki" <rjw@sisk.pl> wrote:

> On Friday 26 March 2010, Mark Brown wrote:
>> Currently the default runtime PM callbacks for platform devices  
>> return
>> -ENOSYS, preventing the use of runtime PM platforms until they have
>> provided at least a default implementation. This hinders the use of
>> runtime PM by devices which work with many platforms such as memory
>> mapped devices, MFDs and on chip IPs shared by multiple  
>> architectures.
>>
>> Change the default implementation to the standard pm_generic_runtime
>> one, allowing drivers to use runtime PM without per-architecture
>> changes.
>>
>> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
>
> Acked-by: Rafael J. Wysocki <rjw@sisk.pl>
>
> Is it very urgent?

Not especially - worst case you just don't get devices suspending  
which isn't the end of the world and there's no build time  
dependencies introduced.

>
> Rafael
>
>
>> ---
>>
>> I'm not 100% sure why the curret implementation returns -ENOSYS -  
>> I've
>> got a horrible feeling I might be breaking something somewhere.
>>
>> drivers/base/platform.c |    6 +++---
>> 1 files changed, 3 insertions(+), 3 deletions(-)
>>
>> diff --git a/drivers/base/platform.c b/drivers/base/platform.c
>> index 43479a9..eb0f8d9 100644
>> --- a/drivers/base/platform.c
>> +++ b/drivers/base/platform.c
>> @@ -967,17 +967,17 @@ static int platform_pm_restore_noirq(struct  
>> device *dev)
>>
>> int __weak platform_pm_runtime_suspend(struct device *dev)
>> {
>> -    return -ENOSYS;
>> +    return pm_generic_runtime_suspend(dev);
>> };
>>
>> int __weak platform_pm_runtime_resume(struct device *dev)
>> {
>> -    return -ENOSYS;
>> +    return pm_generic_runtime_resume(dev);
>> };
>>
>> int __weak platform_pm_runtime_idle(struct device *dev)
>> {
>> -    return -ENOSYS;
>> +    return pm_generic_runtime_idle(dev);
>> };
>>
>> #else /* !CONFIG_PM_RUNTIME */
>>
>

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

* Re: [PATCH/RFC] platform_bus: Allow runtime PM by default
  2010-03-26 22:35 ` Rafael J. Wysocki
  2010-03-27 19:41   ` Mark Brown
@ 2010-03-27 19:41   ` Mark Brown
  1 sibling, 0 replies; 8+ messages in thread
From: Mark Brown @ 2010-03-27 19:41 UTC (permalink / raw)
  To: Rafael J. Wysocki; +Cc: linux-pm, Greg Kroah-Hartman, linux-kernel

On 26 Mar 2010, at 22:35, "Rafael J. Wysocki" <rjw@sisk.pl> wrote:

> On Friday 26 March 2010, Mark Brown wrote:
>> Currently the default runtime PM callbacks for platform devices  
>> return
>> -ENOSYS, preventing the use of runtime PM platforms until they have
>> provided at least a default implementation. This hinders the use of
>> runtime PM by devices which work with many platforms such as memory
>> mapped devices, MFDs and on chip IPs shared by multiple  
>> architectures.
>>
>> Change the default implementation to the standard pm_generic_runtime
>> one, allowing drivers to use runtime PM without per-architecture
>> changes.
>>
>> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
>
> Acked-by: Rafael J. Wysocki <rjw@sisk.pl>
>
> Is it very urgent?

Not especially - worst case you just don't get devices suspending  
which isn't the end of the world and there's no build time  
dependencies introduced.

>
> Rafael
>
>
>> ---
>>
>> I'm not 100% sure why the curret implementation returns -ENOSYS -  
>> I've
>> got a horrible feeling I might be breaking something somewhere.
>>
>> drivers/base/platform.c |    6 +++---
>> 1 files changed, 3 insertions(+), 3 deletions(-)
>>
>> diff --git a/drivers/base/platform.c b/drivers/base/platform.c
>> index 43479a9..eb0f8d9 100644
>> --- a/drivers/base/platform.c
>> +++ b/drivers/base/platform.c
>> @@ -967,17 +967,17 @@ static int platform_pm_restore_noirq(struct  
>> device *dev)
>>
>> int __weak platform_pm_runtime_suspend(struct device *dev)
>> {
>> -    return -ENOSYS;
>> +    return pm_generic_runtime_suspend(dev);
>> };
>>
>> int __weak platform_pm_runtime_resume(struct device *dev)
>> {
>> -    return -ENOSYS;
>> +    return pm_generic_runtime_resume(dev);
>> };
>>
>> int __weak platform_pm_runtime_idle(struct device *dev)
>> {
>> -    return -ENOSYS;
>> +    return pm_generic_runtime_idle(dev);
>> };
>>
>> #else /* !CONFIG_PM_RUNTIME */
>>
>

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

* Re: [PATCH/RFC] platform_bus: Allow runtime PM by default
  2010-03-26 17:42 Mark Brown
@ 2010-03-26 22:35 ` Rafael J. Wysocki
  2010-03-27 19:41   ` Mark Brown
  2010-03-27 19:41   ` Mark Brown
  2010-03-26 22:35 ` Rafael J. Wysocki
  1 sibling, 2 replies; 8+ messages in thread
From: Rafael J. Wysocki @ 2010-03-26 22:35 UTC (permalink / raw)
  To: Mark Brown; +Cc: Greg Kroah-Hartman, linux-kernel, linux-pm

On Friday 26 March 2010, Mark Brown wrote:
> Currently the default runtime PM callbacks for platform devices return
> -ENOSYS, preventing the use of runtime PM platforms until they have
> provided at least a default implementation. This hinders the use of
> runtime PM by devices which work with many platforms such as memory
> mapped devices, MFDs and on chip IPs shared by multiple architectures.
> 
> Change the default implementation to the standard pm_generic_runtime
> one, allowing drivers to use runtime PM without per-architecture
> changes.
> 
> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>

Acked-by: Rafael J. Wysocki <rjw@sisk.pl>

Is it very urgent?

Rafael


> ---
> 
> I'm not 100% sure why the curret implementation returns -ENOSYS - I've
> got a horrible feeling I might be breaking something somewhere.
> 
>  drivers/base/platform.c |    6 +++---
>  1 files changed, 3 insertions(+), 3 deletions(-)
> 
> diff --git a/drivers/base/platform.c b/drivers/base/platform.c
> index 43479a9..eb0f8d9 100644
> --- a/drivers/base/platform.c
> +++ b/drivers/base/platform.c
> @@ -967,17 +967,17 @@ static int platform_pm_restore_noirq(struct device *dev)
>  
>  int __weak platform_pm_runtime_suspend(struct device *dev)
>  {
> -	return -ENOSYS;
> +	return pm_generic_runtime_suspend(dev);
>  };
>  
>  int __weak platform_pm_runtime_resume(struct device *dev)
>  {
> -	return -ENOSYS;
> +	return pm_generic_runtime_resume(dev);
>  };
>  
>  int __weak platform_pm_runtime_idle(struct device *dev)
>  {
> -	return -ENOSYS;
> +	return pm_generic_runtime_idle(dev);
>  };
>  
>  #else /* !CONFIG_PM_RUNTIME */
> 


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

* Re: [PATCH/RFC] platform_bus: Allow runtime PM by default
  2010-03-26 17:42 Mark Brown
  2010-03-26 22:35 ` Rafael J. Wysocki
@ 2010-03-26 22:35 ` Rafael J. Wysocki
  1 sibling, 0 replies; 8+ messages in thread
From: Rafael J. Wysocki @ 2010-03-26 22:35 UTC (permalink / raw)
  To: Mark Brown; +Cc: linux-pm, Greg Kroah-Hartman, linux-kernel

On Friday 26 March 2010, Mark Brown wrote:
> Currently the default runtime PM callbacks for platform devices return
> -ENOSYS, preventing the use of runtime PM platforms until they have
> provided at least a default implementation. This hinders the use of
> runtime PM by devices which work with many platforms such as memory
> mapped devices, MFDs and on chip IPs shared by multiple architectures.
> 
> Change the default implementation to the standard pm_generic_runtime
> one, allowing drivers to use runtime PM without per-architecture
> changes.
> 
> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>

Acked-by: Rafael J. Wysocki <rjw@sisk.pl>

Is it very urgent?

Rafael


> ---
> 
> I'm not 100% sure why the curret implementation returns -ENOSYS - I've
> got a horrible feeling I might be breaking something somewhere.
> 
>  drivers/base/platform.c |    6 +++---
>  1 files changed, 3 insertions(+), 3 deletions(-)
> 
> diff --git a/drivers/base/platform.c b/drivers/base/platform.c
> index 43479a9..eb0f8d9 100644
> --- a/drivers/base/platform.c
> +++ b/drivers/base/platform.c
> @@ -967,17 +967,17 @@ static int platform_pm_restore_noirq(struct device *dev)
>  
>  int __weak platform_pm_runtime_suspend(struct device *dev)
>  {
> -	return -ENOSYS;
> +	return pm_generic_runtime_suspend(dev);
>  };
>  
>  int __weak platform_pm_runtime_resume(struct device *dev)
>  {
> -	return -ENOSYS;
> +	return pm_generic_runtime_resume(dev);
>  };
>  
>  int __weak platform_pm_runtime_idle(struct device *dev)
>  {
> -	return -ENOSYS;
> +	return pm_generic_runtime_idle(dev);
>  };
>  
>  #else /* !CONFIG_PM_RUNTIME */
> 

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

* [PATCH/RFC] platform_bus: Allow runtime PM by default
@ 2010-03-26 17:42 Mark Brown
  2010-03-26 22:35 ` Rafael J. Wysocki
  2010-03-26 22:35 ` Rafael J. Wysocki
  0 siblings, 2 replies; 8+ messages in thread
From: Mark Brown @ 2010-03-26 17:42 UTC (permalink / raw)
  To: Greg Kroah-Hartman; +Cc: Rafael J. Wysocki, linux-kernel, linux-pm, Mark Brown

Currently the default runtime PM callbacks for platform devices return
-ENOSYS, preventing the use of runtime PM platforms until they have
provided at least a default implementation. This hinders the use of
runtime PM by devices which work with many platforms such as memory
mapped devices, MFDs and on chip IPs shared by multiple architectures.

Change the default implementation to the standard pm_generic_runtime
one, allowing drivers to use runtime PM without per-architecture
changes.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
---

I'm not 100% sure why the curret implementation returns -ENOSYS - I've
got a horrible feeling I might be breaking something somewhere.

 drivers/base/platform.c |    6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/drivers/base/platform.c b/drivers/base/platform.c
index 43479a9..eb0f8d9 100644
--- a/drivers/base/platform.c
+++ b/drivers/base/platform.c
@@ -967,17 +967,17 @@ static int platform_pm_restore_noirq(struct device *dev)
 
 int __weak platform_pm_runtime_suspend(struct device *dev)
 {
-	return -ENOSYS;
+	return pm_generic_runtime_suspend(dev);
 };
 
 int __weak platform_pm_runtime_resume(struct device *dev)
 {
-	return -ENOSYS;
+	return pm_generic_runtime_resume(dev);
 };
 
 int __weak platform_pm_runtime_idle(struct device *dev)
 {
-	return -ENOSYS;
+	return pm_generic_runtime_idle(dev);
 };
 
 #else /* !CONFIG_PM_RUNTIME */
-- 
1.7.0.2


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

end of thread, other threads:[~2010-03-27 23:32 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-03-26 17:42 [PATCH/RFC] platform_bus: Allow runtime PM by default Mark Brown
  -- strict thread matches above, loose matches on Subject: below --
2010-03-26 17:42 Mark Brown
2010-03-26 22:35 ` Rafael J. Wysocki
2010-03-27 19:41   ` Mark Brown
2010-03-27 23:32     ` Rafael J. Wysocki
2010-03-27 23:32     ` Rafael J. Wysocki
2010-03-27 19:41   ` Mark Brown
2010-03-26 22:35 ` Rafael J. Wysocki

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.