linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 02/27] dmaengine: ste_dma: use pm_runtime_last_busy_and_autosuspend helper
       [not found] <1411575342-31048-1-git-send-email-vinod.koul@intel.com>
@ 2014-09-24 16:14 ` Vinod Koul
  2014-09-25 13:19   ` Linus Walleij
  2014-09-24 16:15 ` [PATCH 11/27] mfd: ab8500-gpadc: " Vinod Koul
  1 sibling, 1 reply; 7+ messages in thread
From: Vinod Koul @ 2014-09-24 16:14 UTC (permalink / raw)
  To: linux-arm-kernel

Use the new pm_runtime_last_busy_and_autosuspend helper instead of open
coding the same code

Signed-off-by: Vinod Koul <vinod.koul@intel.com>
---
 drivers/dma/ste_dma40.c |   30 ++++++++++--------------------
 1 files changed, 10 insertions(+), 20 deletions(-)

diff --git a/drivers/dma/ste_dma40.c b/drivers/dma/ste_dma40.c
index 5fe5933..621b941 100644
--- a/drivers/dma/ste_dma40.c
+++ b/drivers/dma/ste_dma40.c
@@ -1442,8 +1442,7 @@ static int d40_pause(struct d40_chan *d40c)
 
 	res = d40_channel_execute_command(d40c, D40_DMA_SUSPEND_REQ);
 
-	pm_runtime_mark_last_busy(d40c->base->dev);
-	pm_runtime_put_autosuspend(d40c->base->dev);
+	pm_runtime_last_busy_and_autosuspend(d40c->base->dev);
 	spin_unlock_irqrestore(&d40c->lock, flags);
 	return res;
 }
@@ -1463,8 +1462,7 @@ static int d40_resume(struct d40_chan *d40c)
 	if (d40_residue(d40c) || d40_tx_is_linked(d40c))
 		res = d40_channel_execute_command(d40c, D40_DMA_RUN);
 
-	pm_runtime_mark_last_busy(d40c->base->dev);
-	pm_runtime_put_autosuspend(d40c->base->dev);
+	pm_runtime_last_busy_and_autosuspend(d40c->base->dev);
 	spin_unlock_irqrestore(&d40c->lock, flags);
 	return res;
 }
@@ -1565,8 +1563,7 @@ static void dma_tc_handle(struct d40_chan *d40c)
 		if (d40_queue_start(d40c) == NULL) {
 			d40c->busy = false;
 
-			pm_runtime_mark_last_busy(d40c->base->dev);
-			pm_runtime_put_autosuspend(d40c->base->dev);
+			pm_runtime_last_busy_and_autosuspend(d40c->base->dev);
 		}
 
 		d40_desc_remove(d40d);
@@ -2045,18 +2042,15 @@ static int d40_free_dma(struct d40_chan *d40c)
 	else
 		d40c->base->lookup_phy_chans[phy->num] = NULL;
 
-	if (d40c->busy) {
-		pm_runtime_mark_last_busy(d40c->base->dev);
-		pm_runtime_put_autosuspend(d40c->base->dev);
-	}
+	if (d40c->busy)
+		pm_runtime_last_busy_and_autosuspend(d40c->base->dev);
 
 	d40c->busy = false;
 	d40c->phy_chan = NULL;
 	d40c->configured = false;
 out:
 
-	pm_runtime_mark_last_busy(d40c->base->dev);
-	pm_runtime_put_autosuspend(d40c->base->dev);
+	pm_runtime_last_busy_and_autosuspend(d40c->base->dev);
 	return res;
 }
 
@@ -2457,8 +2451,7 @@ static int d40_alloc_chan_resources(struct dma_chan *chan)
 	if (is_free_phy)
 		d40_config_write(d40c);
 fail:
-	pm_runtime_mark_last_busy(d40c->base->dev);
-	pm_runtime_put_autosuspend(d40c->base->dev);
+	pm_runtime_last_busy_and_autosuspend(d40c->base->dev);
 	spin_unlock_irqrestore(&d40c->lock, flags);
 	return err;
 }
@@ -2618,12 +2611,9 @@ static void d40_terminate_all(struct dma_chan *chan)
 		chan_err(d40c, "Failed to stop channel\n");
 
 	d40_term_all(d40c);
-	pm_runtime_mark_last_busy(d40c->base->dev);
-	pm_runtime_put_autosuspend(d40c->base->dev);
-	if (d40c->busy) {
-		pm_runtime_mark_last_busy(d40c->base->dev);
-		pm_runtime_put_autosuspend(d40c->base->dev);
-	}
+	pm_runtime_last_busy_and_autosuspend(d40c->base->dev);
+	if (d40c->busy)
+		pm_runtime_last_busy_and_autosuspend(d40c->base->dev);
 	d40c->busy = false;
 
 	spin_unlock_irqrestore(&d40c->lock, flags);
-- 
1.7.0.4

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

* [PATCH 11/27] mfd: ab8500-gpadc: use pm_runtime_last_busy_and_autosuspend helper
       [not found] <1411575342-31048-1-git-send-email-vinod.koul@intel.com>
  2014-09-24 16:14 ` [PATCH 02/27] dmaengine: ste_dma: use pm_runtime_last_busy_and_autosuspend helper Vinod Koul
