[PATCH 1/2] i2c: i.MX: Use better error code when bus recovery failed
Sascha Hauer
s.hauer at pengutronix.de
Wed Jan 25 01:41:15 PST 2023
On Wed, Jan 25, 2023 at 10:21:29AM +0100, Marco Felsch wrote:
> On 23-01-25, Sascha Hauer wrote:
> > Signed-off-by: Sascha Hauer <s.hauer at pengutronix.de>
> > ---
> > drivers/i2c/busses/i2c-imx.c | 2 +-
> > 1 file changed, 1 insertion(+), 1 deletion(-)
> >
> > diff --git a/drivers/i2c/busses/i2c-imx.c b/drivers/i2c/busses/i2c-imx.c
> > index e4b04327ee..3be3b158c7 100644
> > --- a/drivers/i2c/busses/i2c-imx.c
> > +++ b/drivers/i2c/busses/i2c-imx.c
> > @@ -235,7 +235,7 @@ static int i2c_fsl_start(struct i2c_adapter *adapter)
> > if (result) {
> > result = i2c_recover_bus(&i2c_fsl->adapter);
> > if (result)
> > - return result;
> > + return -EIO;
>
> This would also reinterpret adap->bus_recovery_info->recover_bus()
> errors. I didn't checked the possible error codes for this but I think
> to say it's an IO error is fine.
Nah, forget about this, I have sent the wrong patches. Changing the i.MX
driver was my first approach until I saw that Linux returns a less
confusing error code from i2c_recover_bus().
Instead of this one I ought to send "i2c: i.MX: Use initialized dev for
dev_dbg()" which I have done now.
Sascha
--
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 |
More information about the barebox
mailing list