diff options
author | 2017-04-20 12:04:33 +0200 | |
---|---|---|
committer | 2017-04-21 14:08:57 +0200 | |
commit | 63a761eef55759c0bc725739fe575193c09fa4ef (patch) | |
tree | ee32c3ef1c63361a49fc3ca4d7c4b8000e45a0d0 /drivers/i2c | |
parent | i2c: rcar: fix resume by always initializing registers before transfer (diff) | |
download | linux-63a761eef55759c0bc725739fe575193c09fa4ef.tar.gz linux-63a761eef55759c0bc725739fe575193c09fa4ef.tar.bz2 linux-63a761eef55759c0bc725739fe575193c09fa4ef.zip |
i2c: rcar: clarify PM handling with more comments
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>
Acked-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Signed-off-by: Wolfram Sang <wsa@the-dreams.de>
Diffstat (limited to 'drivers/i2c')
-rw-r--r-- | drivers/i2c/busses/i2c-rcar.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/i2c/busses/i2c-rcar.c b/drivers/i2c/busses/i2c-rcar.c index 66b84bf51bbf..214bf2835d1f 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 |