linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
From: Michael Ellerman <michael@ellerman.id.au>
To: Brian King <brking@linux.vnet.ibm.com>
Cc: linuxppc-dev@lists.ozlabs.org
Subject: Re: [PATCH 2/2] powerpc: Add power management support to VIO bus
Date: Mon, 10 May 2010 12:35:06 +1000	[thread overview]
Message-ID: <1273458906.6591.4.camel@concordia> (raw)
In-Reply-To: <201005071158.o47BwxPT013700@d03av03.boulder.ibm.com>

[-- Attachment #1: Type: text/plain, Size: 1348 bytes --]

On Fri, 2010-05-07 at 13:58 -0500, Brian King wrote:
> 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 |   24 ++++++++++++++++++++++++
>  1 file changed, 24 insertions(+)
> 
> 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-07 13:49:16.000000000 -0500
> +++ linux-2.6-bjking1/arch/powerpc/kernel/vio.c	2010-05-07 13:49:16.000000000 -0500
> @@ -1358,6 +1358,29 @@ 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,
> +};

That just looks like boiler plate, is there not a generic version
somewhere?

cheers


[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 198 bytes --]

  reply	other threads:[~2010-05-10  2:35 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-05-07 18:58 [PATCH 2/2] powerpc: Add power management support to VIO bus Brian King
2010-05-10  2:35 ` Michael Ellerman [this message]
2010-05-10 13:40   ` Brian King
  -- strict thread matches above, loose matches on Subject: below --
2010-02-24  0:02 Brian King

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1273458906.6591.4.camel@concordia \
    --to=michael@ellerman.id.au \
    --cc=brking@linux.vnet.ibm.com \
    --cc=linuxppc-dev@lists.ozlabs.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).