public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [RESEND PATCH] misc: atmel-ssc: prepare clock only when request
@ 2014-09-24  9:33 Bo Shen
  2014-09-24 15:59 ` Nicolas Ferre
  0 siblings, 1 reply; 2+ messages in thread
From: Bo Shen @ 2014-09-24  9:33 UTC (permalink / raw)
  To: Arnd Bergmann, Greg Kroah-Hartman
  Cc: Mark Brown, nicolas.ferre, boris.brezillon, linux-arm-kernel,
	linux-kernel, Bo Shen

Prepare SSC clock only when request SSC channel, the clock will be
enabled when initialize the SSC.

Signed-off-by: Bo Shen <voice.shen@atmel.com>
---
Send this patch to driver/misc maintainer as Mark Brown suggested.

 drivers/misc/atmel-ssc.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/misc/atmel-ssc.c b/drivers/misc/atmel-ssc.c
index 60843a2..f9807a7 100644
--- a/drivers/misc/atmel-ssc.c
+++ b/drivers/misc/atmel-ssc.c
@@ -57,7 +57,7 @@ struct ssc_device *ssc_request(unsigned int ssc_num)
 	ssc->user++;
 	spin_unlock(&user_lock);
 
-	clk_prepare_enable(ssc->clk);
+	clk_prepare(ssc->clk);
 
 	return ssc;
 }
@@ -77,7 +77,7 @@ void ssc_free(struct ssc_device *ssc)
 	spin_unlock(&user_lock);
 
 	if (disable_clk)
-		clk_disable_unprepare(ssc->clk);
+		clk_unprepare(ssc->clk);
 }
 EXPORT_SYMBOL(ssc_free);
 
-- 
2.1.0.24.g4109c28


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

* Re: [RESEND PATCH] misc: atmel-ssc: prepare clock only when request
  2014-09-24  9:33 [RESEND PATCH] misc: atmel-ssc: prepare clock only when request Bo Shen
@ 2014-09-24 15:59 ` Nicolas Ferre
  0 siblings, 0 replies; 2+ messages in thread
From: Nicolas Ferre @ 2014-09-24 15:59 UTC (permalink / raw)
  To: Bo Shen, Arnd Bergmann, Greg Kroah-Hartman
  Cc: Mark Brown, boris.brezillon, linux-arm-kernel, linux-kernel

On 24/09/2014 11:33, Bo Shen :
> Prepare SSC clock only when request SSC channel, the clock will be
> enabled when initialize the SSC.
> 
> Signed-off-by: Bo Shen <voice.shen@atmel.com>

okay: it is the driver that uses the ssc that would enable the clock as
it is done in sound/soc/atmel/atmel_ssc_dai.c

Acked-by: Nicolas Ferre <nicolas.ferre@atmel.com>

Bye,

> ---
> Send this patch to driver/misc maintainer as Mark Brown suggested.
> 
>  drivers/misc/atmel-ssc.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/misc/atmel-ssc.c b/drivers/misc/atmel-ssc.c
> index 60843a2..f9807a7 100644
> --- a/drivers/misc/atmel-ssc.c
> +++ b/drivers/misc/atmel-ssc.c
> @@ -57,7 +57,7 @@ struct ssc_device *ssc_request(unsigned int ssc_num)
>  	ssc->user++;
>  	spin_unlock(&user_lock);
>  
> -	clk_prepare_enable(ssc->clk);
> +	clk_prepare(ssc->clk);
>  
>  	return ssc;
>  }
> @@ -77,7 +77,7 @@ void ssc_free(struct ssc_device *ssc)
>  	spin_unlock(&user_lock);
>  
>  	if (disable_clk)
> -		clk_disable_unprepare(ssc->clk);
> +		clk_unprepare(ssc->clk);
>  }
>  EXPORT_SYMBOL(ssc_free);
>  
> 


-- 
Nicolas Ferre

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

end of thread, other threads:[~2014-09-24 15:59 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-09-24  9:33 [RESEND PATCH] misc: atmel-ssc: prepare clock only when request Bo Shen
2014-09-24 15:59 ` Nicolas Ferre

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox