linux-spi.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Grant Likely <grant.likely-s3s/WqlpOiPyB63q8FvJNQ@public.gmane.org>
To: Linus Walleij <linus.walleij-0IS4wlFg1OjSUeElwK9/Pw@public.gmane.org>
Cc: spi-devel-general-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org,
	Linus Walleij
	<linus.walleij-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org>,
	Rabin Vincent
	<rabin.vincent-0IS4wlFg1OjSUeElwK9/Pw@public.gmane.org>,
	Lee Jones <lee.jones-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org>
Subject: Re: [PATCH 2/4] spi/pl022: support runtime PM
Date: Thu, 16 Jun 2011 08:27:30 -0600	[thread overview]
Message-ID: <20110616142730.GB2255@ponder.secretlab.ca> (raw)
In-Reply-To: <1308212080-22516-1-git-send-email-linus.walleij-0IS4wlFg1OjSUeElwK9/Pw@public.gmane.org>

On Thu, Jun 16, 2011 at 10:14:40AM +0200, Linus Walleij wrote:
> From: Rabin Vincent <rabin.vincent-0IS4wlFg1OjSUeElwK9/Pw@public.gmane.org>
> 
> Insert notifiers for the runtime PM API. With this the runtime
> PM layer kicks in to action where used.
> 
> Signed-off-by: Rabin Vincent <rabin.vincent-0IS4wlFg1OjSUeElwK9/Pw@public.gmane.org>
> Reviewed-by: Virupax Sadashivpetimath <virupax.sadashivpetimath-0IS4wlFg1OjSUeElwK9/Pw@public.gmane.org>
> Reviewed-by: Jonas Aberg <jonas.aberg-0IS4wlFg1OjSUeElwK9/Pw@public.gmane.org>
> Reviewed-by: Srinidhi Kasagar <srinidhi.kasagar-0IS4wlFg1OjSUeElwK9/Pw@public.gmane.org>
> [Rebased to Linux 3.0-rc3, edit description]
> Signed-off-by: Linus Walleij <linus.walleij-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org>

Applied, thanks.

g.

> ---
>  drivers/spi/spi-pl022.c |    6 ++++++
>  1 files changed, 6 insertions(+), 0 deletions(-)
> 
> diff --git a/drivers/spi/spi-pl022.c b/drivers/spi/spi-pl022.c
> index ac7c727..48fa8b0 100644
> --- a/drivers/spi/spi-pl022.c
> +++ b/drivers/spi/spi-pl022.c
> @@ -40,6 +40,7 @@
>  #include <linux/dmaengine.h>
>  #include <linux/dma-mapping.h>
>  #include <linux/scatterlist.h>
> +#include <linux/pm_runtime.h>
>  
>  /*
>   * This macro is used to define some register default values.
> @@ -517,6 +518,7 @@ static void giveback(struct pl022 *pl022)
>  	clk_disable(pl022->clk);
>  	amba_pclk_disable(pl022->adev);
>  	amba_vcore_disable(pl022->adev);
> +	pm_runtime_put(&pl022->adev->dev);
>  }
>  
>  /**
> @@ -1542,6 +1544,7 @@ static void pump_messages(struct work_struct *work)
>  	 * and core will be disabled when giveback() is called in each method
>  	 * (poll/interrupt/DMA)
>  	 */
> +	pm_runtime_get_sync(&pl022->adev->dev);
>  	amba_vcore_enable(pl022->adev);
>  	amba_pclk_enable(pl022->adev);
>  	clk_enable(pl022->clk);
> @@ -2143,6 +2146,8 @@ pl022_probe(struct amba_device *adev, const struct amba_id *id)
>  	}
>  	printk(KERN_INFO "pl022: mapped registers from 0x%08x to %p\n",
>  	       adev->res.start, pl022->virtbase);
> +	pm_runtime_enable(dev);
> +	pm_runtime_resume(dev);
>  
>  	pl022->clk = clk_get(&adev->dev, NULL);
>  	if (IS_ERR(pl022->clk)) {
> @@ -2204,6 +2209,7 @@ pl022_probe(struct amba_device *adev, const struct amba_id *id)
>  	destroy_queue(pl022);
>  	pl022_dma_remove(pl022);
>  	free_irq(adev->irq[0], pl022);
> +	pm_runtime_disable(&adev->dev);
>   err_no_irq:
>  	clk_put(pl022->clk);
>   err_no_clk:
> -- 
> 1.7.3.2
> 

------------------------------------------------------------------------------
EditLive Enterprise is the world's most technically advanced content
authoring tool. Experience the power of Track Changes, Inline Image
Editing and ensure content is compliant with Accessibility Checking.
http://p.sf.net/sfu/ephox-dev2dev

      parent reply	other threads:[~2011-06-16 14:27 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-06-16  8:14 [PATCH 2/4] spi/pl022: support runtime PM Linus Walleij
     [not found] ` <1308212080-22516-1-git-send-email-linus.walleij-0IS4wlFg1OjSUeElwK9/Pw@public.gmane.org>
2011-06-16 14:27   ` Grant Likely [this message]

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=20110616142730.GB2255@ponder.secretlab.ca \
    --to=grant.likely-s3s/wqlpoipyb63q8fvjnq@public.gmane.org \
    --cc=lee.jones-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org \
    --cc=linus.walleij-0IS4wlFg1OjSUeElwK9/Pw@public.gmane.org \
    --cc=linus.walleij-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org \
    --cc=rabin.vincent-0IS4wlFg1OjSUeElwK9/Pw@public.gmane.org \
    --cc=spi-devel-general-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.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).