linux-pm.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Zhang Rui <rui.zhang@intel.com>
To: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Cc: Simon <horms@verge.net.au>, Magnus <magnus.damm@gmail.com>,
	Kuninori Morimoto <kuninori.morimoto.gx@gmail.com>,
	linux-pm@vger.kernel.org, Linux-SH <linux-sh@vger.kernel.org>
Subject: Re: [PATCH 2/2 v2] thermal: rcar: add pm_runtime_xxx() support
Date: Tue, 02 Apr 2013 21:19:30 +0800	[thread overview]
Message-ID: <1364908770.2190.40.camel@rzhang1-mobl4> (raw)
In-Reply-To: <87obe6itfy.wl%kuninori.morimoto.gx@renesas.com>

On Mon, 2013-03-25 at 23:08 -0700, Kuninori Morimoto wrote:
> Current rcar_thermal() didn't care about own power.
> Without this patch, rcar_thermal doesn't work on APE6 board
> 
> Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>

applied.

thanks,
rui
> ---
> v1 -> v2
> 
>  - fixup pm_runtime_xxx() timing
>  - fixup compile error
> 
>  drivers/thermal/rcar_thermal.c |   11 +++++++++++
>  1 file changed, 11 insertions(+)
> 
> diff --git a/drivers/thermal/rcar_thermal.c b/drivers/thermal/rcar_thermal.c
> index c199623..0f0f951 100644
> --- a/drivers/thermal/rcar_thermal.c
> +++ b/drivers/thermal/rcar_thermal.c
> @@ -24,6 +24,7 @@
>  #include <linux/io.h>
>  #include <linux/module.h>
>  #include <linux/platform_device.h>
> +#include <linux/pm_runtime.h>
>  #include <linux/reboot.h>
>  #include <linux/slab.h>
>  #include <linux/spinlock.h>
> @@ -377,6 +378,9 @@ static int rcar_thermal_probe(struct platform_device *pdev)
>  	spin_lock_init(&common->lock);
>  	common->dev = dev;
>  
> +	pm_runtime_enable(dev);
> +	pm_runtime_get_sync(dev);
> +
>  	irq = platform_get_resource(pdev, IORESOURCE_IRQ, 0);
>  	if (irq) {
>  		int ret;
> @@ -468,12 +472,16 @@ error_unregister:
>  			rcar_thermal_irq_disable(priv);
>  	}
>  
> +	pm_runtime_put_sync(dev);
> +	pm_runtime_disable(dev);
> +
>  	return ret;
>  }
>  
>  static int rcar_thermal_remove(struct platform_device *pdev)
>  {
>  	struct rcar_thermal_common *common = platform_get_drvdata(pdev);
> +	struct device *dev = &pdev->dev;
>  	struct rcar_thermal_priv *priv;
>  
>  	rcar_thermal_for_each_priv(priv, common) {
> @@ -484,6 +492,9 @@ static int rcar_thermal_remove(struct platform_device *pdev)
>  
>  	platform_set_drvdata(pdev, NULL);
>  
> +	pm_runtime_put_sync(dev);
> +	pm_runtime_disable(dev);
> +
>  	return 0;
>  }
>  



  reply	other threads:[~2013-04-02 13:19 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-03-25  5:48 [PATCH 0/2] thermal: rcar: fixup registration failure case Kuninori Morimoto
2013-03-25  5:49 ` [PATCH 1/2] thermal: rcar: tidyup " Kuninori Morimoto, Kuninori Morimoto
2013-03-25  8:40   ` Zhang Rui
2013-03-26  0:16     ` Kuninori Morimoto
2013-03-26  5:53       ` Kuninori Morimoto
2013-03-26  6:07         ` [PATCH 0/2 v2] thermal: rcar: fixup " Kuninori Morimoto
2013-03-26  6:08           ` [PATCH 1/2 v2] thermal: rcar: tidyup " Kuninori Morimoto
2013-04-02 13:17             ` Zhang Rui
2013-03-26  6:08           ` [PATCH 2/2 v2] thermal: rcar: add pm_runtime_xxx() support Kuninori Morimoto
2013-04-02 13:19             ` Zhang Rui [this message]
2013-03-26  6:30           ` [PATCH 0/2 v2] thermal: rcar: fixup registration failure case Zhang Rui
2013-03-26  6:45             ` Kuninori Morimoto
2013-03-25  5:50 ` [PATCH 2/2] thermal: rcar: add pm_runtime_xxx() support Kuninori Morimoto, Kuninori Morimoto

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=1364908770.2190.40.camel@rzhang1-mobl4 \
    --to=rui.zhang@intel.com \
    --cc=horms@verge.net.au \
    --cc=kuninori.morimoto.gx@gmail.com \
    --cc=kuninori.morimoto.gx@renesas.com \
    --cc=linux-pm@vger.kernel.org \
    --cc=linux-sh@vger.kernel.org \
    --cc=magnus.damm@gmail.com \
    /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).