linux-i2c.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] i2c-pxa: prepare clock before use
@ 2013-06-13 19:24 Daniel Drake
       [not found] ` <20130613192457.51006FAACE-2+9YHz4BXxlLDiiyqF6/jw@public.gmane.org>
  0 siblings, 1 reply; 2+ messages in thread
From: Daniel Drake @ 2013-06-13 19:24 UTC (permalink / raw)
  To: wsa-z923LK4zBo2bacvFa/9K2g; +Cc: linux-i2c-u79uwXL29TY76Z2rM5mHXA

On OLPC XO-1.75 (MMP2), a WARN_ON() was occurring during boot
since the clock being enabled by i2c-pxa had not been prepared.

Use clk_prepare_enable() to ensure that the prepare operation
has taken place.

Signed-off-by: Daniel Drake <dsd-2X9k7bc8m7Mdnm+yROfE0A@public.gmane.org>
---
 drivers/i2c/busses/i2c-pxa.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/i2c/busses/i2c-pxa.c b/drivers/i2c/busses/i2c-pxa.c
index ea6d45d..ef307ea 100644
--- a/drivers/i2c/busses/i2c-pxa.c
+++ b/drivers/i2c/busses/i2c-pxa.c
@@ -1160,7 +1160,7 @@ static int i2c_pxa_probe(struct platform_device *dev)
 		i2c->adap.class = plat->class;
 	}
 
-	clk_enable(i2c->clk);
+	clk_prepare_enable(i2c->clk);
 
 	if (i2c->use_pio) {
 		i2c->adap.algo = &i2c_pxa_pio_algorithm;
-- 
1.8.1.4

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

* Re: [PATCH] i2c-pxa: prepare clock before use
       [not found] ` <20130613192457.51006FAACE-2+9YHz4BXxlLDiiyqF6/jw@public.gmane.org>
@ 2013-06-15 14:23   ` Wolfram Sang
  0 siblings, 0 replies; 2+ messages in thread
From: Wolfram Sang @ 2013-06-15 14:23 UTC (permalink / raw)
  To: Daniel Drake; +Cc: linux-i2c-u79uwXL29TY76Z2rM5mHXA

[-- Attachment #1: Type: text/plain, Size: 984 bytes --]

On Thu, Jun 13, 2013 at 03:24:57PM -0400, Daniel Drake wrote:
> On OLPC XO-1.75 (MMP2), a WARN_ON() was occurring during boot
> since the clock being enabled by i2c-pxa had not been prepared.
> 
> Use clk_prepare_enable() to ensure that the prepare operation
> has taken place.
> 
> Signed-off-by: Daniel Drake <dsd-2X9k7bc8m7Mdnm+yROfE0A@public.gmane.org>

The other half of the pair is missing.

> ---
>  drivers/i2c/busses/i2c-pxa.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/i2c/busses/i2c-pxa.c b/drivers/i2c/busses/i2c-pxa.c
> index ea6d45d..ef307ea 100644
> --- a/drivers/i2c/busses/i2c-pxa.c
> +++ b/drivers/i2c/busses/i2c-pxa.c
> @@ -1160,7 +1160,7 @@ static int i2c_pxa_probe(struct platform_device *dev)
>  		i2c->adap.class = plat->class;
>  	}
>  
> -	clk_enable(i2c->clk);
> +	clk_prepare_enable(i2c->clk);
>  
>  	if (i2c->use_pio) {
>  		i2c->adap.algo = &i2c_pxa_pio_algorithm;
> -- 
> 1.8.1.4
> 

[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 836 bytes --]

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

end of thread, other threads:[~2013-06-15 14:23 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-06-13 19:24 [PATCH] i2c-pxa: prepare clock before use Daniel Drake
     [not found] ` <20130613192457.51006FAACE-2+9YHz4BXxlLDiiyqF6/jw@public.gmane.org>
2013-06-15 14:23   ` Wolfram Sang

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