linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] rtc: rtc-s3c: use clk_prepare_enable and clk_disable_unprepare
@ 2013-04-09 14:27 Vivek Gautam
  2013-04-10  9:50 ` Sylwester Nawrocki
  0 siblings, 1 reply; 5+ messages in thread
From: Vivek Gautam @ 2013-04-09 14:27 UTC (permalink / raw)
  To: rtc-linux, linux-kernel
  Cc: linux-samsung-soc, a.zummo, kgene.kim, s.nawrocki, thomas.ab,
	dianders, Thomas Abraham, Vivek Gautam

From: Thomas Abraham <thomas.abraham@linaro.org>

Convert clk_enable/clk_disable to clk_prepare_enable/clk_disable_unprepare
calls as required by common clock framework.

Signed-off-by: Thomas Abraham <thomas.abraham@linaro.org>
Signed-off-by: Vivek Gautam <gautam.vivek@samsung.com>
---

The v1 of this patch is pretty old, but the change needs to be merged to
avoid getting those needless WARN_ON() dumps on console.

Changes from v1:
 - Not using clk_disable_unprepare() at the end of s3c_rtc_probe(), since
   this will unprepare the rtc clock which is again getting used in other
   funtions later.
 - Using clk_unprepare() at the remove() instead to fix things up.

 drivers/rtc/rtc-s3c.c |    5 +++--
 1 files changed, 3 insertions(+), 2 deletions(-)

diff --git a/drivers/rtc/rtc-s3c.c b/drivers/rtc/rtc-s3c.c
index fb994e9..e3528c9 100644
--- a/drivers/rtc/rtc-s3c.c
+++ b/drivers/rtc/rtc-s3c.c
@@ -430,6 +430,7 @@ static int s3c_rtc_remove(struct platform_device *dev)
 
 	s3c_rtc_setaie(&dev->dev, 0);
 
+	clk_unprepare(rtc_clk);
 	rtc_clk = NULL;
 
 	return 0;
@@ -498,7 +499,7 @@ static int s3c_rtc_probe(struct platform_device *pdev)
 		return ret;
 	}
 
-	clk_enable(rtc_clk);
+	clk_prepare_enable(rtc_clk);
 
 	/* check to see if everything is setup correctly */
 
@@ -578,7 +579,7 @@ static int s3c_rtc_probe(struct platform_device *pdev)
 
  err_nortc:
 	s3c_rtc_enable(pdev, 0);
-	clk_disable(rtc_clk);
+	clk_disable_unprepare(rtc_clk);
 
 	return ret;
 }
-- 
1.7.6.5


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

* Re: [PATCH] rtc: rtc-s3c: use clk_prepare_enable and clk_disable_unprepare
  2013-04-09 14:27 [PATCH] rtc: rtc-s3c: use clk_prepare_enable and clk_disable_unprepare Vivek Gautam
@ 2013-04-10  9:50 ` Sylwester Nawrocki
  2013-04-10 11:39   ` Vivek Gautam
  2013-04-11  4:09   ` Jingoo Han
  0 siblings, 2 replies; 5+ messages in thread
From: Sylwester Nawrocki @ 2013-04-10  9:50 UTC (permalink / raw)
  To: Vivek Gautam
  Cc: rtc-linux, linux-kernel, linux-samsung-soc, a.zummo, kgene.kim,
	thomas.ab, dianders, Thomas Abraham

On 04/09/2013 04:27 PM, Vivek Gautam wrote:
> From: Thomas Abraham <thomas.abraham@linaro.org>
> 
> Convert clk_enable/clk_disable to clk_prepare_enable/clk_disable_unprepare
> calls as required by common clock framework.
> 
> Signed-off-by: Thomas Abraham <thomas.abraham@linaro.org>
> Signed-off-by: Vivek Gautam <gautam.vivek@samsung.com>

Thanks Vivek.

Reviewed-by: Sylwester Nawrocki <s.nawrocki@samsung.com>

> ---
> 
> The v1 of this patch is pretty old, but the change needs to be merged to
> avoid getting those needless WARN_ON() dumps on console.
> 
> Changes from v1:
>  - Not using clk_disable_unprepare() at the end of s3c_rtc_probe(), since
>    this will unprepare the rtc clock which is again getting used in other
>    funtions later.
>  - Using clk_unprepare() at the remove() instead to fix things up.
> 
>  drivers/rtc/rtc-s3c.c |    5 +++--
>  1 files changed, 3 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/rtc/rtc-s3c.c b/drivers/rtc/rtc-s3c.c
> index fb994e9..e3528c9 100644
> --- a/drivers/rtc/rtc-s3c.c
> +++ b/drivers/rtc/rtc-s3c.c
> @@ -430,6 +430,7 @@ static int s3c_rtc_remove(struct platform_device *dev)
>  
>  	s3c_rtc_setaie(&dev->dev, 0);
>  
> +	clk_unprepare(rtc_clk);
>  	rtc_clk = NULL;
>  
>  	return 0;
> @@ -498,7 +499,7 @@ static int s3c_rtc_probe(struct platform_device *pdev)
>  		return ret;
>  	}
>  
> -	clk_enable(rtc_clk);
> +	clk_prepare_enable(rtc_clk);
>  
>  	/* check to see if everything is setup correctly */
>  
> @@ -578,7 +579,7 @@ static int s3c_rtc_probe(struct platform_device *pdev)
>  
>   err_nortc:
>  	s3c_rtc_enable(pdev, 0);
> -	clk_disable(rtc_clk);
> +	clk_disable_unprepare(rtc_clk);
>  
>  	return ret;
>  }


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