@ 2014-09-24 16:15 ` Vinod Koul
  2014-09-26  8:38   ` Linus Walleij
  2014-10-06 21:40   ` Lee Jones
  1 sibling, 2 replies; 7+ messages in thread
From: Vinod Koul @ 2014-09-24 16:15 UTC (permalink / raw)
  To: linux-arm-kernel

Use the new pm_runtime_last_busy_and_autosuspend helper instead of open
coding the same code

Signed-off-by: Vinod Koul <vinod.koul@intel.com>
---
 drivers/mfd/ab8500-gpadc.c |    6 ++----
 1 files changed, 2 insertions(+), 4 deletions(-)

diff --git a/drivers/mfd/ab8500-gpadc.c b/drivers/mfd/ab8500-gpadc.c
index 36000f9..46bea3a 100644
--- a/drivers/mfd/ab8500-gpadc.c
+++ b/drivers/mfd/ab8500-gpadc.c
@@ -571,8 +571,7 @@ int ab8500_gpadc_double_read_raw(struct ab8500_gpadc *gpadc, u8 channel,
 	}
 
 	/* Disable VTVout LDO this is required for GPADC */
-	pm_runtime_mark_last_busy(gpadc->dev);
-	pm_runtime_put_autosuspend(gpadc->dev);
+	pm_runtime_last_busy_and_autosuspend(gpadc->dev);
 
 	mutex_unlock(&gpadc->ab8500_gpadc_lock);
 
@@ -910,8 +909,7 @@ static int ab8500_gpadc_resume(struct device *dev)
 	if (ret)
 		dev_err(dev, "Failed to enable vtvout LDO: %d\n", ret);
 
-	pm_runtime_mark_last_busy(gpadc->dev);
-	pm_runtime_put_autosuspend(gpadc->dev);
+	pm_runtime_last_busy_and_autosuspend(gpadc->dev);
 
 	mutex_unlock(&gpadc->ab8500_gpadc_lock);
 	return ret;
-- 
1.7.0.4

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

* [PATCH 02/27] dmaengine: ste_dma: use pm_runtime_last_busy_and_autosuspend helper
  2014-09-24 16:14 ` [PATCH 02/27] dmaengine: ste_dma: use pm_runtime_last_busy_and_autosuspend helper Vinod Koul
@ 2014-09-25 13:19   ` Linus Walleij
  0 siblings, 0 replies; 7+ messages in thread
From: Linus Walleij @ 2014-09-25 13:19 UTC (permalink / raw)
  To: linux-arm-kernel

On Wed, Sep 24, 2014 at 6:14 PM, Vinod Koul <vinod.koul@intel.com> wrote:

> Use the new pm_runtime_last_busy_and_autosuspend helper instead of open
> coding the same code
>
> Signed-off-by: Vinod Koul <vinod.koul@intel.com>

Reviewed-by: Linus Walleij <linus.walleij@linaro.org>

Yours,
Linus Walleij

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

* [PATCH 11/27] mfd: ab8500-gpadc: use pm_runtime_last_busy_and_autosuspend helper
  2014-09-24 16:15 ` [PATCH 11/27] mfd: ab8500-gpadc: " Vinod Koul
@ 2014-09-26  8:38   ` Linus Walleij
  2014-10-06 21:40   ` Lee Jones
  1 sibling, 0 replies; 7+ messages in thread
From: Linus Walleij @ 2014-09-26  8:38 UTC (permalink / raw)
  To: linux-arm-kernel

On Wed, Sep 24, 2014 at 6:15 PM, Vinod Koul <vinod.koul@intel.com> wrote:

> Use the new pm_runtime_last_busy_and_autosuspend helper instead of open
> coding the same code
>
> Signed-off-by: Vinod Koul <vinod.koul@intel.com>

Acked-by: Linus Walleij <linus.walleij@linaro.org>

Yours,
Linus Walleij

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

* [PATCH 11/27] mfd: ab8500-gpadc: use pm_runtime_last_busy_and_autosuspend helper
  2014-09-24 16:15 ` [PATCH 11/27] mfd: ab8500-gpadc: " Vinod Koul
  2014-09-26  8:38   ` Linus Walleij
@ 2014-10-06 21:40   ` Lee Jones
  2014-10-07  7:21     ` Lee Jones
  1 sibling, 1 reply; 7+ messages in thread
From: Lee Jones @ 2014-10-06 21:40 UTC (permalink / raw)
  To: linux-arm-kernel

On Wed, 24 Sep 2014, Vinod Koul wrote:

> Use the new pm_runtime_last_busy_and_autosuspend helper instead of open
> coding the same code
> 
> Signed-off-by: Vinod Koul <vinod.koul@intel.com>
> ---
>  drivers/mfd/ab8500-gpadc.c |    6 ++----
>  1 files changed, 2 insertions(+), 4 deletions(-)

Applied with Linus' Ack.

> diff --git a/drivers/mfd/ab8500-gpadc.c b/drivers/mfd/ab8500-gpadc.c
> index 36000f9..46bea3a 100644
> --- a/drivers/mfd/ab8500-gpadc.c
> +++ b/drivers/mfd/ab8500-gpadc.c
> @@ -571,8 +571,7 @@ int ab8500_gpadc_double_read_raw(struct ab8500_gpadc *gpadc, u8 channel,
>  	}
>  
>  	/* Disable VTVout LDO this is required for GPADC */
> -	pm_runtime_mark_last_busy(gpadc->dev);
> -	pm_runtime_put_autosuspend(gpadc->dev);
> +	pm_runtime_last_busy_and_autosuspend(gpadc->dev);
>  
>  	mutex_unlock(&gpadc->ab8500_gpadc_lock);
>  
> @@ -910,8 +909,7 @@ static int ab8500_gpadc_resume(struct device *dev)
>  	if (ret)
>  		dev_err(dev, "Failed to enable vtvout LDO: %d\n", ret);
>  
> -	pm_runtime_mark_last_busy(gpadc->dev);
> -	pm_runtime_put_autosuspend(gpadc->dev);
> +	pm_runtime_last_busy_and_autosuspend(gpadc->dev);
>  
>  	mutex_unlock(&gpadc->ab8500_gpadc_lock);
>  	return ret;

-- 
Lee Jones
Linaro STMicroelectronics Landing Team Lead
Linaro.org ? Open source software for ARM SoCs
Follow Linaro: Facebook | Twitter | Blog

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

* [PATCH 11/27] mfd: ab8500-gpadc: use pm_runtime_last_busy_and_autosuspend helper
  2014-10-06 21:40   ` Lee Jones
@ 2014-10-07  7:21     ` Lee Jones
  2014-10-07  7:38       ` Vinod Koul
  0 siblings, 1 reply; 7+ messages in thread
From: Lee Jones @ 2014-10-07  7:21 UTC (permalink / raw)
  To: linux-arm-kernel

On Mon, 06 Oct 2014, Lee Jones wrote:

> On Wed, 24 Sep 2014, Vinod Koul wrote:
> 
> > Use the new pm_runtime_last_busy_and_autosuspend helper instead of open
> > coding the same code
> > 
> > Signed-off-by: Vinod Koul <vinod.koul@intel.com>
> > ---
> >  drivers/mfd/ab8500-gpadc.c |    6 ++----
> >  1 files changed, 2 insertions(+), 4 deletions(-)
> 
> Applied with Linus' Ack.

Okay, I just had to search online for the other patches (as you left
me off PATCH 00/27).  It appears this approach has gone down like a
lead balloon.  For this reason I'm pulling these patches from my v3.19
branch.

> > diff --git a/drivers/mfd/ab8500-gpadc.c b/drivers/mfd/ab8500-gpadc.c
> > index 36000f9..46bea3a 100644
> > --- a/drivers/mfd/ab8500-gpadc.c
> > +++ b/drivers/mfd/ab8500-gpadc.c
> > @@ -571,8 +571,7 @@ int ab8500_gpadc_double_read_raw(struct ab8500_gpadc *gpadc, u8 channel,
> >  	}
> >  
> >  	/* Disable VTVout LDO this is required for GPADC */
> > -	pm_runtime_mark_last_busy(gpadc->dev);
> > -	pm_runtime_put_autosuspend(gpadc->dev);
> > +	pm_runtime_last_busy_and_autosuspend(gpadc->dev);
> >  
> >  	mutex_unlock(&gpadc->ab8500_gpadc_lock);
> >  
> > @@ -910,8 +909,7 @@ static int ab8500_gpadc_resume(struct device *dev)
> >  	if (ret)
> >  		dev_err(dev, "Failed to enable vtvout LDO: %d\n", ret);
> >  
> > -	pm_runtime_mark_last_busy(gpadc->dev);
> > -	pm_runtime_put_autosuspend(gpadc->dev);
> > +	pm_runtime_last_busy_and_autosuspend(gpadc->dev);
> >  
> >  	mutex_unlock(&gpadc->ab8500_gpadc_lock);
> >  	return ret;
> 

-- 
Lee Jones
Linaro STMicroelectronics Landing Team Lead
Linaro.org ? Open source software for ARM SoCs
Follow Linaro: Facebook | Twitter | Blog

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

* [PATCH 11/27] mfd: ab8500-gpadc: use pm_runtime_last_busy_and_autosuspend helper
  2014-10-07  7:21     ` Lee Jones
