All of lore.kernel.org
 help / color / mirror / Atom feed
* [RFT] i2c: sh_mobile: let RuntimePM do the clock handling
@ 2017-11-08  8:50 Wolfram Sang
  2017-11-08 18:41 ` jacopo mondi
  2017-11-27 17:56 ` Wolfram Sang
  0 siblings, 2 replies; 4+ messages in thread
From: Wolfram Sang @ 2017-11-08  8:50 UTC (permalink / raw)
  To: linux-i2c
  Cc: linux-renesas-soc, Jacopo Mondi, Yoshihiro Shimoda, Wolfram Sang,
	Geert Uytterhoeven

No need to do it manually.

Reported-by: Geert Uytterhoeven <geert+renesas@glider.be>
Signed-off-by: Wolfram Sang <wsa+renesas@sang-engineering.com>
---

jacopo: can you test this on Migo-R, please, on top of the other I2C patches?

I tested it on a Lager and it worked there. Will try Gen3 later, too.

 drivers/i2c/busses/i2c-sh_mobile.c | 2 --
 1 file changed, 2 deletions(-)

diff --git a/drivers/i2c/busses/i2c-sh_mobile.c b/drivers/i2c/busses/i2c-sh_mobile.c
index ebd146ccb24465..80561ffbcf7b46 100644
--- a/drivers/i2c/busses/i2c-sh_mobile.c
+++ b/drivers/i2c/busses/i2c-sh_mobile.c
@@ -702,7 +702,6 @@ static int sh_mobile_i2c_xfer(struct i2c_adapter *adapter,
 
 	/* Wake up device and enable clock */
 	pm_runtime_get_sync(pd->dev);
-	clk_prepare_enable(pd->clk);
 
 	/* Process all messages */
 	for (i = 0; i < num; i++) {
@@ -743,7 +742,6 @@ static int sh_mobile_i2c_xfer(struct i2c_adapter *adapter,
 	iic_wr(pd, ICCR, 0);
 
 	/* Disable clock and mark device as idle */
-	clk_disable_unprepare(pd->clk);
 	pm_runtime_put_sync(pd->dev);
 
 	return err ?: num;
-- 
2.11.0

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

* Re: [RFT] i2c: sh_mobile: let RuntimePM do the clock handling
  2017-11-08  8:50 [RFT] i2c: sh_mobile: let RuntimePM do the clock handling Wolfram Sang
@ 2017-11-08 18:41 ` jacopo mondi
  2017-11-08 21:07   ` Wolfram Sang
  2017-11-27 17:56 ` Wolfram Sang
  1 sibling, 1 reply; 4+ messages in thread
From: jacopo mondi @ 2017-11-08 18:41 UTC (permalink / raw)
  To: Wolfram Sang
  Cc: linux-i2c, linux-renesas-soc, Yoshihiro Shimoda, Geert Uytterhoeven

Hi Wolfram,

On Wed, Nov 08, 2017 at 09:50:37AM +0100, Wolfram Sang wrote:
> No need to do it manually.
>
> Reported-by: Geert Uytterhoeven <geert+renesas@glider.be>
> Signed-off-by: Wolfram Sang <wsa+renesas@sang-engineering.com>
> ---
>
> jacopo: can you test this on Migo-R, please, on top of the other I2C patches?

Done.

No appreciable differences with this patch applied, the image sensor
is properly detected and I can grab an image.

For this one as well:
Tested-by: Jacopo Mondi <jacopo+renesas@jmondi.org>

Thanks
   j
>
> I tested it on a Lager and it worked there. Will try Gen3 later, too.
>
>  drivers/i2c/busses/i2c-sh_mobile.c | 2 --
>  1 file changed, 2 deletions(-)
>
> diff --git a/drivers/i2c/busses/i2c-sh_mobile.c b/drivers/i2c/busses/i2c-sh_mobile.c
> index ebd146ccb24465..80561ffbcf7b46 100644
> --- a/drivers/i2c/busses/i2c-sh_mobile.c
> +++ b/drivers/i2c/busses/i2c-sh_mobile.c
> @@ -702,7 +702,6 @@ static int sh_mobile_i2c_xfer(struct i2c_adapter *adapter,
>
>  	/* Wake up device and enable clock */
>  	pm_runtime_get_sync(pd->dev);
> -	clk_prepare_enable(pd->clk);
>
>  	/* Process all messages */
>  	for (i = 0; i < num; i++) {
> @@ -743,7 +742,6 @@ static int sh_mobile_i2c_xfer(struct i2c_adapter *adapter,
>  	iic_wr(pd, ICCR, 0);
>
>  	/* Disable clock and mark device as idle */
> -	clk_disable_unprepare(pd->clk);
>  	pm_runtime_put_sync(pd->dev);
>
>  	return err ?: num;
> --
> 2.11.0
>

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

* Re: [RFT] i2c: sh_mobile: let RuntimePM do the clock handling
  2017-11-08 18:41 ` jacopo mondi
@ 2017-11-08 21:07   ` Wolfram Sang
  0 siblings, 0 replies; 4+ messages in thread
From: Wolfram Sang @ 2017-11-08 21:07 UTC (permalink / raw)
  To: jacopo mondi
  Cc: Wolfram Sang, linux-i2c, linux-renesas-soc, Yoshihiro Shimoda,
	Geert Uytterhoeven

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

> For this one as well:
> Tested-by: Jacopo Mondi <jacopo+renesas@jmondi.org>

Thanks, Jacopo!


[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

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

* Re: [RFT] i2c: sh_mobile: let RuntimePM do the clock handling
  2017-11-08  8:50 [RFT] i2c: sh_mobile: let RuntimePM do the clock handling Wolfram Sang
  2017-11-08 18:41 ` jacopo mondi
@ 2017-11-27 17:56 ` Wolfram Sang
  1 sibling, 0 replies; 4+ messages in thread
From: Wolfram Sang @ 2017-11-27 17:56 UTC (permalink / raw)
  To: Wolfram Sang
  Cc: linux-i2c, linux-renesas-soc, Jacopo Mondi, Yoshihiro Shimoda,
	Geert Uytterhoeven

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

On Wed, Nov 08, 2017 at 09:50:37AM +0100, Wolfram Sang wrote:
> No need to do it manually.
> 
> Reported-by: Geert Uytterhoeven <geert+renesas@glider.be>
> Signed-off-by: Wolfram Sang <wsa+renesas@sang-engineering.com>

Applied to for-next, thanks!


[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

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

end of thread, other threads:[~2017-11-27 17:56 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-11-08  8:50 [RFT] i2c: sh_mobile: let RuntimePM do the clock handling Wolfram Sang
2017-11-08 18:41 ` jacopo mondi
2017-11-08 21:07   ` Wolfram Sang
2017-11-27 17:56 ` Wolfram Sang

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.