* Re: [PATCH] rtc: rtc-s3c: use clk_prepare_enable and clk_disable_unprepare
  2013-04-10  9:50 ` Sylwester Nawrocki
@ 2013-04-10 11:39   ` Vivek Gautam
  2013-04-11  4:09   ` Jingoo Han
  1 sibling, 0 replies; 5+ messages in thread
From: Vivek Gautam @ 2013-04-10 11:39 UTC (permalink / raw)
  To: Sylwester Nawrocki
  Cc: Vivek Gautam, rtc-linux, linux-kernel, linux-samsung-soc,
	a.zummo, kgene.kim, thomas.ab, dianders, Thomas Abraham

On Wed, Apr 10, 2013 at 3:20 PM, Sylwester Nawrocki
<s.nawrocki@samsung.com> wrote:
> On 04/09/2013 04:27 PM, Vivek Gautam wrote:
>> From: Thomas Abraham <thomas.abraham@linaro.org>
>>
>> Convert clk_enable/clk_disable to clk_prepare_enable/clk_disable_unprepare
>> calls as required by common clock framework.
>>
>> Signed-off-by: Thomas Abraham <thomas.abraham@linaro.org>
>> Signed-off-by: Vivek Gautam <gautam.vivek@samsung.com>
>
> Thanks Vivek.

your welcome  :-)

>
> Reviewed-by: Sylwester Nawrocki <s.nawrocki@samsung.com>
>



-- 
Thanks & Regards
Vivek

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

* Re: [PATCH] rtc: rtc-s3c: use clk_prepare_enable and clk_disable_unprepare
  2013-04-10  9:50 ` Sylwester Nawrocki
  2013-04-10 11:39   ` Vivek Gautam
@ 2013-04-11  4:09   ` Jingoo Han
  2013-04-22 17:10     ` Kukjin Kim
  1 sibling, 1 reply; 5+ messages in thread
From: Jingoo Han @ 2013-04-11  4:09 UTC (permalink / raw)
  To: 'Vivek Gautam', 'Andrew Morton'
  Cc: 'Sylwester Nawrocki',
	rtc-linux, linux-kernel, linux-samsung-soc, a.zummo, kgene.kim,
	thomas.ab, dianders, 'Thomas Abraham',
	'Jingoo Han'

On Wednesday, April 10, 2013 6:50 PM, Sylwester Nawrocki wrote:
> On 04/09/2013 04:27 PM, Vivek Gautam wrote:
> > From: Thomas Abraham <thomas.abraham@linaro.org>
> >
> > Convert clk_enable/clk_disable to clk_prepare_enable/clk_disable_unprepare
> > calls as required by common clock framework.
> >
> > Signed-off-by: Thomas Abraham <thomas.abraham@linaro.org>
> > Signed-off-by: Vivek Gautam <gautam.vivek@samsung.com>
> 
> Thanks Vivek.
> 
> Reviewed-by: Sylwester Nawrocki <s.nawrocki@samsung.com>

CC'ed Andrew Morton

It looks good.
Reviewed-by: Jingoo Han <jg1.han@samsung.com>

> 
> > ---
> >
> > The v1 of this patch is pretty old, but the change needs to be merged to
> > avoid getting those needless WARN_ON() dumps on console.
> >
> > Changes from v1:
> >  - Not using clk_disable_unprepare() at the end of s3c_rtc_probe(), since
> >    this will unprepare the rtc clock which is again getting used in other
> >    funtions later.
> >  - Using clk_unprepare() at the remove() instead to fix things up.
> >
> >  drivers/rtc/rtc-s3c.c |    5 +++--
> >  1 files changed, 3 insertions(+), 2 deletions(-)
> >
> > diff --git a/drivers/rtc/rtc-s3c.c b/drivers/rtc/rtc-s3c.c
> > index fb994e9..e3528c9 100644
> > --- a/drivers/rtc/rtc-s3c.c
> > +++ b/drivers/rtc/rtc-s3c.c
> > @@ -430,6 +430,7 @@ static int s3c_rtc_remove(struct platform_device *dev)
> >
> >  	s3c_rtc_setaie(&dev->dev, 0);
> >
> > +	clk_unprepare(rtc_clk);
> >  	rtc_clk = NULL;
> >
> >  	return 0;
> > @@ -498,7 +499,7 @@ static int s3c_rtc_probe(struct platform_device *pdev)
> >  		return ret;
> >  	}
> >
> > -	clk_enable(rtc_clk);
> > +	clk_prepare_enable(rtc_clk);
> >
> >  	/* check to see if everything is setup correctly */
> >
> > @@ -578,7 +579,7 @@ static int s3c_rtc_probe(struct platform_device *pdev)
> >
> >   err_nortc:
> >  	s3c_rtc_enable(pdev, 0);
> > -	clk_disable(rtc_clk);
> > +	clk_disable_unprepare(rtc_clk);
> >
> >  	return ret;
> >  }
> 
> --
> To unsubscribe from this list: send the line "unsubscribe linux-samsung-soc" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html


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

* Re: [PATCH] rtc: rtc-s3c: use clk_prepare_enable and clk_disable_unprepare
  2013-04-11  4:09   ` Jingoo Han
