All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] mfd: tc6393xb: prepare/unprepare clocks
@ 2014-11-06  8:52 Dmitry Eremin-Solenikov
  2014-11-06  9:04 ` Lee Jones
  0 siblings, 1 reply; 4+ messages in thread
From: Dmitry Eremin-Solenikov @ 2014-11-06  8:52 UTC (permalink / raw)
  To: Lee Jones, Samuel Ortiz; +Cc: linux-kernel

Change clk_enable/disable() calls to clk_prepare_enable() and
clk_disable_unrepapre().

Signed-off-by: Dmitry Eremin-Solenikov <dbaryshkov@gmail.com>
---
 drivers/mfd/tc6393xb.c | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/drivers/mfd/tc6393xb.c b/drivers/mfd/tc6393xb.c
index 48579e5..abcb4eb 100644
--- a/drivers/mfd/tc6393xb.c
+++ b/drivers/mfd/tc6393xb.c
@@ -665,7 +665,7 @@ static int tc6393xb_probe(struct platform_device *dev)
 		goto err_ioremap;
 	}
 
-	ret = clk_enable(tc6393xb->clk);
+	ret = clk_prepare_enable(tc6393xb->clk);
 	if (ret)
 		goto err_clk_enable;
 
@@ -728,7 +728,7 @@ err_gpio_add:
 		temp = gpiochip_remove(&tc6393xb->gpio);
 	tcpd->disable(dev);
 err_enable:
-	clk_disable(tc6393xb->clk);
+	clk_disable_unprepare(tc6393xb->clk);
 err_clk_enable:
 	iounmap(tc6393xb->scr);
 err_ioremap:
@@ -764,7 +764,7 @@ static int tc6393xb_remove(struct platform_device *dev)
 	}
 
 	ret = tcpd->disable(dev);
-	clk_disable(tc6393xb->clk);
+	clk_disable_unprepare(tc6393xb->clk);
 	iounmap(tc6393xb->scr);
 	release_resource(&tc6393xb->rscr);
 	clk_put(tc6393xb->clk);
@@ -792,7 +792,7 @@ static int tc6393xb_suspend(struct platform_device *dev, pm_message_t state)
 			ioread8(tc6393xb->scr + SCR_GPI_BCR(i));
 	}
 	ret = tcpd->suspend(dev);
-	clk_disable(tc6393xb->clk);
+	clk_disable_unprepare(tc6393xb->clk);
 
 	return ret;
 }
@@ -804,7 +804,7 @@ static int tc6393xb_resume(struct platform_device *dev)
 	int ret;
 	int i;
 
-	clk_enable(tc6393xb->clk);
+	clk_prepare_enable(tc6393xb->clk);
 
 	ret = tcpd->resume(dev);
 	if (ret)
-- 
2.1.1


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

* Re: [PATCH] mfd: tc6393xb: prepare/unprepare clocks
  2014-11-06  8:52 [PATCH] mfd: tc6393xb: prepare/unprepare clocks Dmitry Eremin-Solenikov
@ 2014-11-06  9:04 ` Lee Jones
  2014-11-10 13:53   ` Lee Jones
  0 siblings, 1 reply; 4+ messages in thread
From: Lee Jones @ 2014-11-06  9:04 UTC (permalink / raw)
  To: Dmitry Eremin-Solenikov; +Cc: Samuel Ortiz, linux-kernel

On Thu, 06 Nov 2014, Dmitry Eremin-Solenikov wrote:

> Change clk_enable/disable() calls to clk_prepare_enable() and
> clk_disable_unrepapre().
> 
> Signed-off-by: Dmitry Eremin-Solenikov <dbaryshkov@gmail.com>
> ---
>  drivers/mfd/tc6393xb.c | 10 +++++-----
>  1 file changed, 5 insertions(+), 5 deletions(-)

Applied, thanks.

> diff --git a/drivers/mfd/tc6393xb.c b/drivers/mfd/tc6393xb.c
> index 48579e5..abcb4eb 100644
> --- a/drivers/mfd/tc6393xb.c
> +++ b/drivers/mfd/tc6393xb.c
> @@ -665,7 +665,7 @@ static int tc6393xb_probe(struct platform_device *dev)
>  		goto err_ioremap;
>  	}
>  
> -	ret = clk_enable(tc6393xb->clk);
> +	ret = clk_prepare_enable(tc6393xb->clk);
>  	if (ret)
>  		goto err_clk_enable;
>  
> @@ -728,7 +728,7 @@ err_gpio_add:
>  		temp = gpiochip_remove(&tc6393xb->gpio);
>  	tcpd->disable(dev);
>  err_enable:
> -	clk_disable(tc6393xb->clk);
> +	clk_disable_unprepare(tc6393xb->clk);
>  err_clk_enable:
>  	iounmap(tc6393xb->scr);
>  err_ioremap:
> @@ -764,7 +764,7 @@ static int tc6393xb_remove(struct platform_device *dev)
>  	}
>  
>  	ret = tcpd->disable(dev);
> -	clk_disable(tc6393xb->clk);
> +	clk_disable_unprepare(tc6393xb->clk);
>  	iounmap(tc6393xb->scr);
>  	release_resource(&tc6393xb->rscr);
>  	clk_put(tc6393xb->clk);
> @@ -792,7 +792,7 @@ static int tc6393xb_suspend(struct platform_device *dev, pm_message_t state)
>  			ioread8(tc6393xb->scr + SCR_GPI_BCR(i));
>  	}
>  	ret = tcpd->suspend(dev);
> -	clk_disable(tc6393xb->clk);
> +	clk_disable_unprepare(tc6393xb->clk);
>  
>  	return ret;
>  }
> @@ -804,7 +804,7 @@ static int tc6393xb_resume(struct platform_device *dev)
>  	int ret;
>  	int i;
>  
> -	clk_enable(tc6393xb->clk);
> +	clk_prepare_enable(tc6393xb->clk);
>  
>  	ret = tcpd->resume(dev);
>  	if (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] 4+ messages in thread

* Re: [PATCH] mfd: tc6393xb: prepare/unprepare clocks
  2014-11-06  9:04 ` Lee Jones