@ 2014-10-07  7:38       ` Vinod Koul
  0 siblings, 0 replies; 7+ messages in thread
From: Vinod Koul @ 2014-10-07  7:38 UTC (permalink / raw)
  To: linux-arm-kernel

On Tue, Oct 07, 2014 at 08:21:25AM +0100, Lee Jones wrote:
> On Mon, 06 Oct 2014, Lee Jones wrote:
> 
> > On Wed, 24 Sep 2014, Vinod Koul wrote:
> > 
> > > Use the new pm_runtime_last_busy_and_autosuspend helper instead of open
> > > coding the same code
> > > 
> > > Signed-off-by: Vinod Koul <vinod.koul@intel.com>
> > > ---
> > >  drivers/mfd/ab8500-gpadc.c |    6 ++----
> > >  1 files changed, 2 insertions(+), 4 deletions(-)
> > 
> > Applied with Linus' Ack.
> 
> Okay, I just had to search online for the other patches (as you left
> me off PATCH 00/27).  It appears this approach has gone down like a
> lead balloon.  For this reason I'm pulling these patches from my v3.19
> branch.
I was about to reply to you to revert.
I need to fix the script I used to do CC on 0th patch, looks like few
people were left off while collecting the names. Sorry about that

-- 
~Vinod

> 
> > > diff --git a/drivers/mfd/ab8500-gpadc.c b/drivers/mfd/ab8500-gpadc.c
> > > index 36000f9..46bea3a 100644
> > > --- a/drivers/mfd/ab8500-gpadc.c
> > > +++ b/drivers/mfd/ab8500-gpadc.c
> > > @@ -571,8 +571,7 @@ int ab8500_gpadc_double_read_raw(struct ab8500_gpadc *gpadc, u8 channel,
> > >  	}
> > >  
> > >  	/* Disable VTVout LDO this is required for GPADC */
> > > -	pm_runtime_mark_last_busy(gpadc->dev);
> > > -	pm_runtime_put_autosuspend(gpadc->dev);
> > > +	pm_runtime_last_busy_and_autosuspend(gpadc->dev);
> > >  
> > >  	mutex_unlock(&gpadc->ab8500_gpadc_lock);
> > >  
> > > @@ -910,8 +909,7 @@ static int ab8500_gpadc_resume(struct device *dev)
> > >  	if (ret)
> > >  		dev_err(dev, "Failed to enable vtvout LDO: %d\n", ret);
> > >  
> > > -	pm_runtime_mark_last_busy(gpadc->dev);
> > > -	pm_runtime_put_autosuspend(gpadc->dev);
> > > +	pm_runtime_last_busy_and_autosuspend(gpadc->dev);
> > >  
> > >  	mutex_unlock(&gpadc->ab8500_gpadc_lock);
> > >  	return ret;
> > 
> 
> -- 
> Lee Jones
> Linaro STMicroelectronics Landing Team Lead
> Linaro.org ? Open source software for ARM SoCs
> Follow Linaro: Facebook | Twitter | Blog

-- 

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

end of thread, other threads:[~2014-10-07  7:38 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <1411575342-31048-1-git-send-email-vinod.koul@intel.com>
2014-09-24 16:14 ` [PATCH 02/27] dmaengine: ste_dma: use pm_runtime_last_busy_and_autosuspend helper Vinod Koul
2014-09-25 13:19   ` Linus Walleij
2014-09-24 16:15 ` [PATCH 11/27] mfd: ab8500-gpadc: " Vinod Koul
2014-09-26  8:38   ` Linus Walleij
2014-10-06 21:40   ` Lee Jones
2014-10-07  7:21     ` Lee Jones
2014-10-07  7:38       ` Vinod Koul

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