@ 2013-04-22 17:10     ` Kukjin Kim
  0 siblings, 0 replies; 5+ messages in thread
From: Kukjin Kim @ 2013-04-22 17:10 UTC (permalink / raw)
  To: Jingoo Han
  Cc: 'Vivek Gautam', 'Andrew Morton',
	'Sylwester Nawrocki',
	rtc-linux, linux-kernel, linux-samsung-soc, a.zummo, kgene.kim,
	thomas.ab, dianders, 'Thomas Abraham'

On 04/11/13 13:09, Jingoo Han wrote:
> On Wednesday, April 10, 2013 6:50 PM, Sylwester Nawrocki wrote:
>> On 04/09/2013 04:27 PM, Vivek Gautam wrote:
>>> From: Thomas Abraham<thomas.abraham@linaro.org>
>>>
>>> Convert clk_enable/clk_disable to clk_prepare_enable/clk_disable_unprepare
>>> calls as required by common clock framework.
>>>
>>> Signed-off-by: Thomas Abraham<thomas.abraham@linaro.org>
>>> Signed-off-by: Vivek Gautam<gautam.vivek@samsung.com>

Acked-by: Kukjin Kim <kgene.kim@samsung.com>

>>
>> Thanks Vivek.
>>
>> Reviewed-by: Sylwester Nawrocki<s.nawrocki@samsung.com>
>
> CC'ed Andrew Morton
>
> It looks good.
> Reviewed-by: Jingoo Han<jg1.han@samsung.com>
>
>>
>>> ---
>>>
>>> The v1 of this patch is pretty old, but the change needs to be merged to
>>> avoid getting those needless WARN_ON() dumps on console.
>>>
>>> Changes from v1:
>>>   - Not using clk_disable_unprepare() at the end of s3c_rtc_probe(), since
>>>     this will unprepare the rtc clock which is again getting used in other
>>>     funtions later.
>>>   - Using clk_unprepare() at the remove() instead to fix things up.
>>>
>>>   drivers/rtc/rtc-s3c.c |    5 +++--
>>>   1 files changed, 3 insertions(+), 2 deletions(-)
>>>
>>> diff --git a/drivers/rtc/rtc-s3c.c b/drivers/rtc/rtc-s3c.c
>>> index fb994e9..e3528c9 100644
>>> --- a/drivers/rtc/rtc-s3c.c
>>> +++ b/drivers/rtc/rtc-s3c.c
>>> @@ -430,6 +430,7 @@ static int s3c_rtc_remove(struct platform_device *dev)
>>>
>>>   	s3c_rtc_setaie(&dev->dev, 0);
>>>
>>> +	clk_unprepare(rtc_clk);
>>>   	rtc_clk = NULL;
>>>
>>>   	return 0;
>>> @@ -498,7 +499,7 @@ static int s3c_rtc_probe(struct platform_device *pdev)
>>>   		return ret;
>>>   	}
>>>
>>> -	clk_enable(rtc_clk);
>>> +	clk_prepare_enable(rtc_clk);
>>>
>>>   	/* check to see if everything is setup correctly */
>>>
>>> @@ -578,7 +579,7 @@ static int s3c_rtc_probe(struct platform_device *pdev)
>>>
>>>    err_nortc:
>>>   	s3c_rtc_enable(pdev, 0);
>>> -	clk_disable(rtc_clk);
>>> +	clk_disable_unprepare(rtc_clk);
>>>
>>>   	return ret;
>>>   }

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

end of thread, other threads:[~2013-04-22 17:10 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-04-09 14:27 [PATCH] rtc: rtc-s3c: use clk_prepare_enable and clk_disable_unprepare Vivek Gautam
2013-04-10  9:50 ` Sylwester Nawrocki
2013-04-10 11:39   ` Vivek Gautam
2013-04-11  4:09   ` Jingoo Han
2013-04-22 17:10     ` Kukjin Kim

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