@ 2014-11-10 13:53   ` Lee Jones
  2014-11-10 14:03     ` Dmitry Eremin-Solenikov
  0 siblings, 1 reply; 4+ messages in thread
From: Lee Jones @ 2014-11-10 13:53 UTC (permalink / raw)
  To: Dmitry Eremin-Solenikov; +Cc: Samuel Ortiz, linux-kernel

On Thu, 06 Nov 2014, Lee Jones wrote:

> On Thu, 06 Nov 2014, Dmitry Eremin-Solenikov wrote:
> 
> > Change clk_enable/disable() calls to clk_prepare_enable() and
> > clk_disable_unrepapre().
> > 
> > Signed-off-by: Dmitry Eremin-Solenikov <dbaryshkov@gmail.com>
> > ---
> >  drivers/mfd/tc6393xb.c | 10 +++++-----
> >  1 file changed, 5 insertions(+), 5 deletions(-)
> 
> Applied, thanks.

OOI, what kernel version was this patch based on?

> > diff --git a/drivers/mfd/tc6393xb.c b/drivers/mfd/tc6393xb.c
> > index 48579e5..abcb4eb 100644
> > --- a/drivers/mfd/tc6393xb.c
> > +++ b/drivers/mfd/tc6393xb.c
> > @@ -665,7 +665,7 @@ static int tc6393xb_probe(struct platform_device *dev)
> >  		goto err_ioremap;
> >  	}
> >  
> > -	ret = clk_enable(tc6393xb->clk);
> > +	ret = clk_prepare_enable(tc6393xb->clk);
> >  	if (ret)
> >  		goto err_clk_enable;
> >  
> > @@ -728,7 +728,7 @@ err_gpio_add:
> >  		temp = gpiochip_remove(&tc6393xb->gpio);
> >  	tcpd->disable(dev);
> >  err_enable:
> > -	clk_disable(tc6393xb->clk);
> > +	clk_disable_unprepare(tc6393xb->clk);
> >  err_clk_enable:
> >  	iounmap(tc6393xb->scr);
> >  err_ioremap:
> > @@ -764,7 +764,7 @@ static int tc6393xb_remove(struct platform_device *dev)
> >  	}
> >  
> >  	ret = tcpd->disable(dev);
> > -	clk_disable(tc6393xb->clk);
> > +	clk_disable_unprepare(tc6393xb->clk);
> >  	iounmap(tc6393xb->scr);
> >  	release_resource(&tc6393xb->rscr);
> >  	clk_put(tc6393xb->clk);
> > @@ -792,7 +792,7 @@ static int tc6393xb_suspend(struct platform_device *dev, pm_message_t state)
> >  			ioread8(tc6393xb->scr + SCR_GPI_BCR(i));
> >  	}
> >  	ret = tcpd->suspend(dev);
> > -	clk_disable(tc6393xb->clk);
> > +	clk_disable_unprepare(tc6393xb->clk);
> >  
> >  	return ret;
> >  }
> > @@ -804,7 +804,7 @@ static int tc6393xb_resume(struct platform_device *dev)
> >  	int ret;
> >  	int i;
> >  
> > -	clk_enable(tc6393xb->clk);
> > +	clk_prepare_enable(tc6393xb->clk);
> >  
> >  	ret = tcpd->resume(dev);
> >  	if (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] 4+ messages in thread

* Re: [PATCH] mfd: tc6393xb: prepare/unprepare clocks
  2014-11-10 13:53   ` Lee Jones
@ 2014-11-10 14:03     ` Dmitry Eremin-Solenikov
  0 siblings, 0 replies; 4+ messages in thread
From: Dmitry Eremin-Solenikov @ 2014-11-10 14:03 UTC (permalink / raw)
  To: Lee Jones; +Cc: Samuel Ortiz, kernel list

2014-11-10 16:53 GMT+03:00 Lee Jones <lee.jones@linaro.org>:
> On Thu, 06 Nov 2014, Lee Jones wrote:
>
>> On Thu, 06 Nov 2014, Dmitry Eremin-Solenikov wrote:
>>
>> > Change clk_enable/disable() calls to clk_prepare_enable() and
>> > clk_disable_unrepapre().
>> >
>> > Signed-off-by: Dmitry Eremin-Solenikov <dbaryshkov@gmail.com>
>> > ---
>> >  drivers/mfd/tc6393xb.c | 10 +++++-----
>> >  1 file changed, 5 insertions(+), 5 deletions(-)
>>
>> Applied, thanks.
>
> OOI, what kernel version was this patch based on?

v3.18-rc something. It is not required for previous kernel versions,
since machines with
these chips (PXA-based) do not use COMMON_CLK (and thus do not trigger
a warning).
Robert Jarzmik started converting pxa to common clocks framework and
thus I spotted
the warning.

-- 
With best wishes
Dmitry

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

end of thread, other threads:[~2014-11-10 14:03 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-11-06  8:52 [PATCH] mfd: tc6393xb: prepare/unprepare clocks Dmitry Eremin-Solenikov
2014-11-06  9:04 ` Lee Jones
2014-11-10 13:53   ` Lee Jones
2014-11-10 14:03     ` Dmitry Eremin-Solenikov

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.