Re: [PATCH] i2c: imx: move to generic GPIO recovery

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Fri, Jan 26, 2024 at 08:38:08AM +0100, Esben Haabendal wrote:
> Oleksij Rempel <o.rempel@xxxxxxxxxxxxxx> 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.

Good point, this is what I overlooked :)

Acked-by: Oleksij Rempel <o.rempel@xxxxxxxxxxxxxx>

Regards,
Oleksij
-- 
Pengutronix e.K.                           |                             |
Steuerwalder Str. 21                       | http://www.pengutronix.de/  |
31137 Hildesheim, Germany                  | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |




[Index of Archives]     [Linux GPIO]     [Linux SPI]     [Linux Hardward Monitoring]     [LM Sensors]     [Linux USB Devel]     [Linux Media]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux