* [PATCH] i2c: rcar: clarify PM handling with more comments
@ 2017-04-20 10:04 Wolfram Sang
2017-04-20 23:52 ` Kuninori Morimoto
2017-04-22 6:16 ` Wolfram Sang
0 siblings, 2 replies; 3+ messages in thread
From: Wolfram Sang @ 2017-04-20 10:04 UTC (permalink / raw)
To: linux-i2c; +Cc: linux-renesas-soc, Kuninori Morimoto, Wolfram Sang
PM handling is correct but might be a bit subtle. Add some comments for
clarification.
Signed-off-by: Wolfram Sang <wsa+renesas@sang-engineering.com>
---
drivers/i2c/busses/i2c-rcar.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/drivers/i2c/busses/i2c-rcar.c b/drivers/i2c/busses/i2c-rcar.c
index 66b84bf51bbfd0..214bf2835d1f95 100644
--- a/drivers/i2c/busses/i2c-rcar.c
+++ b/drivers/i2c/busses/i2c-rcar.c
@@ -753,6 +753,7 @@ static int rcar_reg_slave(struct i2c_client *slave)
if (slave->flags & I2C_CLIENT_TEN)
return -EAFNOSUPPORT;
+ /* Keep device active for slave address detection logic */
pm_runtime_get_sync(rcar_i2c_priv_to_dev(priv));
priv->slave = slave;
@@ -856,13 +857,14 @@ static int rcar_i2c_probe(struct platform_device *pdev)
priv->dma_direction = DMA_NONE;
priv->dma_rx = priv->dma_tx = ERR_PTR(-EPROBE_DEFER);
+ /* Activate device for clock calculation */
pm_runtime_enable(dev);
pm_runtime_get_sync(dev);
ret = rcar_i2c_clock_calculate(priv, &i2c_t);
if (ret < 0)
goto out_pm_put;
- /* Don't suspend when multi-master to keep arbitration working */
+ /* Stay always active when multi-master to keep arbitration working */
if (of_property_read_bool(dev->of_node, "multi-master"))
priv->flags |= ID_P_PM_BLOCKED;
else
--
2.11.0
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] i2c: rcar: clarify PM handling with more comments
2017-04-20 10:04 [PATCH] i2c: rcar: clarify PM handling with more comments Wolfram Sang
@ 2017-04-20 23:52 ` Kuninori Morimoto
2017-04-22 6:16 ` Wolfram Sang
1 sibling, 0 replies; 3+ messages in thread
From: Kuninori Morimoto @ 2017-04-20 23:52 UTC (permalink / raw)
To: Wolfram Sang; +Cc: linux-i2c, linux-renesas-soc, Kuninori Morimoto
Hi Wolfram
> PM handling is correct but might be a bit subtle. Add some comments for
> clarification.
>
> Signed-off-by: Wolfram Sang <wsa+renesas@sang-engineering.com>
> ---
It become more understandable, I think :)
Acked-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Best regards
---
Kuninori Morimoto
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] i2c: rcar: clarify PM handling with more comments
2017-04-20 10:04 [PATCH] i2c: rcar: clarify PM handling with more comments Wolfram Sang
2017-04-20 23:52 ` Kuninori Morimoto
@ 2017-04-22 6:16 ` Wolfram Sang
1 sibling, 0 replies; 3+ messages in thread
From: Wolfram Sang @ 2017-04-22 6:16 UTC (permalink / raw)
To: Wolfram Sang; +Cc: linux-i2c, linux-renesas-soc, Kuninori Morimoto
[-- Attachment #1: Type: text/plain, Size: 260 bytes --]
On Thu, Apr 20, 2017 at 12:04:33PM +0200, Wolfram Sang wrote:
> PM handling is correct but might be a bit subtle. Add some comments for
> clarification.
>
> Signed-off-by: Wolfram Sang <wsa+renesas@sang-engineering.com>
Applied to for-next, thanks!
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 819 bytes --]
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2017-04-22 6:16 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-04-20 10:04 [PATCH] i2c: rcar: clarify PM handling with more comments Wolfram Sang
2017-04-20 23:52 ` Kuninori Morimoto
2017-04-22 6:16 ` 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).