[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20230921212223.f5vwltckcbi27hh6@zenone.zhora.eu>
Date: Thu, 21 Sep 2023 23:22:23 +0200
From: Andi Shyti <andi.shyti@...nel.org>
To: Wolfram Sang <wsa+renesas@...g-engineering.com>
Cc: linux-renesas-soc@...r.kernel.org,
Philipp Zabel <p.zabel@...gutronix.de>,
linux-i2c@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH v3 1/2] i2c: rcar: reset controller is mandatory for Gen3+
Hi Wolfram,
[...]
> irqhandler = rcar_i2c_gen2_irq;
> }
>
> - if (priv->devtype == I2C_RCAR_GEN3) {
> - priv->rstc = devm_reset_control_get_exclusive(&pdev->dev, NULL);
> - if (!IS_ERR(priv->rstc)) {
> - ret = reset_control_status(priv->rstc);
> - if (ret < 0)
> - priv->rstc = ERR_PTR(-ENOTSUPP);
> - }
> - }
> -
> /* 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;
> @@ -1112,6 +1101,16 @@ static int rcar_i2c_probe(struct platform_device *pdev)
> if (of_property_read_bool(dev->of_node, "smbus"))
> priv->flags |= ID_P_HOST_NOTIFY;
>
> + if (priv->devtype == I2C_RCAR_GEN3) {
> + priv->rstc = devm_reset_control_get_exclusive(&pdev->dev, NULL);
> + if (IS_ERR(priv->rstc))
> + goto out_pm_put;
> +
> + ret = reset_control_status(priv->rstc);
> + if (ret < 0)
> + goto out_pm_put;
> + }
> +
you moved this block to avoid the pm_runtime_put(dev);
Looks good!
Reviewed-by: Andi Shyti <andi.shyti@...nel.org>
Andi
Powered by blists - more mailing lists