Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 63a761ee authored by Wolfram Sang's avatar Wolfram Sang Committed by Wolfram Sang
Browse files

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: default avatarWolfram Sang <wsa+renesas@sang-engineering.com>
Acked-by: default avatarKuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Signed-off-by: default avatarWolfram Sang <wsa@the-dreams.de>
parent ae481cc1
Loading
Loading
Loading
Loading
+3 −1
Original line number Diff line number Diff line
@@ -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