[PATCH] i2c: imx: move to generic GPIO recovery
Esben Haabendal
esben at geanix.com
Thu Jan 25 23:38:08 PST 2024
Oleksij Rempel <o.rempel at pengutronix.de> writes:
> ....
>> + struct i2c_bus_recovery_info *bri = &i2c_imx->rinfo;
>>
>> - dev_dbg(&pdev->dev, "using scl%s for recovery\n",
>> - rinfo->sda_gpiod ? ",sda" : "");
>> + bri->pinctrl = devm_pinctrl_get(&pdev->dev);
>> + if (IS_ERR(bri->pinctrl))
>> + return PTR_ERR(bri->pinctrl);
>
> According to the commit message - "pinctrl becomes optional", but this
> code stops probe if pinctrl will fail for one or another reason. I do
> not see any place returning NULL on fail. Do I'm missing something?
The caller, i2c_imx_probe(), does only check for -EPROBE_DEFER, and
simply ignores any other error codes.
I assume it is on purpose, so any problems with initializing i2c
recovery does not cause complete failure of the i2c controller, which
seems sane to me.
/Esben
More information about the linux-arm-kernel
mailing list