linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
* [PATCHv2 2/3] powerpc: Add power management support to VIO bus
@ 2010-05-10 20:53 Brian King
  2010-05-11  5:35 ` Benjamin Herrenschmidt
  0 siblings, 1 reply; 3+ messages in thread
From: Brian King @ 2010-05-10 20:53 UTC (permalink / raw)
  To: benh; +Cc: brking, linuxppc-dev


Adds support for suspend/resume for VIO devices. This is needed for
support for HMC initiated hibernation.

Signed-off-by: Brian King <brking@linux.vnet.ibm.com>
---

 arch/powerpc/kernel/vio.c |    1 +
 1 file changed, 1 insertion(+)

diff -puN arch/powerpc/kernel/vio.c~powerpc_vio_bus_pm arch/powerpc/kernel/vio.c
--- linux-2.6/arch/powerpc/kernel/vio.c~powerpc_vio_bus_pm	2010-05-10 11:12:15.000000000 -0500
+++ linux-2.6-bjking1/arch/powerpc/kernel/vio.c	2010-05-10 11:12:15.000000000 -0500
@@ -1365,6 +1365,7 @@ static struct bus_type vio_bus_type = {
 	.match = vio_bus_match,
 	.probe = vio_bus_probe,
 	.remove = vio_bus_remove,
+	.pm = GENERIC_SUBSYS_PM_OPS,
 };
 
 /**
_

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

* Re: [PATCHv2 2/3] powerpc: Add power management support to VIO bus
  2010-05-10 20:53 [PATCHv2 2/3] powerpc: Add power management support to VIO bus Brian King
@ 2010-05-11  5:35 ` Benjamin Herrenschmidt
  2010-05-14 22:04   ` [PATCHv3 2/3] powerpc: Switch VIO Bus PM to use generic helpers Brian King
  0 siblings, 1 reply; 3+ messages in thread
From: Benjamin Herrenschmidt @ 2010-05-11  5:35 UTC (permalink / raw)
  To: Brian King; +Cc: linuxppc-dev

On Mon, 2010-05-10 at 15:53 -0500, Brian King wrote:
> Adds support for suspend/resume for VIO devices. This is needed for
> support for HMC initiated hibernation.

Your previous version of that patch is already in powerpc-next. Please
make a new patch against it.

Cheers,
Ben.

> Signed-off-by: Brian King <brking@linux.vnet.ibm.com>
> ---
> 
>  arch/powerpc/kernel/vio.c |    1 +
>  1 file changed, 1 insertion(+)
> 
> diff -puN arch/powerpc/kernel/vio.c~powerpc_vio_bus_pm arch/powerpc/kernel/vio.c
> --- linux-2.6/arch/powerpc/kernel/vio.c~powerpc_vio_bus_pm	2010-05-10 11:12:15.000000000 -0500
> +++ linux-2.6-bjking1/arch/powerpc/kernel/vio.c	2010-05-10 11:12:15.000000000 -0500
> @@ -1365,6 +1365,7 @@ static struct bus_type vio_bus_type = {
>  	.match = vio_bus_match,
>  	.probe = vio_bus_probe,
>  	.remove = vio_bus_remove,
> +	.pm = GENERIC_SUBSYS_PM_OPS,
>  };
>  
>  /**
> _

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

* [PATCHv3 2/3] powerpc: Switch VIO Bus PM to use generic helpers
  2010-05-11  5:35 ` Benjamin Herrenschmidt
@ 2010-05-14 22:04   ` Brian King
  0 siblings, 0 replies; 3+ messages in thread
From: Brian King @ 2010-05-14 22:04 UTC (permalink / raw)
  To: Benjamin Herrenschmidt; +Cc: linuxppc-dev


Switch to use the generic power management helpers.

Signed-off-by: Brian King <brking@linux.vnet.ibm.com>
---

 arch/powerpc/kernel/vio.c |   25 +------------------------
 1 file changed, 1 insertion(+), 24 deletions(-)

diff -puN arch/powerpc/kernel/vio.c~powerpc_vio_bus_pm2 arch/powerpc/kernel/vio.c
--- powerpc.git/arch/powerpc/kernel/vio.c~powerpc_vio_bus_pm2	2010-05-11 09:49:58.000000000 -0500
+++ powerpc.git-bjking1/arch/powerpc/kernel/vio.c	2010-05-11 09:50:44.000000000 -0500
@@ -1381,29 +1381,6 @@ static int vio_hotplug(struct device *de
 	return 0;
 }
 
-static int vio_pm_suspend(struct device *dev)
-{
-	const struct dev_pm_ops *pm = dev->driver ? dev->driver->pm : NULL;
-
-	if (pm && pm->suspend)
-		return pm->suspend(dev);
-	return 0;
-}
-
-static int vio_pm_resume(struct device *dev)
-{
-	const struct dev_pm_ops *pm = dev->driver ? dev->driver->pm : NULL;
-
-	if (pm && pm->resume)
-		return pm->resume(dev);
-	return 0;
-}
-
-const struct dev_pm_ops vio_dev_pm_ops = {
-	.suspend = vio_pm_suspend,
-	.resume = vio_pm_resume,
-};
-
 static struct bus_type vio_bus_type = {
 	.name = "vio",
 	.dev_attrs = vio_dev_attrs,
@@ -1411,7 +1388,7 @@ static struct bus_type vio_bus_type = {
 	.match = vio_bus_match,
 	.probe = vio_bus_probe,
 	.remove = vio_bus_remove,
-	.pm = &vio_dev_pm_ops,
+	.pm = GENERIC_SUBSYS_PM_OPS,
 };
 
 /**
_

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

end of thread, other threads:[~2010-05-14 22:04 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-05-10 20:53 [PATCHv2 2/3] powerpc: Add power management support to VIO bus Brian King
2010-05-11  5:35 ` Benjamin Herrenschmidt
2010-05-14 22:04   ` [PATCHv3 2/3] powerpc: Switch VIO Bus PM to use generic helpers Brian King

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